🤖 refactor: centralize ui_only tool payloads#1749
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05a03427d3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review Addressed the compaction diff issue by preferring ui_only.file_edit.diff in extractEditedFileDiffs and added coverage in extractEditedFiles.test.ts. |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
3c9ef09 to
dc2d3f4
Compare
Ensure edited file diff extraction prefers ui_only.file_edit.diff when present. --- _Generated with `mux` • Model: `openai:gpt-5.2-codex` • Thinking: `xhigh` • Cost: `8.50`_
dc2d3f4 to
d583f05
Compare
- Bash output overflow now returns success: true with exit 0 - Overflow notice text moved to 'note' field, output set to empty string - Removed severity (soft/hard) concept from ToolOutputUiOnly and UI - Updated UI components to use fixed status colors without severity - GitStatusStore skips parsing when note indicates overflow - Added createBashOverflowTool for storybook and OverflowNotice story - Added isForegroundSuccess type guard for proper type narrowing in tests
Summary
Phase 1: Centralize UI-only tool outputs
ui_onlyfield (ask_user_question, file_edit, notify) with model-facing summariesui_onlyand fall back for legacy historyui_onlyin provider requests; remove per-tooltoolOutputRedactionplumbingui_only.file_edit.diffwhen extracting edited file diffs for compaction attachmentsPhase 2: Bash overflow as success with note
success: true, exitCode: 0instead of errornotefield;outputset to empty stringseverity(soft/hard warning) concept fromToolOutputUiOnlyand all UI componentsOverflowNoticeStorybook story withcreateBashOverflowToolhelperWhy
Regression Risk
extractEditedFileDiffsnow prefersui_only.file_edit.diff; tested with existing unit testsui_onlyis absentoutput+noteinstead of error; tests updated to verifynotecontains "OUTPUT OVERFLOW" (output is empty anyway)Testing
bun test src/common/utils/messages/extractEditedFiles.test.tsbun test src/node/services/tools/bash.test.tsmake static-checkGenerated with
mux• Model:anthropic:claude-opus-4-5• Thinking:high• Cost:$43.17