Skip to content

fix(tui): restore variant cycle keybind hint in prompt footer - #12463

Merged
johnnyeric merged 1 commit into
Kilo-Org:mainfrom
IamCoder18:fix/tui-variant-cycle-hint
Jul 27, 2026
Merged

fix(tui): restore variant cycle keybind hint in prompt footer#12463
johnnyeric merged 1 commit into
Kilo-Org:mainfrom
IamCoder18:fix/tui-variant-cycle-hint

Conversation

@IamCoder18

@IamCoder18 IamCoder18 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Issue

Closes #12464

Context

The TUI prompt footer shows keybind hints for switching agents and opening the command palette, but the Ctrl+T hint for cycling reasoning/thinking variants was not rendered even when a thinking variant was selected. The keybind itself still fired correctly, the shortcut was simply not discoverable from the UI.

Git history shows this hint was originally added upstream in anomalyco/opencode commit cd56845dce ("tui: add hint for variants toggle", Jan 12 2026) and later made conditional on local.model.variant.list().length > 0 in 93e43d8e5e ("Hide variants hint when list empty"). It was removed in 81eb6e670b ("refactor(prompt): remove variant cycle display from footer", Mar 28, 2026), and the variant information was relocated to the top metadata row instead. The footer hint was never restored.

This PR restores the hint at its original position and re-establishes discoverability of the variant.cycle keybind in the prompt footer.

Implementation

The TUI prompt component has two hint areas:

  • Top metadata row — shows the current agent, model name, provider, and (when applicable) the active variant name.
  • Footer hint row — shows keyboard shortcut hints for cycling agents (agent.cycle) and opening the command palette (command.palette.show).

This change adds a third entry to the footer:

  • Registers const variantShortcut = useCommandShortcut("variant.cycle") alongside the existing agentShortcut and paletteShortcut hook calls at the top of the Prompt component.
  • Renders it as the first <text> inside the <Match when={store.mode === "normal"}> branch of the footer's <Switch>, wrapped in <Show when={showVariant()}>.
  • showVariant() is the existing createMemo in this file (around line 1448) that returns true only when the active model has at least one variant.

The placement (first in the row, before agents and commands) matches the original upstream placement. The keybind follows the configured variant.cycle keybind (defaults to Ctrl+T), so users who have remapped it will see their own key string.

A changeset is included.

Screenshots / Video

image image

How to Test

Manual/local verification

  • Run the TUI against a model with reasoning variants (Anthropic extended thinking, OpenAI reasoning effort, etc.). Confirm Ctrl+T variants appears as the first hint in the footer row beneath the input.
  • Press Ctrl+T while focused in the input, confirm the variant actually cycles and the footer hint reflects the new keybind resolution if the user has remapped it.

Reviewer test steps

  1. Launch the TUI (bun dev).
  2. Pick a session using a reasoning-capable model.
  3. Read the footer hint row directly under the box.
  4. Confirm Ctrl+T variants is the leftmost hint, before agents and commands.
  5. Press Ctrl+T and confirm the variant cycles and the hint updates if the user has remapped the keybind in config.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Get in Touch

Discord: @IamCoder18

The Ctrl+T variant cycling shortcut hint was rendered in the TUI prompt footer hint row, gated on the active model exposing reasoning variants. It was accidentally removed during an upstream refactor (commit 81eb6e6 in anomalyco/opencode, "refactor(prompt): remove variant cycle display from footer").

- Add useCommandShortcut("variant.cycle") alongside the existing agent and command palette shortcuts
- Render the hint as the first item in the footer row, matching the original placement before agents/commands
- Gate visibility on local.model.variant.list().length > 0, matching the original upstream guard so the hint is discoverable as soon as the model exposes variants, regardless of whether one is currently selected
@kilo-code-bot

kilo-code-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • .changeset/tui-variant-shortcut-hint.md
  • packages/tui/src/component/prompt/index.tsx

Reviewed by claude-sonnet-5 · Input: 18 · Output: 3.7K · Cached: 337.3K

Review guidance: REVIEW.md from base branch main

@johnnyeric
johnnyeric merged commit 1f3383c into Kilo-Org:main Jul 27, 2026
27 checks passed
@johnnyeric

Copy link
Copy Markdown
Contributor

Thanks for the fix! Merged.

t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…rg#12463)

The Ctrl+T variant cycling shortcut hint was rendered in the TUI prompt footer hint row, gated on the active model exposing reasoning variants. It was accidentally removed during an upstream refactor (commit 184af08 in anomalyco/opencode, "refactor(prompt): remove variant cycle display from footer").

- Add useCommandShortcut("variant.cycle") alongside the existing agent and command palette shortcuts
- Render the hint as the first item in the footer row, matching the original placement before agents/commands
- Gate visibility on local.model.variant.list().length > 0, matching the original upstream guard so the hint is discoverable as soon as the model exposes variants, regardless of whether one is currently selected
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]: Ctrl+T variant cycling keybind hint missing from TUI prompt footer when a thinking variant is selected

2 participants