Attachment-Indicator auch in archivierten Nachrichten anzeigen
This commit is contained in:
1 parent
4e3d92ff9f
commit
01c5bedb6d
1 file changed
+12
@@ -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';
|
||||
|
||||
Reference in new issue
Block a user