fix(diagnostic): ARIA-Datei-Bubbles (Bilder) tragen project_id — kein Ausblenden mehr
Regression aus dem chat_history-projectId-Fix: nach dem History-Reload laeuft jetzt updateChatVisibilityByFocus(). addAriaFile() setzte aber kein dataset.projectId → Datei-/Bild-Bubbles galten als Hauptchat und wurden ausgeblendet, sobald der (aus localStorage wiederhergestellte) Focus auf einem Projekt lag. In der App trat das nicht auf (datengetriebener Filter mit korrektem projectId). - addAriaFile(): setzt dataset.projectId aus p.projectId und respektiert beim Live-Anhaengen den aktuellen Focus (wie addChat via hiddenByFocus). - chat_history-Renderer: reicht m.projectId an addAriaFile weiter. - Bridge _process_core_response: haengt turn_pid als f["projectId"] an die file_from_aria-Payload, damit der Live-Pfad die Zuordnung kennt. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+10
-1
@@ -1910,7 +1910,7 @@
|
||||
const m = msg.messages[mi];
|
||||
try {
|
||||
if (m.type === 'aria_file') {
|
||||
addAriaFile({ serverPath: m.serverPath, name: m.name, mimeType: m.mimeType, size: m.size, deleted: m.deleted });
|
||||
addAriaFile({ serverPath: m.serverPath, name: m.name, mimeType: m.mimeType, size: m.size, deleted: m.deleted, projectId: m.projectId });
|
||||
continue;
|
||||
}
|
||||
const cleaned = (m.text || '').replace(/\[FILE:\s*\/shared\/uploads\/[^\]]+\]/gi, '').replace(/\n{3,}/g, '\n\n').trim();
|
||||
@@ -2343,6 +2343,15 @@
|
||||
const el = document.createElement('div');
|
||||
el.className = 'chat-msg received';
|
||||
el.dataset.ariaFilePath = serverPath;
|
||||
// Kontext-Zuordnung fuer den Focus-Filter — ohne das wurde die
|
||||
// Datei-Bubble beim Reload ausgeblendet wenn ein Projekt fokussiert war.
|
||||
const filePid = p.projectId || '';
|
||||
el.dataset.projectId = filePid;
|
||||
// Beim Live-Anhaengen den aktuellen Focus respektieren (wie addChat),
|
||||
// sonst blitzt eine Projekt-Datei kurz im Hauptchat auf.
|
||||
if (typeof focusedContextId === 'string' && filePid !== focusedContextId) {
|
||||
el.style.display = 'none';
|
||||
}
|
||||
if (deleted) el.dataset.deleted = '1';
|
||||
el.innerHTML = html;
|
||||
box.appendChild(el);
|
||||
|
||||
Reference in New Issue
Block a user