mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-17 13:13:35 +08:00
Desktop users already receive native notifications for permission prompts, but long-running turns can finish with only a final Markdown reply while the app is out of focus. The completion path now treats a non-empty assistant reply as a notifiable terminal event and reuses the existing desktop notification settings, dedupe, and cooldown behavior. Constraint: Notification permission must still be controlled by the existing desktopNotificationsEnabled setting and native OS authorization. Rejected: Send from status idle events | idle is also used by prewarm, clear, stop, and other non-reply transitions. Rejected: Notify on every message_complete | empty completions and post-stop tail completions would create noisy false positives. Confidence: high Scope-risk: narrow Directive: Keep completion notifications tied to finalized assistant text, not generic idle/status transitions. Tested: bun run test -- src/stores/chatStore.test.ts Tested: bun run check:desktop Not-tested: Manual macOS notification center click-through behavior