Skip to content

Commit 3342618

Browse files
fix(codex): show web search query and url in tool call details
1 parent ada410b commit 3342618

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎apps/server/src/provider/Layers/CodexAdapter.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,19 @@ function itemTitle(itemType: CanonicalItemType): string | undefined {
250250
}
251251

252252
function itemDetail(item: CodexLifecycleItem): string | undefined {
253+
const itemType = toCanonicalItemType(item.type);
254+
const itemRecord = item as Record<string, unknown>;
255+
const action = itemRecord.action as Record<string, unknown> | undefined;
253256
const candidates = [
257+
...(itemType === "web_search" ? [itemRecord.query, action?.query, action?.url] : []),
254258
"command" in item ? item.command : undefined,
255259
"title" in item ? item.title : undefined,
256260
"summary" in item ? item.summary : undefined,
257261
"text" in item ? item.text : undefined,
258262
"path" in item ? item.path : undefined,
259263
"prompt" in item ? item.prompt : undefined,
260264
];
265+
261266
for (const candidate of candidates) {
262267
const trimmed = typeof candidate === "string" ? trimText(candidate) : undefined;
263268
if (!trimmed) continue;

0 commit comments

Comments
 (0)