Skip to content

Commit 16c7613

Browse files
committed
fix(tooling): include toolName in print-mode events
1 parent c75cc23 commit 16c7613

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ async function executeSingleStrReplace(
345345
onResponseChunk({
346346
type: 'tool_result',
347347
toolCallId: toolCall.toolCallId,
348+
toolName: 'str_replace',
348349
output: toolResult,
349350
})
350351

@@ -491,6 +492,7 @@ function handleStrReplaceError(params: {
491492
onResponseChunk({
492493
type: 'tool_result',
493494
toolCallId: toolCall.toolCallId,
495+
toolName: 'str_replace',
494496
output: errorResult.output,
495497
})
496498
}
@@ -877,6 +879,7 @@ async function applyBenchifyResultSafely(params: {
877879
onResponseChunk({
878880
type: 'tool_result',
879881
toolCallId: relatedToolCall.toolCallId,
882+
toolName: 'str_replace',
880883
output: benchifyToolResult.output,
881884
})
882885

common/src/types/print-mode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export type PrintModeToolCall = z.infer<typeof printModeToolCallSchema>
3737
export const printModeToolResultSchema = z.object({
3838
type: z.literal('tool_result'),
3939
toolCallId: z.string(),
40+
toolName: z.string().optional(),
4041
output: toolResultOutputSchema.array(),
4142
parentAgentId: z.string().optional(),
4243
})

0 commit comments

Comments
 (0)