Attachment-Indicator auch in archivierten Nachrichten anzeigen

This commit is contained in:
Meleki committed 2026-02-27 09:08:15 +01:00
1 parent 4e3d92ff9f
commit 01c5bedb6d
1 file changed
+12
+12
View File
@@ -111,6 +111,18 @@ async function loadLatestArchive() {
case 'text':
div.className = msg.role === 'user' ? 'msg user archived' : 'msg assistant archived';
div.textContent = msg.content;
if (msg.role === 'user' && msg.attachmentCount > 0) {
let names = [];
try { if (msg.attachmentNames) names = JSON.parse(msg.attachmentNames); } catch {}
const nameList = names.filter(n => n).join(', ');
const ind = document.createElement('div');
ind.className = 'attachment-indicator';
ind.textContent = `📎 ${msg.attachmentCount} Datei${msg.attachmentCount > 1 ? 'en' : ''}` + (nameList ? `: ${nameList}` : '');
ind.style.cursor = 'pointer';
ind.title = 'Klicken zum Anzeigen';
ind.addEventListener('click', () => loadAndShowAttachments(msg.id, ind));
div.appendChild(ind);
}
break;
case 'tool_use':
div.className = 'tool-box archived';