@@ -121,7 +121,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
121121 let slashPopoverRef ! : HTMLDivElement
122122
123123 const mirror = { input : false }
124- const inset = 52
124+ const inset = 56
125125 const space = `${ inset } px`
126126
127127 const scrollCursorIntoView = ( ) => {
@@ -1031,6 +1031,17 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
10311031 if ( ! id ) return permission . isAutoAcceptingDirectory ( sdk . directory )
10321032 return permission . isAutoAccepting ( id , sdk . directory )
10331033 } )
1034+ const acceptLabel = createMemo ( ( ) =>
1035+ language . t ( accepting ( ) ? "command.permissions.autoaccept.disable" : "command.permissions.autoaccept.enable" ) ,
1036+ )
1037+ const toggleAccept = ( ) => {
1038+ if ( ! params . id ) {
1039+ permission . toggleAutoAcceptDirectory ( sdk . directory )
1040+ return
1041+ }
1042+
1043+ permission . toggleAutoAccept ( params . id , sdk . directory )
1044+ }
10341045
10351046 const { abort, handleSubmit } = createPromptSubmit ( {
10361047 info,
@@ -1337,33 +1348,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
13371348 } }
13381349 />
13391350
1340- < div
1341- aria-hidden = { store . mode !== "normal" }
1342- class = "flex items-center gap-1"
1343- style = { {
1344- "pointer-events" : buttonsSpring ( ) > 0.5 ? "auto" : "none" ,
1345- } }
1346- >
1347- < TooltipKeybind
1348- placement = "top"
1349- title = { language . t ( "prompt.action.attachFile" ) }
1350- keybind = { command . keybind ( "file.attach" ) }
1351- >
1352- < Button
1353- data-action = "prompt-attach"
1354- type = "button"
1355- variant = "ghost"
1356- class = "size-8 p-0"
1357- style = { buttons ( ) }
1358- onClick = { pick }
1359- disabled = { store . mode !== "normal" }
1360- tabIndex = { store . mode === "normal" ? undefined : - 1 }
1361- aria-label = { language . t ( "prompt.action.attachFile" ) }
1362- >
1363- < Icon name = "plus" class = "size-4.5" />
1364- </ Button >
1365- </ TooltipKeybind >
1366-
1351+ < div class = "flex items-center gap-1 pointer-events-auto" >
13671352 < Tooltip
13681353 placement = "top"
13691354 inactive = { ! prompt . dirty ( ) && ! working ( ) }
@@ -1400,42 +1385,30 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
14001385 </ div >
14011386
14021387 < div class = "pointer-events-none absolute bottom-2 left-2" >
1403- < div class = "pointer-events-auto" >
1388+ < div
1389+ aria-hidden = { store . mode !== "normal" }
1390+ class = "pointer-events-auto"
1391+ style = { {
1392+ "pointer-events" : buttonsSpring ( ) > 0.5 ? "auto" : "none" ,
1393+ } }
1394+ >
14041395 < TooltipKeybind
14051396 placement = "top"
1406- gutter = { 8 }
1407- title = { language . t (
1408- accepting ( ) ? "command.permissions.autoaccept.disable" : "command.permissions.autoaccept.enable" ,
1409- ) }
1410- keybind = { command . keybind ( "permissions.autoaccept" ) }
1397+ title = { language . t ( "prompt.action.attachFile" ) }
1398+ keybind = { command . keybind ( "file.attach" ) }
14111399 >
14121400 < Button
1413- data-action = "prompt-permissions"
1401+ data-action = "prompt-attach"
1402+ type = "button"
14141403 variant = "ghost"
1415- onClick = { ( ) => {
1416- if ( ! params . id ) {
1417- permission . toggleAutoAcceptDirectory ( sdk . directory )
1418- return
1419- }
1420- permission . toggleAutoAccept ( params . id , sdk . directory )
1421- } }
1422- classList = { {
1423- "size-6 flex items-center justify-center" : true ,
1424- "text-text-base" : ! accepting ( ) ,
1425- "hover:bg-surface-success-base" : accepting ( ) ,
1426- } }
1427- aria-label = {
1428- accepting ( )
1429- ? language . t ( "command.permissions.autoaccept.disable" )
1430- : language . t ( "command.permissions.autoaccept.enable" )
1431- }
1432- aria-pressed = { accepting ( ) }
1404+ class = "size-8 p-0"
1405+ style = { buttons ( ) }
1406+ onClick = { pick }
1407+ disabled = { store . mode !== "normal" }
1408+ tabIndex = { store . mode === "normal" ? undefined : - 1 }
1409+ aria-label = { language . t ( "prompt.action.attachFile" ) }
14331410 >
1434- < Icon
1435- name = "chevron-double-right"
1436- size = "small"
1437- classList = { { "text-icon-success-base" : accepting ( ) } }
1438- />
1411+ < Icon name = "plus" class = "size-4.5" />
14391412 </ Button >
14401413 </ TooltipKeybind >
14411414 </ div >
@@ -1468,8 +1441,8 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
14681441 options = { agentNames ( ) }
14691442 current = { local . agent . current ( ) ?. name ?? "" }
14701443 onSelect = { local . agent . set }
1471- class = "capitalize max-w-[160px]"
1472- valueClass = "truncate text-13-regular"
1444+ class = "capitalize max-w-[160px] text-text-base "
1445+ valueClass = "truncate text-13-regular text-text-base "
14731446 triggerStyle = { control ( ) }
14741447 variant = "ghost"
14751448 />
@@ -1487,7 +1460,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
14871460 as = "div"
14881461 variant = "ghost"
14891462 size = "normal"
1490- class = "min-w-0 max-w-[320px] text-13-regular group"
1463+ class = "min-w-0 max-w-[320px] text-13-regular text-text-base group"
14911464 style = { control ( ) }
14921465 onClick = { ( ) => dialog . show ( ( ) => < DialogSelectModelUnpaid /> ) }
14931466 >
@@ -1518,7 +1491,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
15181491 variant : "ghost" ,
15191492 size : "normal" ,
15201493 style : control ( ) ,
1521- class : "min-w-0 max-w-[320px] text-13-regular group" ,
1494+ class : "min-w-0 max-w-[320px] text-13-regular text-text-base group" ,
15221495 } }
15231496 >
15241497 < Show when = { local . model . current ( ) ?. provider ?. id } >
@@ -1547,12 +1520,34 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
15471520 current = { local . model . variant . current ( ) ?? "default" }
15481521 label = { ( x ) => ( x === "default" ? language . t ( "common.default" ) : x ) }
15491522 onSelect = { ( x ) => local . model . variant . set ( x === "default" ? undefined : x ) }
1550- class = "capitalize max-w-[160px]"
1551- valueClass = "truncate text-13-regular"
1523+ class = "capitalize max-w-[160px] text-text-base "
1524+ valueClass = "truncate text-13-regular text-text-base "
15521525 triggerStyle = { control ( ) }
15531526 variant = "ghost"
15541527 />
15551528 </ TooltipKeybind >
1529+ < TooltipKeybind
1530+ placement = "top"
1531+ gutter = { 8 }
1532+ title = { acceptLabel ( ) }
1533+ keybind = { command . keybind ( "permissions.autoaccept" ) }
1534+ >
1535+ < Button
1536+ data-action = "prompt-permissions"
1537+ variant = "ghost"
1538+ onClick = { toggleAccept }
1539+ classList = { {
1540+ "h-7 w-7 p-0 shrink-0 flex items-center justify-center" : true ,
1541+ "text-text-base" : ! accepting ( ) ,
1542+ "hover:bg-surface-success-base" : accepting ( ) ,
1543+ } }
1544+ style = { control ( ) }
1545+ aria-label = { acceptLabel ( ) }
1546+ aria-pressed = { accepting ( ) }
1547+ >
1548+ < Icon name = "shield" size = "small" classList = { { "text-icon-success-base" : accepting ( ) } } />
1549+ </ Button >
1550+ </ TooltipKeybind >
15561551 </ div >
15571552 </ div >
15581553 </ div >
0 commit comments