Skip to content

The open source coding agent.

TypeScript

fix: move variant toggle to command bar

Aiden Clinec88c2da9be9b
diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx
index 5214b0c1a9a..8b7b68273ac 100644
--- a/packages/opencode/src/cli/cmd/tui/app.tsx
+++ b/packages/opencode/src/cli/cmd/tui/app.tsx
@@ -372,6 +372,15 @@ function App() {
local.agent.move(1)
},
},
+ {
+ title: "Variant cycle",
+ value: "variant.cycle",
+ keybind: "variant_cycle",
+ category: "Agent",
+ onSelect: () => {
+ local.model.variant.cycle()
+ },
+ },
{
title: "Agent cycle reverse",
value: "agent.cycle.reverse",
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
index 70eba3ef8c4..2a0ac846165 100644
--- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
@@ -877,12 +877,6 @@ export function Prompt(props: PromptProps) {
return
}
}
- if (keybind.match("variant_cycle", e)) {
- e.preventDefault()
- if (local.model.variant.list().length === 0) return
- local.model.variant.cycle()
- return
- }
if (store.mode === "normal") autocomplete.onKeyDown(e)
if (!autocomplete.visible) {
if (