The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 24, 20:15 UTC
fix(codex): show web search query and url in tool call details (#2093)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Guilherme Vieira committed
Jul 20, 2026 at 09:58 UTC
33f1cb422461bf0f072b9f181734e9b654d1ca69
1 file changed
+10
-3
apps/server/src/provider/Layers/CodexAdapter.ts
+10
-3
@@ -267,8 +267,14 @@ function itemTitle(itemType: CanonicalItemType, item?: CodexLifecycleItem): stri
267
}
268
}
269
270
-function itemDetail(item: CodexLifecycleItem): string | undefined {
270
+function itemDetail(itemType: CanonicalItemType, item: CodexLifecycleItem): string | undefined {
271
+ const itemRecord = item as Record<string, unknown>;
272
+ const action = itemRecord.action as Record<string, unknown> | undefined;
273
+ const actionQueries = Array.isArray(action?.queries) ? action.queries : [];
274
const candidates = [
275
+ ...(itemType === "web_search"
276
+ ? [itemRecord.query, action?.query, ...actionQueries, action?.pattern, action?.url]
277
+ : []),
278
"command" in item ? item.command : undefined,
279
"title" in item ? item.title : undefined,
280
"summary" in item ? item.summary : undefined,
@@ -276,6 +282,7 @@ function itemDetail(item: CodexLifecycleItem): string | undefined {
282
"path" in item ? item.path : undefined,
283
"prompt" in item ? item.prompt : undefined,
284
];
285
+
286
for (const candidate of candidates) {
287
const trimmed = typeof candidate === "string" ? trimText(candidate) : undefined;
288
if (!trimmed) continue;
@@ -465,7 +472,7 @@ function mapItemLifecycle(
472
return undefined;
473
}
474
468
- const detail = itemDetail(item);
475
+ const detail = itemDetail(itemType, item);
476
const status =
477
lifecycle === "item.started"
478
? "inProgress"
@@ -839,7 +846,7 @@ function mapToRuntimeEvents(
846
}
847
const itemType = toCanonicalItemType(item.type);
848
if (itemType === "plan") {
842
- const detail = itemDetail(item);
849
+ const detail = itemDetail(itemType, item);
850
if (!detail) {
851
return [];
852
}