@@ -1154,43 +1154,34 @@ export class AgenticChatController implements ChatHandlers {
11541154
11551155 // For file operations and other tools, create appropriate confirmation UI
11561156 let header : {
1157- body : string
1157+ body : string | undefined
11581158 status : { status : 'info' | 'success' | 'warning' | 'error' ; icon : string ; text : string }
11591159 }
1160- let body : string
1160+ let body : string | undefined
11611161
11621162 switch ( toolName ) {
11631163 case 'fsWrite' :
1164- const writeFilePath = ( toolUse . input as unknown as FsWriteParams ) . path
11651164 header = {
1166- body : 'File Write' ,
1165+ body : undefined ,
11671166 status : {
1168- status : isAccept ? 'success' : 'error ',
1169- icon : isAccept ? 'ok' : 'cancel ',
1170- text : isAccept ? 'Allowed' : 'Rejected ',
1167+ status : 'success' ,
1168+ icon : 'ok' ,
1169+ text : 'Allowed' ,
11711170 } ,
11721171 }
1173- body = isAccept
1174- ? `File modification allowed: \`${ writeFilePath } \``
1175- : `File modification rejected: \`${ writeFilePath } \``
11761172 break
11771173
11781174 case 'fsRead' :
11791175 case 'listDirectory' :
11801176 // Common handling for read operations
1181- const path = ( toolUse . input as unknown as FsReadParams | ListDirectoryParams ) . path
1182- const isDirectory = toolName === 'listDirectory'
11831177 header = {
1184- body : isDirectory ? 'Directory Listing' : 'File Read' ,
1178+ body : undefined ,
11851179 status : {
1186- status : isAccept ? 'success' : 'error ',
1187- icon : isAccept ? 'ok' : 'cancel ',
1188- text : isAccept ? 'Allowed' : 'Rejected ',
1180+ status : 'success' ,
1181+ icon : 'ok' ,
1182+ text : 'Allowed' ,
11891183 } ,
11901184 }
1191- body = isAccept
1192- ? `${ isDirectory ? 'Directory listing' : 'File read' } allowed: \`${ path } \``
1193- : `${ isDirectory ? 'Directory listing' : 'File read' } rejected: \`${ path } \``
11941185 break
11951186
11961187 case 'fileSearch' :
@@ -1341,8 +1332,8 @@ export class AgenticChatController implements ChatHandlers {
13411332 } ,
13421333 ]
13431334 header = {
1344- icon : 'warning ' ,
1345- iconForegroundStatus : 'warning ' ,
1335+ icon : 'tools ' ,
1336+ iconForegroundStatus : 'tools ' ,
13461337 body : '#### Allow read-only tools outside your workspace' ,
13471338 buttons,
13481339 }
0 commit comments