@@ -192,15 +192,7 @@ export function parseToolCallDetails(
192192 const filePath = args . path ;
193193 let fileLabel = filePath ? toFileLabel ( filePath ) : undefined ;
194194
195- if ( fileLabel === undefined ) {
196- fileLabel = filePath ;
197-
198- return {
199- toolName : fileLabel ? ( `Read ${ fileLabel } ` + ( parsedRange ? `, lines ${ parsedRange . start } to ${ parsedRange . end } ` : '' ) ) : 'Read repository' ,
200- invocationMessage : fileLabel ? ( `Read ${ fileLabel } ` + ( parsedRange ? `, lines ${ parsedRange . start } to ${ parsedRange . end } ` : '' ) ) : 'Read repository' ,
201- pastTenseMessage : fileLabel ? ( `Read ${ fileLabel } ` + ( parsedRange ? `, lines ${ parsedRange . start } to ${ parsedRange . end } ` : '' ) ) : 'Read repository' ,
202- } ;
203- } else if ( fileLabel === '' ) {
195+ if ( fileLabel === undefined || fileLabel === '' ) {
204196 return {
205197 toolName : 'Read repository' ,
206198 invocationMessage : 'Read repository' ,
@@ -250,7 +242,7 @@ export function parseToolCallDetails(
250242 filePath : filePath ,
251243 fileLabel : fileLabel ,
252244 } : undefined
253- }
245+ } ;
254246 } else if ( name === 'create' ) {
255247 const filePath = args . path ;
256248 const fileLabel = filePath && toFileLabel ( filePath ) ;
@@ -264,7 +256,7 @@ export function parseToolCallDetails(
264256 filePath : filePath ,
265257 fileLabel : fileLabel ,
266258 } : undefined
267- }
259+ } ;
268260 } else if ( name === 'view' ) {
269261 const filePath = args . path ;
270262 const fileLabel = filePath && toFileLabel ( filePath ) ;
@@ -319,12 +311,12 @@ export function parseToolCallDetails(
319311 return {
320312 toolName : 'read_bash' ,
321313 invocationMessage : 'Read logs from Bash session'
322- }
314+ } ;
323315 } else if ( name === 'stop_bash' ) {
324316 return {
325317 toolName : 'stop_bash' ,
326318 invocationMessage : 'Stop Bash session'
327- }
319+ } ;
328320 } else {
329321 // Unknown tool type
330322 return {
0 commit comments