fix: deduplicate desktop notifications and tighten notification text extraction

Desktop notifications no longer duplicate when native delivery succeeds
Reasoning chain-of-thought is excluded from notification body text
Untyped message parts are ignored in notification text extraction
This commit is contained in:
Bohdan Triapitsyn
2026-06-16 15:21:27 +03:00
parent 6ea8fb357d
commit 91de51d1a5
7 changed files with 144 additions and 46 deletions
+1 -1
View File
@@ -1520,7 +1520,7 @@ const extractNotificationTextFromParts = (parts: unknown): string => {
.map((part) => {
if (!part || typeof part !== 'object') return '';
const entry = part as { type?: unknown; text?: unknown; content?: unknown };
if (entry.type === 'text' || typeof entry.text === 'string' || typeof entry.content === 'string') {
if (entry.type === 'text') {
return typeof entry.text === 'string' ? entry.text : typeof entry.content === 'string' ? entry.content : '';
}
return '';