@@ -1574,33 +1574,35 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
15741574 </ TooltipKeybind >
15751575 </ Show >
15761576 </ div >
1577- < div
1578- data-component = "prompt-variant-control"
1579- style = { providersShouldFadeIn ( ) ? { animation : "fade-in 0.3s" } : undefined }
1580- >
1581- < TooltipKeybind
1582- placement = "top"
1583- gutter = { 4 }
1584- title = { language . t ( "command.model.variant.cycle" ) }
1585- keybind = { command . keybind ( "model.variant.cycle" ) }
1577+ < Show when = { variants ( ) . length > 2 } >
1578+ < div
1579+ data-component = "prompt-variant-control"
1580+ style = { providersShouldFadeIn ( ) ? { animation : "fade-in 0.3s" } : undefined }
15861581 >
1587- < Select
1588- size = "normal"
1589- options = { variants ( ) }
1590- current = { local . model . variant . current ( ) ?? "default" }
1591- label = { ( x ) => ( x === "default" ? language . t ( "common.default" ) : x ) }
1592- onSelect = { ( value ) => {
1593- local . model . variant . set ( value === "default" ? undefined : value )
1594- restoreFocus ( )
1595- } }
1596- class = "capitalize max-w-[160px] text-text-base"
1597- valueClass = "truncate text-13-regular text-text-base"
1598- triggerStyle = { control ( ) }
1599- triggerProps = { { "data-action" : "prompt-model-variant" } }
1600- variant = "ghost"
1601- />
1602- </ TooltipKeybind >
1603- </ div >
1582+ < TooltipKeybind
1583+ placement = "top"
1584+ gutter = { 4 }
1585+ title = { language . t ( "command.model.variant.cycle" ) }
1586+ keybind = { command . keybind ( "model.variant.cycle" ) }
1587+ >
1588+ < Select
1589+ size = "normal"
1590+ options = { variants ( ) }
1591+ current = { local . model . variant . current ( ) ?? "default" }
1592+ label = { ( x ) => ( x === "default" ? language . t ( "common.default" ) : x ) }
1593+ onSelect = { ( value ) => {
1594+ local . model . variant . set ( value === "default" ? undefined : value )
1595+ restoreFocus ( )
1596+ } }
1597+ class = "capitalize max-w-[160px] text-text-base"
1598+ valueClass = "truncate text-13-regular text-text-base"
1599+ triggerStyle = { control ( ) }
1600+ triggerProps = { { "data-action" : "prompt-model-variant" } }
1601+ variant = "ghost"
1602+ />
1603+ </ TooltipKeybind >
1604+ </ div >
1605+ </ Show >
16041606 </ Show >
16051607 </ Show >
16061608 </ div >
0 commit comments