Browse Source

fix: move variant toggle to command bar

Aiden Cline 1 month ago
parent
commit
c88c2da9be

+ 9 - 0
packages/opencode/src/cli/cmd/tui/app.tsx

@@ -372,6 +372,15 @@ function App() {
         local.agent.move(1)
         local.agent.move(1)
       },
       },
     },
     },
+    {
+      title: "Variant cycle",
+      value: "variant.cycle",
+      keybind: "variant_cycle",
+      category: "Agent",
+      onSelect: () => {
+        local.model.variant.cycle()
+      },
+    },
     {
     {
       title: "Agent cycle reverse",
       title: "Agent cycle reverse",
       value: "agent.cycle.reverse",
       value: "agent.cycle.reverse",

+ 0 - 6
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

@@ -877,12 +877,6 @@ export function Prompt(props: PromptProps) {
                     return
                     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 (store.mode === "normal") autocomplete.onKeyDown(e)
                 if (!autocomplete.visible) {
                 if (!autocomplete.visible) {
                   if (
                   if (