Problem
/shell-result currently turns the latest 8 KiB command capture directly into a model prompt. The README tells users to review output first, but the command provides no preview/editor for the exact bounded capture that will be sent.
Evidence: src/commands/console_input.ts and src/commands/chat.ts. The existing explicit-share boundary is useful; make it easier to use.
Proposed outcome
Stage the exact proposed shell attachment in a local preview with command, captured cwd, exit status, and truncation information. Let the user remove/edit lines, then choose Send or Cancel. Keep a clearly named explicit send form for scripts rather than introducing interactive prompts into pipes.
Constraints and alternatives
Do not automatically attach shell output to future prompts or saved chat. Preserve untrusted-data framing after editing. Reuse the existing redaction facilities as an aid, without presenting a filter as a guarantee. Cancelling the preview makes zero inference requests.
Bind the staged attachment to a command/session identity so a newly completed command cannot replace the capture the user reviewed. Selecting a range or editing text must preserve honest provenance about omissions.
Acceptance
- The preview shows exactly the bytes/text destined for the next prompt, including bounded-output omission markers.
- Edits/removals survive into the sent attachment; cancelled and empty selections remain local.
- A newer result arriving while previewing cannot change the approved attachment.
- Fixture tokens and environment values can be removed; output is sanitized for terminal controls while copyable text remains useful.
- TTY, non-TTY, failed commands, Unicode, and truncated large logs are covered. No raw shell capture enters ordinary history or a support export through this flow.
Priority: P1. Focused follow-up to completed #244/#245/#247. Source reviewed at ca4180d (0.4.0 candidate). This ticket is an implementation spec; live service qualification remains separate.
Problem
/shell-resultcurrently turns the latest 8 KiB command capture directly into a model prompt. The README tells users to review output first, but the command provides no preview/editor for the exact bounded capture that will be sent.Evidence: src/commands/console_input.ts and src/commands/chat.ts. The existing explicit-share boundary is useful; make it easier to use.
Proposed outcome
Stage the exact proposed shell attachment in a local preview with command, captured cwd, exit status, and truncation information. Let the user remove/edit lines, then choose Send or Cancel. Keep a clearly named explicit send form for scripts rather than introducing interactive prompts into pipes.
Constraints and alternatives
Do not automatically attach shell output to future prompts or saved chat. Preserve untrusted-data framing after editing. Reuse the existing redaction facilities as an aid, without presenting a filter as a guarantee. Cancelling the preview makes zero inference requests.
Bind the staged attachment to a command/session identity so a newly completed command cannot replace the capture the user reviewed. Selecting a range or editing text must preserve honest provenance about omissions.
Acceptance
Priority: P1. Focused follow-up to completed #244/#245/#247. Source reviewed at
ca4180d(0.4.0 candidate). This ticket is an implementation spec; live service qualification remains separate.