🤖 refactor: centralize ui_only tool payloads #1749
Merged
+699
−367
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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