Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/server/src/provider/Layers/CodexAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,19 @@ function itemTitle(itemType: CanonicalItemType): string | undefined {
}

function itemDetail(item: CodexLifecycleItem): string | undefined {
const itemType = toCanonicalItemType(item.type);
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
const itemRecord = item as Record<string, unknown>;
const action = itemRecord.action as Record<string, unknown> | undefined;
const candidates = [
...(itemType === "web_search" ? [itemRecord.query, action?.query, action?.url] : []),
"command" in item ? item.command : undefined,
"title" in item ? item.title : undefined,
"summary" in item ? item.summary : undefined,
"text" in item ? item.text : undefined,
"path" in item ? item.path : undefined,
"prompt" in item ? item.prompt : undefined,
];

Comment thread
cursor[bot] marked this conversation as resolved.
for (const candidate of candidates) {
const trimmed = typeof candidate === "string" ? trimText(candidate) : undefined;
if (!trimmed) continue;
Expand Down
Loading