@@ -270,7 +270,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
270270 const buttonsSpring = useSpring ( ( ) => ( store . mode === "normal" ? 1 : 0 ) , { visualDuration : 0.2 , bounce : 0 } )
271271 const motion = ( value : number ) => ( {
272272 opacity : value ,
273- transform : `scale(${ 0.95 + value * 0.05 } )` ,
273+ transform : `scale(${ 0.98 + value * 0.02 } )` ,
274274 filter : `blur(${ ( 1 - value ) * 2 } px)` ,
275275 "pointer-events" : value > 0.5 ? ( "auto" as const ) : ( "none" as const ) ,
276276 } )
@@ -345,7 +345,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
345345 promptPlaceholder ( {
346346 mode : store . mode ,
347347 commentCount : commentCount ( ) ,
348- example : suggest ( ) ? language . t ( EXAMPLES [ store . placeholder ] ) : "" ,
348+ example : suggest ( ) ? ( store . mode === "shell" ? "git status" : language . t ( EXAMPLES [ store . placeholder ] ) ) : "" ,
349349 suggest : suggest ( ) ,
350350 t : ( key , params ) => language . t ( key as Parameters < typeof language . t > [ 0 ] , params as never ) ,
351351 } ) ,
@@ -1403,12 +1403,11 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
14031403 < IconButton
14041404 data-action = "prompt-submit"
14051405 type = "submit"
1406- disabled = { store . mode !== "normal" || ( ! working ( ) && blank ( ) ) }
1406+ disabled = { ! working ( ) && blank ( ) }
14071407 tabIndex = { store . mode === "normal" ? undefined : - 1 }
1408- icon = { stopping ( ) ? "stop" : "arrow-up" }
1408+ icon = { stopping ( ) ? "stop" : store . mode === "shell" ? "arrow-undo-down" : "arrow-up" }
14091409 variant = "primary"
14101410 class = "size-8"
1411- style = { buttons ( ) }
14121411 aria-label = { stopping ( ) ? language . t ( "prompt.action.stop" ) : language . t ( "prompt.action.send" ) }
14131412 />
14141413 </ Tooltip >
@@ -1451,14 +1450,24 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
14511450 < div class = "px-1.75 pt-5.5 pb-2 flex items-center gap-2 min-w-0" >
14521451 < div class = "flex items-center gap-1.5 min-w-0 flex-1 relative" >
14531452 < div
1454- class = "h-7 flex items-center gap-1.5 max-w-[160px] min-w-0 absolute inset-y-0 left -0"
1453+ class = "h-7 flex items-center gap-1.5 min-w-0 absolute inset-0"
14551454 style = { {
1456- padding : "0 4px 0 8px" ,
1455+ padding : "0 0px 0 8px" ,
14571456 ...shell ( ) ,
14581457 } }
14591458 >
1460- < span class = "truncate text-13-medium text-text-strong" > { language . t ( "prompt.mode.shell" ) } </ span >
1461- < div class = "size-4 shrink-0" />
1459+ < Icon name = "console" />
1460+ < span class = "truncate text-13-medium text-text-base" > { language . t ( "prompt.mode.shell" ) } </ span >
1461+ < div class = "flex-1" />
1462+ < Button
1463+ variant = "ghost"
1464+ class = "text-text-base"
1465+ onClick = { ( ) => {
1466+ setStore ( "mode" , "normal" )
1467+ } }
1468+ >
1469+ { language . t ( "common.cancel" ) }
1470+ </ Button >
14621471 </ div >
14631472 < div class = "flex items-center gap-1.5 min-w-0 flex-1 h-7" >
14641473 < Show when = { ! agentsLoading ( ) } >
@@ -1565,33 +1574,35 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
15651574 </ TooltipKeybind >
15661575 </ Show >
15671576 </ div >
1568- < div
1569- data-component = "prompt-variant-control"
1570- style = { providersShouldFadeIn ( ) ? { animation : "fade-in 0.3s" } : undefined }
1571- >
1572- < TooltipKeybind
1573- placement = "top"
1574- gutter = { 4 }
1575- title = { language . t ( "command.model.variant.cycle" ) }
1576- 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 }
15771581 >
1578- < Select
1579- size = "normal"
1580- options = { variants ( ) }
1581- current = { local . model . variant . current ( ) ?? "default" }
1582- label = { ( x ) => ( x === "default" ? language . t ( "common.default" ) : x ) }
1583- onSelect = { ( value ) => {
1584- local . model . variant . set ( value === "default" ? undefined : value )
1585- restoreFocus ( )
1586- } }
1587- class = "capitalize max-w-[160px] text-text-base"
1588- valueClass = "truncate text-13-regular text-text-base"
1589- triggerStyle = { control ( ) }
1590- triggerProps = { { "data-action" : "prompt-model-variant" } }
1591- variant = "ghost"
1592- />
1593- </ TooltipKeybind >
1594- </ 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 >
15951606 </ Show >
15961607 </ Show >
15971608 </ div >
0 commit comments