fix(tui): restore variant cycle keybind hint in prompt footer - #12463
Merged
Conversation
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
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by claude-sonnet-5 · Input: 18 · Output: 3.7K · Cached: 337.3K Review guidance: REVIEW.md from base branch |
johnnyeric
approved these changes
Jul 27, 2026
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
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.
Issue
Closes #12464
Context
The TUI prompt footer shows keybind hints for switching agents and opening the command palette, but the
Ctrl+Thint 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/opencodecommitcd56845dce("tui: add hint for variants toggle", Jan 12 2026) and later made conditional onlocal.model.variant.list().length > 0in93e43d8e5e("Hide variants hint when list empty"). It was removed in81eb6e670b("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.cyclekeybind in the prompt footer.Implementation
The TUI prompt component has two hint areas:
agent.cycle) and opening the command palette (command.palette.show).This change adds a third entry to the footer:
const variantShortcut = useCommandShortcut("variant.cycle")alongside the existingagentShortcutandpaletteShortcuthook calls at the top of thePromptcomponent.<text>inside the<Match when={store.mode === "normal"}>branch of the footer's<Switch>, wrapped in<Show when={showVariant()}>.showVariant()is the existingcreateMemoin 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.cyclekeybind (defaults toCtrl+T), so users who have remapped it will see their own key string.A changeset is included.
Screenshots / Video
How to Test
Manual/local verification
Ctrl+T variantsappears as the first hint in the footer row beneath the input.Ctrl+Twhile 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
bun dev).Ctrl+T variantsis the leftmost hint, beforeagentsandcommands.Ctrl+Tand confirm the variant cycles and the hint updates if the user has remapped the keybind in config.Checklist
Get in Touch
Discord: @IamCoder18