agentscope-ai / agentscope-ai/QwenPaw
[Feature]: System notification when a response or task completes while the Console/Desktop app is not focused
- 主要言語
- Python
- スター
- 34.9k
- フォーク
- 3.1k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 225
説明
## Summary
Add optional OS-level notifications (toast/banner) that fire when the agent finishes a response or a long-running task completes, so users who switch away from the Console/Desktop app know immediately when work is done.
## Component(s) Affected
- [ ] Core / Backend (app, agents, config, providers, utils, local_models)
- [x] Console (frontend web UI)
- [ ] Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
- [ ] Skills
- [ ] CLI
- [ ] Documentation (website)
- [ ] Tests
- [ ] CI/CD
- [ ] Scripts / Deploy
## Problem / Motivation
Agent runs can take minutes — image batches, code generation, builds, multi-step tool chains. Users naturally switch to another window (game engine, editor, browser) while waiting. Currently there is no way to know the run has finished without periodically alt-tabbing back to check. That means either wasted time polling the app, or forgotten completed tasks sitting idle.
This is a standard quality-of-life feature in comparable tools: most chat/agent apps and IDEs notify on completion when unfocused (e.g. CI systems, build tools, Discord/Slack mentions, Claude Code's terminal bell, ChatGPT desktop notifications).
Who benefits: anyone running long tasks — especially developers and game developers running asset/code pipelines who keep the app in the background.
## Proposed Solution
Fire a system notification when **both** of these are true:
1. A run transitions to a completed state (response finished, task succeeded/failed, approval needed), and
2. The app window/tab is not focused (or is minimised).
Suggested behaviour and settings (all optional except the master toggle):
- **Master toggle** in Settings: "Notify when a response completes" (default: on or off — either is fine).
- **Only when unfocused** (default: on) — suppress notifications while the user is already looking at the app.
- **Click-to-focus**: clicking the notification focuses the app and jumps to the relevant chat.
- **Failure vs success**: optionally distinct text/icon for failed runs.
- **Approval requests**: notify when a run pauses waiting for a tool/permission approval — these are easy to miss and block progress entirely.
- **Rate limiting**: one notification per completed run (never per streamed token/chunk); collapse rapid completions.
- Optional **per-chat mute**.
Implementation pointers:
- **Desktop app**: Electron/Tauri both expose native notification APIs (`new Notification()` / `tauri-plugin-notification`), plus `flashFrame`/badge as a complementary signal on Windows.
- **Browser-hosted Console**: the Web Notifications API with a permission prompt; respect `document.visibilityState` for the "only when unfocused" rule.
- The backend already knows run state transitions (idle/running), so the trigger point exists; this is primarily a frontend/shell concern.
## Alternatives Considered
- **Sound-only alert**: simpler, but useless on mute and less informative than a toast with chat name/snippet.
- **Taskbar flashing / favicon badge**: nice complementary signal (and cheap on Electron via `flashFrame`), but less visible than a native notification and doesn't work for minimised-to-tray scenarios.
- **Polling manually**: the status quo — the problem this feature removes.
## Additional Context
Typical scenario: start a 15-minute asset-processing batch, switch to Unity/Godot, get a toast "QwenPaw — response complete (IO Spark Dev)" when done, click it to return directly to the chat.
Prior art: ChatGPT desktop, Slack/Discord, GitHub Actions email/web notifications, terminal tools like Claude Code (bell on completion), CI dashboards.
## Willing to Contribute
- [ ] I am willing to open a PR for this feature (after discussion).
コントリビューションガイド
評価
この issue はまだ評価されていません。