fix(app): conditionally show model variant selector (#24115)
This commit is contained in:
@@ -1574,33 +1574,35 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
|||||||
</TooltipKeybind>
|
</TooltipKeybind>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<Show when={variants().length > 2}>
|
||||||
data-component="prompt-variant-control"
|
<div
|
||||||
style={providersShouldFadeIn() ? { animation: "fade-in 0.3s" } : undefined}
|
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")}
|
|
||||||
>
|
>
|
||||||
<Select
|
<TooltipKeybind
|
||||||
size="normal"
|
placement="top"
|
||||||
options={variants()}
|
gutter={4}
|
||||||
current={local.model.variant.current() ?? "default"}
|
title={language.t("command.model.variant.cycle")}
|
||||||
label={(x) => (x === "default" ? language.t("common.default") : x)}
|
keybind={command.keybind("model.variant.cycle")}
|
||||||
onSelect={(value) => {
|
>
|
||||||
local.model.variant.set(value === "default" ? undefined : value)
|
<Select
|
||||||
restoreFocus()
|
size="normal"
|
||||||
}}
|
options={variants()}
|
||||||
class="capitalize max-w-[160px] text-text-base"
|
current={local.model.variant.current() ?? "default"}
|
||||||
valueClass="truncate text-13-regular text-text-base"
|
label={(x) => (x === "default" ? language.t("common.default") : x)}
|
||||||
triggerStyle={control()}
|
onSelect={(value) => {
|
||||||
triggerProps={{ "data-action": "prompt-model-variant" }}
|
local.model.variant.set(value === "default" ? undefined : value)
|
||||||
variant="ghost"
|
restoreFocus()
|
||||||
/>
|
}}
|
||||||
</TooltipKeybind>
|
class="capitalize max-w-[160px] text-text-base"
|
||||||
</div>
|
valueClass="truncate text-13-regular text-text-base"
|
||||||
|
triggerStyle={control()}
|
||||||
|
triggerProps={{ "data-action": "prompt-model-variant" }}
|
||||||
|
variant="ghost"
|
||||||
|
/>
|
||||||
|
</TooltipKeybind>
|
||||||
|
</div>
|
||||||
|
</Show>
|
||||||
</Show>
|
</Show>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user