Skip to content

Commit cf5f179

Browse files
committed
chore: keep toolName optional when merging results
1 parent 05e4e88 commit cf5f179

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

backend/src/tools/batch-str-replace.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)