v1.0.4
This commit is contained in:
+2
-11
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user