Feature: model-triggerable desktop notification tool
Summary
DeepSeek TUI has a notification system (notifications.rs) that fires after long agent turns, but the LLM itself has no way to trigger a desktop notification on demand. This is a design gap compared to Claude Code and Codex, where the model can proactively alert the user (e.g., "5 seconds elapsed, ready for input").
Current state
crates/tui/src/tui/notifications.rsimplements OSC 9 / BEL notificationsnotify_done()is called only from the engine's turn-completion pathresolve_method()auto-detects the terminal and picks OSC 9 or BEL- There is no tool or internal API exposed to the model for triggering notifications
Use cases
- Timer / reminder: "ping me in 30 seconds"
- Background task completion: "I finished processing that large file, come back"
- Async workflow: model spawns sub-agents, wants to notify user when they return
- "Let me think about this for a moment" → notification when ready
Possible implementation
- New tool (
notify_userordesktop_notification) — model calls it with a message string and optional delay. Writes the OSC 9 / BEL escape to stdout (or callsterminal-notifieron macOS,notify-sendon Linux, WinRT toast on Windows). - Reuse existing
notify_doneinfrastructure — expose it via a tool that callsnotify_done(Method::Auto, ...)directly. - Config-driven — a
[notifications].model_triggerable = truetoggle.
The tool should respect the user's existing notification configuration (method, threshold, etc.) and degrade gracefully on unsupported platforms.
I think https://github.com/rullerzhou-afk/clawd-on-desk is a solid source of inspiration. If needed,could probably port it over to DeepSeekTUI, but it might have to draw some whale animations for it haha.
It would be good to have a notification, we need a tool to indicate when the work reaches a certain stage. I'll take a look
Implemented in v0.8.27 (releasing shortly).
The new built-in notify tool is always-loaded (no ToolSearch round-trip), with this contract:
{ "title": "build done", "body": "all 2620 tests passed" }
Delivery routes through the existing tui::notifications infrastructure, so your [notifications].method config in ~/.deepseek/config.toml drives behavior:
- iTerm2 / Ghostty / WezTerm → OSC 9 (banner + sound)
- macOS / Linux fallback → BEL
- Windows → off by default (opt-in to BEL + MessageBeep)
method = "off"→ silent no-op (the tool still succeeds)
The tool description steers the model toward "long task done / needs attention" use cases and away from chatter. Title and body are length-capped (80 / 200 chars on character boundaries, so multi-byte glyphs aren't sliced) and tmux passthrough is detected via $TMUX so OSC 9 reaches the outer terminal.
notify-rust was not added — reusing the existing tui::notifications pipeline avoids a new external dependency and keeps the user's existing config the single source of truth.
Once v0.8.27 ships, please update with one of:
- npm:
npm install -g deepseek-tui@latest - brew:
brew upgrade deepseek-tui - cargo:
cargo install --force deepseek-tui-cli
Thanks for the request — and to @THINKER-ONLY and @punkcanyang for the references and offer to take it on. Reopen if you want a richer notification surface (icon, action buttons, native toast) and we can layer that on next.