From a5ab078132db10eaca0c77e8d26e36149db8340c Mon Sep 17 00:00:00 2001 From: lyon Date: Tue, 16 Jun 2026 00:59:49 +0800 Subject: [PATCH] fix: summarize web search tool calls --- src/backend/codex-stdio.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/codex-stdio.ts b/src/backend/codex-stdio.ts index a4a1a4f..d5c08e9 100644 --- a/src/backend/codex-stdio.ts +++ b/src/backend/codex-stdio.ts @@ -985,13 +985,13 @@ function toolCallName(item: JsonRecord, itemType: string): string { function toolCallCommandSummary(item: JsonRecord, itemType: string, toolName: string): string | null { const direct = typeof item.command === "string" && item.command.trim().length > 0 ? item.command : null; if (direct) return direct; - if (itemType !== "mcpToolCall" && itemType !== "dynamicToolCall") return null; const input = toolCallInputSummary(item); - return input ? `${toolName} ${input}` : toolName; + if (itemType === "webSearch" || itemType === "mcpToolCall" || itemType === "dynamicToolCall") return input ? `${toolName} ${input}` : toolName; + return null; } function toolCallInputSummary(item: JsonRecord): string | null { - for (const key of ["arguments", "args", "input", "params", "parameters"] as const) { + for (const key of ["arguments", "args", "input", "params", "parameters", "query", "searchQuery", "url", "urls"] as const) { if (!Object.prototype.hasOwnProperty.call(item, key)) continue; const value = item[key]; if (value === null || value === undefined) continue;