Skip to content

feat(tui): add session.variant to show the turn's variant in footers - #54958

Open
Nowaker wants to merge 1 commit into
anomalyco:devfrom
Nowaker:v2-footer-variant
Open

Nowaker wants to merge 1 commit into
anomalyco:devfrom
Nowaker:v2-footer-variant

Conversation

@Nowaker

@Nowaker Nowaker commented Oct 12, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #53846

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

A footer names the agent, model and duration of a turn, but not the variant it ran with, so a high turn and a default one look the same.

This adds session.variant to cli.json (off by default, also in the settings dialog). When on, the variant stored on the message follows the model:

Build · Claude Opus 4.5 · high · 45.5s

Turns without a variant are unchanged.

How did you verify your code works?

bun run typecheck and bun test test/config-v2.test.tsx in packages/tui. I also ran it in a real terminal: a TUI from this branch (serve --stdio plus --server) on a throwaway tmux server, scratch data dir, and a fake OpenAI-compatible provider on loopback. With session.variant: true and a high variant selected, the footer reads Build · Fake Model · high · 324ms. The same check fails on dev.

Screenshots / recordings

Text captures are in the description above.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

This PR is AI generated, but under direct supervision and on request of @Nowaker.


Added by the opencode bot (AI-generated).

Related: #38772

Public API: adds the optional session.variant boolean to cli.json, default off (backwards compatible)

A footer names the agent, the model and the duration, but not the variant
the turn ran with, so a high-effort turn and a default one look the same.
session.variant puts it after the model, as it was stored on the message;
turns without a variant are unchanged. Off by default, and listed in the
settings dialog.
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as described. I ran the TUI from source with the simulated model set up with a high variant and session.variant: true, then selected the variant with ctrl+t and sent a prompt. On the base branch the footer reads Build · Simulated Model · 102ms; with this PR it reads Build · Simulated Model · high · 86ms. bun test test/config-v2.test.tsx and bun run typecheck in packages/tui both pass.

Public API: adds the optional boolean session.variant to cli.json, off by default. This is backwards compatible and existing configs are unaffected.

No blocking concerns.

Related: #38772

Before

After

Nowaker added a commit to Nowaker/opencode that referenced this pull request Oct 12, 2026
…ine v2 ports

The README gains a "TUI patches on v1 and v2" table from the opencode-tools
opencode-patch-rig run: every TUI patch's result on github/v1 (v1.19.0)
and github/dev, and for v2 whether it is ported, superseded, not
applicable, or what a port costs. Nine ports have PRs against dev
(anomalyco#54958-anomalyco#54966). Every feature involved gets a timeline row linking the
session record.

AI-Tool: opencode 1.19.0-vt-243-dfb56f76c7
AI-Model: anthropic/claude-opus-5-5
AI-Variant: high
AI-Platform: linux
AI-Harness: Vibeterm a2851e7
AI-Session-ID: ses_ece4671adffe4Y4d8Yv35NSjXh

This branch has not been deployed

No deployments
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.

[FEATURE]: show the turn's model variant in message footers

1 participant