Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): show web search query and url in tool call details #2093

MergedGuilhermeVieiraDev(GitHub profile, opens in a new tab)merged 9 commits intomain fromrefs/pull/2093/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 10 additions and 3 deletions.

x
0 of 1 viewed, 1 left
10 additions and 3 deletionsapps/server/src/provider/Layers/CodexAdapter.tsModified
View file
@@ -267,8 +267,14 @@
​
-function itemDetail(item: CodexLifecycleItem): string | undefined {
+function itemDetail(itemType: CanonicalItemType, item: CodexLifecycleItem): string | undefined {
+ const itemRecord = item as Record<string, unknown>;
+ const action = itemRecord.action as Record<string, unknown> | undefined;
+ const actionQueries = Array.isArray(action?.queries) ? action.queries : [];
const candidates = [
+ ...(itemType === "web_search"
+ ? [itemRecord.query, action?.query, ...actionQueries, action?.pattern, action?.url]
+ : []),
"command" in item ? item.command : undefined,
"title" in item ? item.title : undefined,
"summary" in item ? item.summary : undefined,
@@ -276,6 +282,7 @@
"path" in item ? item.path : undefined,
"prompt" in item ? item.prompt : undefined,
+​
for (const candidate of candidates) {
const trimmed = typeof candidate === "string" ? trimText(candidate) : undefined;
if (!trimmed) continue;
@@ -465,7 +472,7 @@
return undefined;