fix(tui): restore variant cycle keybind hint in prompt footer (#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 81eb6e670b 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 commit is contained in:
Aarav
2026-07-27 06:53:43 -06:00
committed by GitHub
parent 65c5e9d2c0
commit 1f3383cf3d
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---
Show the `Ctrl+T` variant cycling shortcut in the TUI prompt hint row whenever the active model exposes reasoning variants, as the first hint before the agent and command palette hints
@@ -177,6 +177,7 @@ export function Prompt(props: PromptProps) {
const keymap = useOpencodeKeymap()
const agentShortcut = useCommandShortcut("agent.cycle")
const paletteShortcut = useCommandShortcut("command.palette.show")
const variantShortcut = useCommandShortcut("variant.cycle")
const renderer = useRenderer()
const exit = useExit()
const dimensions = useTerminalDimensions()
@@ -1835,6 +1836,11 @@ export function Prompt(props: PromptProps) {
</Show>
<Switch>
<Match when={store.mode === "normal"}>
<Show when={local.model.variant.list().length > 0}>
<text fg={theme.text}>
{variantShortcut()} <span style={{ fg: theme.textMuted }}>variants</span>
</text>
</Show>
<Switch>
<Match when={usage()}>
{(item) => (