fix(diagnostic): [FILE: ...]-Marker aus chat_final rausfiltern

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-10 18:26:35 +02:00
parent f49f3c3b08
commit c8dee4c416
+6 -1
View File
@@ -993,7 +993,12 @@
}
if (msg.type === 'chat_final') {
addChat('received', msg.text, 'chat:final');
// [FILE: /shared/uploads/aria_xxx.ext]-Marker aus dem Antworttext
// entfernen — die Datei kommt separat via file_from_aria.
// (Diagnostic empfaengt chat_final direkt vom Gateway, Bridge
// hat darum nicht filtern koennen.)
const cleaned = (msg.text || '').replace(/\[FILE:\s*\/shared\/uploads\/[^\]]+\]/gi, '').replace(/\n{3,}/g, '\n\n').trim();
addChat('received', cleaned, 'chat:final');
return;
}
if (msg.type === 'file_from_aria') {