Browse Source

Hide variants hint when list empty (#9179)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <[email protected]>
opencode-agent[bot] 1 month ago
parent
commit
93e43d8e5e
1 changed files with 5 additions and 3 deletions
  1. 5 3
      packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

+ 5 - 3
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

@@ -1065,9 +1065,11 @@ export function Prompt(props: PromptProps) {
             <box gap={2} flexDirection="row">
               <Switch>
                 <Match when={store.mode === "normal"}>
-                  <text fg={theme.text}>
-                    {keybind.print("variant_cycle")} <span style={{ fg: theme.textMuted }}>variants</span>
-                  </text>
+                  <Show when={local.model.variant.list().length > 0}>
+                    <text fg={theme.text}>
+                      {keybind.print("variant_cycle")} <span style={{ fg: theme.textMuted }}>variants</span>
+                    </text>
+                  </Show>
                   <text fg={theme.text}>
                     {keybind.print("agent_cycle")} <span style={{ fg: theme.textMuted }}>agents</span>
                   </text>