fix(tui): show completed write output - #41352
Open
kitlangton wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Show the syntax-highlighted file contents after the V2
writetool completes.Before / After
Before: The write renderer used
metadata.diagnosticsas its completion signal. V2 writes do not emit diagnostics yet, so successful writes remained as a compactWrite <path>row and hid the content already present ininput.content.After: A completed write switches to the existing code-block presentation based on the durable tool status. Diagnostics remain optional and render when available.
How
packages/tui/src/routes/session/index.tsxkeys the write block onstate.status === "completed"instead of optional diagnostics metadata.editandpatchalready key their expanded views from final diff/file metadata emitted by their V2 tools.Scope
This does not add V2 LSP diagnostics to write or edit tools.
Testing
bun typecheckinpackages/tuibun run test test/mini/tool.test.ts test/mini/entry.body.test.ts test/mini/scrollback.surface.test.ts test/cli/tui/inline-tool-wrap-snapshot.test.tsxinpackages/tui(49 passed)Demo
An OpenCode Drive before/after capture was attempted against
origin/v2-migration. Drive 1.4.2 currently intercepts the unsupportedwritemutation and recordssession.tool.failedrather than a completed built-in write; its generated client also does not match this branch's session API. No misleading failed-tool recording is attached.