@@ -346,7 +346,6 @@ async function executeSingleStrReplace(
346346 type : 'tool_result' ,
347347 toolName : toolResultPart . toolName ,
348348 toolCallId : toolCall . toolCallId ,
349- toolName : 'str_replace' ,
350349 output : toolResult ,
351350 } )
352351
@@ -492,9 +491,8 @@ function handleStrReplaceError(params: {
492491 toolResults . push ( errorResult )
493492 onResponseChunk ( {
494493 type : 'tool_result' ,
495- toolName : errorResult . toolName ,
494+ toolName : errorResult . toolName || 'str_replace' ,
496495 toolCallId : toolCall . toolCallId ,
497- toolName : 'str_replace' ,
498496 output : errorResult . output ,
499497 } )
500498}
@@ -880,9 +878,8 @@ async function applyBenchifyResultSafely(params: {
880878 // Notify client about the benchify update
881879 onResponseChunk ( {
882880 type : 'tool_result' ,
883- toolName : benchifyToolResult . toolName ,
881+ toolName : benchifyToolResult . toolName || 'str_replace' ,
884882 toolCallId : relatedToolCall . toolCallId ,
885- toolName : 'str_replace' ,
886883 output : benchifyToolResult . output ,
887884 } )
888885
0 commit comments