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:
@@ -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 '';
|
||||
|
||||
Reference in New Issue
Block a user