This commit is contained in:
kim
2026-04-29 17:34:36 +09:00
parent ee10549c5a
commit 4324985508
5 changed files with 108 additions and 45 deletions
+2 -11
View File
@@ -4166,7 +4166,7 @@ function renderFileDownloads(steps, processEntries) {
return urls;
}
// Collect /api/files/ URLs from all available sources
// Collect /api/files/ URLs from this message's own data only (not global log)
const allUrls = [];
// 1. msg.steps (legacy step events)
@@ -4185,16 +4185,7 @@ function renderFileDownloads(steps, processEntries) {
}
}
// 3. Global processLogEntries (current session's live log)
try {
const entries = (typeof processLogEntries !== 'undefined' && Array.isArray(processLogEntries)) ? processLogEntries : [];
for (const e of entries) {
const txt = String(e.content || '');
if (txt.indexOf('/api/files/') !== -1) allUrls.push(...extractUrls(txt));
}
} catch {}
// 4. msg.content itself (LLM may include the link in its reply)
// 3. msg.content itself (LLM may include the link in its reply)
if (arguments.length > 2 && arguments[2]) {
const contentText = String(arguments[2]);
if (contentText.indexOf('/api/files/') !== -1) allUrls.push(...extractUrls(contentText));