@@ -418,14 +418,30 @@ function classifyToolItemType(toolName: string): CanonicalItemType {
418418 if (
419419 normalized . includes ( "edit" ) ||
420420 normalized . includes ( "write" ) ||
421- normalized . includes ( "file" ) ||
422421 normalized . includes ( "patch" ) ||
423422 normalized . includes ( "replace" ) ||
424423 normalized . includes ( "create" ) ||
425- normalized . includes ( "delete" )
424+ normalized . includes ( "delete" ) ||
425+ normalized . includes ( "notebookedit" )
426426 ) {
427427 return "file_change" ;
428428 }
429+ if (
430+ normalized === "read" ||
431+ normalized . includes ( "glob" ) ||
432+ normalized . includes ( "grep" ) ||
433+ normalized . includes ( "search" ) ||
434+ normalized . includes ( "list" ) ||
435+ normalized . includes ( "find" ) ||
436+ normalized . includes ( "view" ) ||
437+ normalized . includes ( "ls" ) ||
438+ normalized . includes ( "cat" )
439+ ) {
440+ return "file_read" ;
441+ }
442+ if ( normalized . includes ( "file" ) ) {
443+ return "file_change" ;
444+ }
429445 if ( normalized . includes ( "mcp" ) ) {
430446 return "mcp_tool_call" ;
431447 }
@@ -476,12 +492,14 @@ function summarizeToolRequest(toolName: string, input: Record<string, unknown>):
476492 return `${ toolName } : ${ serialized . slice ( 0 , 397 ) } ...` ;
477493}
478494
479- function titleForTool ( itemType : CanonicalItemType ) : string {
495+ function titleForTool ( itemType : CanonicalItemType , toolName ?: string ) : string {
480496 switch ( itemType ) {
481497 case "command_execution" :
482498 return "Command run" ;
483499 case "file_change" :
484500 return "File change" ;
501+ case "file_read" :
502+ return titleForReadTool ( toolName ) ;
485503 case "mcp_tool_call" :
486504 return "MCP tool call" ;
487505 case "collab_agent_tool_call" :
@@ -497,6 +515,19 @@ function titleForTool(itemType: CanonicalItemType): string {
497515 }
498516}
499517
518+ function titleForReadTool ( toolName ?: string ) : string {
519+ if ( ! toolName ) return "Read" ;
520+ const normalized = toolName . toLowerCase ( ) ;
521+ if ( normalized === "read" ) return "Read file" ;
522+ if ( normalized . includes ( "glob" ) ) return "Glob search" ;
523+ if ( normalized . includes ( "grep" ) ) return "Grep search" ;
524+ if ( normalized . includes ( "search" ) ) return "Search" ;
525+ if ( normalized . includes ( "list" ) || normalized . includes ( "ls" ) ) return "List files" ;
526+ if ( normalized . includes ( "find" ) ) return "Find files" ;
527+ if ( normalized . includes ( "view" ) ) return "View file" ;
528+ return "Read" ;
529+ }
530+
500531const SUPPORTED_CLAUDE_IMAGE_MIME_TYPES = new Set ( [
501532 "image/gif" ,
502533 "image/jpeg" ,
@@ -1652,7 +1683,7 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (
16521683 itemId,
16531684 itemType,
16541685 toolName,
1655- title : titleForTool ( itemType ) ,
1686+ title : titleForTool ( itemType , toolName ) ,
16561687 detail,
16571688 input : toolInput ,
16581689 partialInputJson : "" ,
0 commit comments