Skip to content

fix(tui): show completed write output - #41352

Open
kitlangton wants to merge 1 commit into
v2-migrationfrom
fix-write-output
Open

fix(tui): show completed write output#41352
kitlangton wants to merge 1 commit into
v2-migrationfrom
fix-write-output

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Show the syntax-highlighted file contents after the V2 write tool completes.

Before / After

Before: The write renderer used metadata.diagnostics as its completion signal. V2 writes do not emit diagnostics yet, so successful writes remained as a compact Write <path> row and hid the content already present in input.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.tsx keys the write block on state.status === "completed" instead of optional diagnostics metadata.
  • Audited the other mutation renderers: edit and patch already 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 typecheck in packages/tui
  • bun 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.tsx in packages/tui (49 passed)
  • Repository pre-push typecheck (32 packages passed)

Demo

An OpenCode Drive before/after capture was attempted against origin/v2-migration. Drive 1.4.2 currently intercepts the unsupported write mutation and records session.tool.failed rather 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant