Repository navigation
Make quick-action output inspectable in the transcript - #1633
Conversation
Solenta-Message-Id: 73c3da83-259c-4c5a-9e1f-0e25b003e088
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6722277e10
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| appendEvent(store, threadId, eventText(resolved.name, "end", result), { | ||
| commandResult: result, |
There was a problem hiding this comment.
Redact command output before persisting it
When a successful setup or quick action prints a value previously supplied through secret_request—for example, a test script echoes a credential read from the checkout—this stores and broadcasts that value verbatim. appendEvent writes through store.setMessages, bypassing the threadSecrets.redact call in Store.appendMessage, so the new commandResult.log can persist a secret that the store otherwise guarantees never to retain; redact the complete event before appending it.
Useful? React with 👍 / 👎.
| const c = chip(); | ||
| void navigator.clipboard | ||
| ?.writeText(`$ ${result.command}\n${c.text}`) | ||
| .then(() => flash("copied"), () => {}); |
There was a problem hiding this comment.
Copy only the selected or complete command output
When Copy is clicked, chip() returns the terminal-chip text, which prepends the action summary and cwd to either the selected text or the full log. The clipboard therefore contains $ <command>, the summary, the checkout path, and then the output, even though the control promises to copy the output and a selection should restrict the copy to that selected output. Build the clipboard body directly from the selection or result.log, leaving the contextual chip formatting only for Add to prompt.
Useful? React with 👍 / 👎.
Setup and quick-action runs now keep their output in the transcript, so you can read it, copy it, or attach it to the next prompt without running the command again (#1216).
What changed
Main process (
electron/projectCommands.js)CommandRunResultas a newcommandResultfield. Two runs of the same action stay separate, and the output is still there after a remount because it's read back from the transcript.tailLogat this point as well. A swapped runner or a thrown error doesn't go through the usual tailing, so this catches those cases.cwd, the checkout the command ran in.[name] failed: exit N in Xs). The old failure tail that was pasted into the event text (EVENT_LOG_MAX) has been removed.appendEventtakes an optionalextraobject whose fields are merged onto the message.Shared types (
src/shared/ipc.ts)ChatMessage.commandResult?: CommandRunResult.CommandRunResult.cwd?: string.Renderer
commandResultare rendered by a newCommandResultEventinmessages.tsx:<pre>(max 320px).$ <command>followed by the output on the clipboard.ThreadViewpassesaddCommandOutputdown, bound to the current thread. It is not passed for archived threads, so they show no Add to prompt button.commandOutputChipincontextChips.tsbuilds the chip: action summary,cwd, and the output. It keeps the end of the output withinCONTEXT_BODY_CAPand marks how much was trimmed, because failing commands print their summary last.src/dev/threads.tsattachescommandResultandcwdto its fake runs.Tests
electron/test/project-commands.test.js: updated for the new event shape.test/contextChips.test.ts: coverscommandOutputChip.test/threadHeader.test.tsx: covers rendering the output, Copy and Add to prompt.🤖 Generated with Claude Code