diff options
Diffstat (limited to 'packages/app')
| -rw-r--r-- | packages/app/src/components/prompt-input.tsx | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index 8b69f3b2a..0a1809616 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -1574,33 +1574,35 @@ export const PromptInput: Component<PromptInputProps> = (props) => { </TooltipKeybind> </Show> </div> - <div - data-component="prompt-variant-control" - style={providersShouldFadeIn() ? { animation: "fade-in 0.3s" } : undefined} - > - <TooltipKeybind - placement="top" - gutter={4} - title={language.t("command.model.variant.cycle")} - keybind={command.keybind("model.variant.cycle")} + <Show when={variants().length > 2}> + <div + data-component="prompt-variant-control" + style={providersShouldFadeIn() ? { animation: "fade-in 0.3s" } : undefined} > - <Select - size="normal" - options={variants()} - current={local.model.variant.current() ?? "default"} - label={(x) => (x === "default" ? language.t("common.default") : x)} - onSelect={(value) => { - local.model.variant.set(value === "default" ? undefined : value) - restoreFocus() - }} - class="capitalize max-w-[160px] text-text-base" - valueClass="truncate text-13-regular text-text-base" - triggerStyle={control()} - triggerProps={{ "data-action": "prompt-model-variant" }} - variant="ghost" - /> - </TooltipKeybind> - </div> + <TooltipKeybind + placement="top" + gutter={4} + title={language.t("command.model.variant.cycle")} + keybind={command.keybind("model.variant.cycle")} + > + <Select + size="normal" + options={variants()} + current={local.model.variant.current() ?? "default"} + label={(x) => (x === "default" ? language.t("common.default") : x)} + onSelect={(value) => { + local.model.variant.set(value === "default" ? undefined : value) + restoreFocus() + }} + class="capitalize max-w-[160px] text-text-base" + valueClass="truncate text-13-regular text-text-base" + triggerStyle={control()} + triggerProps={{ "data-action": "prompt-model-variant" }} + variant="ghost" + /> + </TooltipKeybind> + </div> + </Show> </Show> </Show> </div> |
