fix(diagnostic): keine untagged ARIA-Bubbles/Backup-Writes mehr (leere Projekte)
Das Dashboard hatte dieselbe Ursache wie die App (untagged Nachrichten in
chat_backup) PLUS zwei eigene untagged-Pfade ueber den Gateway-Watch:
- Frontend: chat_final rendert keine Chat-Bubble mehr. ARIA-Antworten kommen
ausschliesslich via rvs_chat (traegt projectId). chat_final stammt vom
Gateway-Watch ohne projectId → erzeugte eine Duplikat-Bubble im Hauptchat.
- server.js: kein chat_backup-Write im Gateway-final-Handler mehr. Die Bridge
(_process_core_response) ist massgeblicher Writer und schreibt MIT project_id;
der Write hier erzeugte untagged Duplikate, die beim Reload im Hauptchat
statt im Projekt landeten.
Der App-Focus-Fix (63dde65) sorgt dafuer dass neue Nachrichten ueberhaupt
getaggt in chat_backup landen — davon profitiert das Dashboard direkt.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1751,7 +1751,11 @@
|
||||
}
|
||||
|
||||
if (msg.type === 'chat_final') {
|
||||
addChat('received', msg.text || '', 'chat:final');
|
||||
// KEINE Bubble mehr rendern: ARIA-Antworten kommen ausschliesslich via
|
||||
// rvs_chat (traegt projectId → landet im richtigen Kontext). chat_final
|
||||
// stammt vom Gateway-Watch und hat KEINE projectId — wuerde also eine
|
||||
// untagged Duplikat-Bubble im Hauptchat erzeugen. Nur noch als
|
||||
// Aktivitaets-/Trace-Ende-Signal relevant (das macht der Server).
|
||||
return;
|
||||
}
|
||||
if (msg.type === 'file_from_aria') {
|
||||
|
||||
@@ -660,11 +660,11 @@ function handleGatewayMessage(msg) {
|
||||
broadcast({ type: "agent_activity", activity: "idle" });
|
||||
pendingMessageTime = 0; // Watchdog: Antwort erhalten
|
||||
updateAgentActivity();
|
||||
// Antwort in Backup-Log schreiben
|
||||
try {
|
||||
const entry = JSON.stringify({ ts: Date.now(), role: "assistant", text: text.slice(0, 2000), session: activeSessionKey }) + "\n";
|
||||
fs.appendFileSync("/shared/config/chat_backup.jsonl", entry);
|
||||
} catch {}
|
||||
// KEIN chat_backup-Write mehr hier: die Bridge (_process_core_response)
|
||||
// ist der massgebliche Writer und schreibt den Assistant-Eintrag MIT
|
||||
// project_id. Dieser Gateway-Watch-Pfad kennt die project_id nicht —
|
||||
// ein Write hier erzeugte ein untagged Duplikat, das beim Reload im
|
||||
// Hauptchat auftaucht (statt im Projekt).
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user