Skip to content

Show the answering model in the inspector and mark model switches on the strip - #8

Merged
navbytes merged 1 commit into
mainfrom
claude/focused-torvalds-d48017
Sep 4, 2026
Merged

Show the answering model in the inspector and mark model switches on the strip#8
navbytes merged 1 commit into
mainfrom
claude/focused-torvalds-d48017

Conversation

@navbytes

@navbytes navbytes commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • TranscriptMessage now carries the assistant's providerID/modelID (it was already on OpenCode's own message, just never copied over), so the inspector shows a Model line for assistant turns/steps, not only branch headers.
  • The Model lane's turn rule thickens to (instead of ) at the turn where the answering model actually switched — colour there is already spoken for by kind (text/reasoning), so a switch gets a shape change on the rule rather than a competing colour.
  • Fix: y on a branch row or separator silently did nothing; it now notifies there's nothing to copy there.
  • Fix: OSC 52 "success" has no ack from the terminal, so copyText now always writes the local fallback file (.opencode/context-tree/last-copy.txt) too, clipboard hit or not — a paste that silently didn't land still has one reliable place to read it from.

Test plan

  • bun run typecheck
  • bun test (271 pass / 0 fail)
  • Verified against a real built plugin + mock provider: model switch via /ctree branch <name> <provider/model>, confirmed TranscriptMessage.model, layoutEventStrip's modelChanges, and the rendered Model inspector line end-to-end (both a scripted pty TUI run and a direct headless check against the production toTranscriptMessage/layoutEventStrip code)

…the strip

TranscriptMessage now carries providerID/modelID (it was already on OpenCode's
own message, just never copied over), so the inspector shows a Model line for
assistant turns and steps, not only branch headers. The Model lane's turn rule
also thickens to a heavier glyph at the turn where the model actually
switched, since colour there is already spoken for by kind (text/reasoning).

Also fixes two `y`-copy papercuts found while testing this: a branch/separator
row silently did nothing instead of saying there's nothing to copy, and OSC 52
"success" (which has no ack from the terminal) is no longer trusted alone —
copyText always writes the local fallback file too, so a paste that silently
didn't land still has one reliable place to read it from.
@navbytes
navbytes merged commit 81b9ede into main Sep 4, 2026
1 check passed
@navbytes
navbytes deleted the claude/focused-torvalds-d48017 branch September 4, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant