write_file / run_shell_command stage a .pending-actions/<id>.json record and return needs_approval with pendingActionKind. The CLI and desktop resolve it; packages/chat-ui's ApprovalCard shows the request but not what will be written — so file tools are CLI/desktop-only for now (see the package README, "File access via tools").
Task: add a diff/content preview to ApprovalCard for pendingActionKind: 'write' (and the command + resolved cwd for 'shell'), sourced from the staged record, so a browser user can approve a staged write with the same information the CLI prints. App.tsx already threads pendingActionId through handleApprove / handleDeny.
Done when: a browser user sees the pending file content (or a diff against the current file) / the shell command + cwd before approving, with a test.
Comment here with your approach before starting.
write_file/run_shell_commandstage a.pending-actions/<id>.jsonrecord and returnneeds_approvalwithpendingActionKind. The CLI and desktop resolve it;packages/chat-ui'sApprovalCardshows the request but not what will be written — so file tools are CLI/desktop-only for now (see the package README, "File access via tools").Task: add a diff/content preview to
ApprovalCardforpendingActionKind: 'write'(and the command + resolvedcwdfor'shell'), sourced from the staged record, so a browser user can approve a staged write with the same information the CLI prints.App.tsxalready threadspendingActionIdthroughhandleApprove/handleDeny.Done when: a browser user sees the pending file content (or a diff against the current file) / the shell command + cwd before approving, with a test.
Comment here with your approach before starting.