fix(app): defer model variant selector (#39445)

This commit is contained in:
Brendan Allan 2026-07-29 13:16:30 +08:00 committed by GitHub
commit e8b0992788
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -55,6 +55,7 @@ export function PromptInputV2Composer(props: PromptInputV2ComposerProps) {
controller={props.controller}
borderUnderlay={props.borderUnderlay}
class={props.class}
variantControlVisible={!props.controller.model.loading}
attachKeybind={command.keybindParts("file.attach")}
attachShortcut={command.keybind("file.attach")}
modelControl={

View file

@ -39,6 +39,7 @@ export type PromptInputV2Props = {
borderUnderlay?: boolean
class?: string
modelControl?: JSX.Element
variantControlVisible?: boolean
attachKeybind?: string[]
attachShortcut?: string
}
@ -232,7 +233,7 @@ export function PromptInputV2(props: PromptInputV2Props) {
>
{props.modelControl}
</Show>
<Show when={view.variant}>
<Show when={(props.variantControlVisible ?? true) && view.variant}>
{(control) => (
<Show when={control().options().length > 1}>
<PromptInputV2ConfiguredSelect