CodeWhale icon indicating copy to clipboard operation
CodeWhale copied to clipboard

一些功能性的优化点建议 / Feature Suggestions: Visual & Sound Notifications, and External Messaging

Open sailoun601349 opened this issue 6 months ago • 2 comments

本文告诉AI我的想法后生成的,简单概述: 1.主要是想像claude code运行的终端在任务栏那里会有任务完成或者提示的反馈(claude code是有一个绿色logo的显示,deepseekTUI我觉得可以做不同颜色鲸鱼或者蓝鲸logo外包一个不同颜色的圈来区分,以此来提示) 2.增加默认的声音,默认关闭,用户自行开启、自行选择哪些操作继续声音提示以及自行更换声音源(我觉得重点的在于:向用户提问、需要用户审批、任务结束) 3.接入通讯软件,就跟hermes一样。

# 一些功能性的优化点建议 / Feature Suggestions: Visual & Sound Notifications, and External Messaging Integration

## 背景 / Background

DeepSeek-TUI 经常用于较长时间运行的任务,例如代码分析、项目重构、测试执行、文档生成、调试、多步骤 agent 工作流等。

在这些场景中,用户通常不会一直盯着终端界面,而是会:

- 切换到其他窗口继续办公;
- 把 DeepSeek-TUI 放在后台运行;
- 离开电脑休息;
- 等待任务完成、用户输入请求或审批请求。

因此,希望 DeepSeek-TUI 可以增加一些更明显的提醒能力,让用户能够及时知道当前任务状态,尤其是:

- 任务是否已经完成;
- 是否正在等待用户输入;
- 是否需要用户审批;
- 是否发生错误或中断;
- 是否可以通过外部通讯软件接收提醒。

DeepSeek-TUI is often used for long-running tasks such as code analysis, project refactoring, test execution, document generation, debugging, and multi-step agent workflows.

In these scenarios, users often do not keep watching the terminal. They may:

- switch to another window;
- keep DeepSeek-TUI running in the background;
- leave the computer for a break;
- wait for task completion, user input requests, or approval prompts.

Therefore, it would be useful for DeepSeek-TUI to provide clearer notification mechanisms, especially for:

- task completion;
- user input required;
- approval required;
- task failure or interruption;
- optional external messaging notifications.

---

## 1. 视觉提醒 / Visual Status Indicators

### 现状问题 / Current Problem

目前用户需要持续关注终端界面,才能知道任务是否完成、是否等待用户输入,或者是否需要审批。

对于长任务来说,这会导致用户频繁切回终端查看状态,使用体验不够直观。

Currently, users need to keep watching the terminal to know whether a task has completed, whether user input is required, or whether an approval is pending.

For long-running tasks, this forces users to repeatedly switch back to the terminal to check the current status.

### 建议功能 / Suggested Feature

希望 DeepSeek-TUI 增加更明显的视觉状态提示,例如在终端底部、状态栏或任务结束区域显示清晰的状态信息。

建议支持以下状态:

1. **任务运行中 / Task running**
   - 显示当前任务正在执行;
   - 可以使用 spinner、状态栏、进度提示或简洁文本。

2. **等待用户输入 / Waiting for user input**
   - 当模型需要用户补充信息时,显示明显提示;
   - 示例:`Waiting for user input` / `等待用户输入`。

3. **等待用户审批 / Approval required**
   - 当 shell 命令、文件修改、工具调用等需要用户确认时,显示明显提示;
   - 示例:`Approval required` / `需要用户审批`。

4. **任务完成 / Task completed**
   - 当前任务完成后显示醒目标识;
   - 例如显示一个图标、状态块或 ASCII 标识;
   - 可以考虑使用蓝鲸图标作为 DeepSeek-TUI 的完成状态提示。

Suggested states:

1. **Task running**
   - Show that a task is currently in progress.
   - This could be a spinner, status bar, progress hint, or compact status text.

2. **Waiting for user input**
   - Show a clear indicator when the model needs more information.
   - Example: `Waiting for user input`.

3. **Approval required**
   - Show a clear indicator when a shell command, file edit, or tool call requires approval.
   - Example: `Approval required`.

4. **Task completed**
   - Show a clear completion indicator when the current task is done.
   - This could be an icon, status block, or ASCII marker.
   - A blue whale icon could be considered as a recognizable DeepSeek-TUI completion marker.

### 示例 / Example

```text
╭────────────────────────────────────╮
│ 🐋 DeepSeek-TUI: Task completed     │
╰────────────────────────────────────╯

或者 / Or:

[DeepSeek-TUI] 🐋 Task completed. Waiting for your next instruction.

可配置建议 / Configuration Suggestion

[tui.status_indicator]
enabled = true
show_on_task_complete = true
show_on_user_input_required = true
show_on_approval_required = true
show_on_task_failed = true
style = "default" # default | compact | whale

价值 / Value

这个功能可以帮助用户:

  • 不用一直盯着终端;
  • 快速判断任务是否完成;
  • 快速知道是否需要自己操作;
  • 提升长任务、后台任务、多步骤 agent 工作流的可用性。

This feature would help users:

  • avoid constantly watching the terminal;
  • quickly notice when a task has completed;
  • know whether user action is required;
  • improve usability for long-running tasks, background tasks, and multi-step agent workflows.

2. 声音提醒 / Sound Notifications

现状问题 / Current Problem

视觉提醒只能在用户看着终端时生效。如果用户正在其他窗口办公,或者暂时离开电脑,就无法及时知道 DeepSeek-TUI 当前是否需要自己处理。

尤其是以下场景非常需要声音提醒:

  • 需要用户审批;
  • 需要用户输入;
  • 任务已经完成;
  • 任务失败或命令出错。

Visual indicators only help when the user is looking at the terminal. If the user is working in another window or away from the computer, they may not notice that DeepSeek-TUI needs attention.

Sound notifications would be especially useful for:

  • approval required;
  • user input required;
  • task completed;
  • task failed or command failed.

建议功能 / Suggested Feature

希望 DeepSeek-TUI 增加可配置的声音通知系统。

建议优先支持以下事件:

  1. 需要用户输入 / User input required

    • 模型需要用户补充信息时播放声音。
  2. 需要用户审批 / Approval required

    • 工具调用、shell 命令、文件修改等需要用户确认时播放声音。
    • 这是最重要的提醒场景之一。
  3. 任务完成 / Task completed

    • 当前 agent turn 或任务完成时播放声音。
  4. 任务失败 / Task failed

    • shell 命令失败、工具调用失败或任务中断时播放声音。
  5. 长任务开始或进入后台 / Long-running task started

    • 可选。
    • 当任务进入较长时间运行状态时播放声音。

Suggested notification events:

  1. User input required

    • Play a sound when the model needs more information.
  2. Approval required

    • Play a sound when a tool call, shell command, or file edit requires user approval.
    • This is one of the most important notification scenarios.
  3. Task completed

    • Play a sound when the current agent turn or task is completed.
  4. Task failed

    • Play a sound when a shell command, tool call, or task fails.
  5. Long-running task started

    • Optional.
    • Play a sound when a task enters a long-running state.

默认声音文件建议 / Default Sound Files

希望官方可以提供一些默认声音,并在文档中说明声音目录位置。

建议目录:

~/.deepseek/sounds/
├── user-input-required.wav
├── approval-required.wav
├── task-completed.wav
├── task-failed.wav
└── long-running-task.wav

Windows 示例:

C:\Users\<User>\.deepseek\sounds\

Linux/macOS 示例:

~/.deepseek/sounds/

It would be helpful if DeepSeek-TUI provided default sound files and documented the default sound directory.

Suggested directory:

~/.deepseek/sounds/
├── user-input-required.wav
├── approval-required.wav
├── task-completed.wav
├── task-failed.wav
└── long-running-task.wav

Windows example:

C:\Users\<User>\.deepseek\sounds\

Linux/macOS example:

~/.deepseek/sounds/

自定义声音 / Custom Sound Files

希望用户可以通过两种方式自定义声音:

  1. 直接替换声音目录中的默认文件;
  2. 在配置文件中指定自定义声音路径。

Users could customize sounds in two ways:

  1. Replace the default sound files in the sound directory.
  2. Specify custom sound file paths in the configuration file.

配置示例 / Configuration example:

[notifications.sound]
enabled = true
mode = "default" # default | custom | disabled
volume = 70
fallback_to_bell = true

[notifications.sound.events]
user_input_required = true
approval_required = true
task_completed = true
task_failed = true
long_running_task = false

[notifications.sound.files]
user_input_required = "C:\\Users\\User\\.deepseek\\sounds\\user-input-required.wav"
approval_required = "C:\\Users\\User\\.deepseek\\sounds\\approval-required.wav"
task_completed = "C:\\Users\\User\\.deepseek\\sounds\\task-completed.wav"
task_failed = "C:\\Users\\User\\.deepseek\\sounds\\task-failed.wav"

跨平台建议 / Cross-Platform Suggestions

如果完整跨平台音频播放较复杂,可以先提供基础实现:

Windows

  • 支持 .wav 文件;
  • 使用系统默认音频播放方式;
  • 如果失败,则 fallback 到系统 beep。

macOS

  • 支持系统声音;
  • 或调用 afplay;
  • 如果失败,则 fallback 到 terminal bell。

Linux

  • 支持 paplay / aplay / ffplay;
  • 如果不可用,则 fallback 到 terminal bell。

If full cross-platform audio playback is difficult, a basic implementation could be introduced first:

Windows

  • Support .wav files.
  • Use the system default audio playback method.
  • Fall back to system beep if playback fails.

macOS

  • Support system sounds.
  • Or use afplay.
  • Fall back to terminal bell if playback fails.

Linux

  • Support paplay, aplay, or ffplay.
  • Fall back to terminal bell if no audio backend is available.

价值 / Value

声音提醒主要解决的问题是:

用户不可能一直盯着终端等待 agent。

尤其适合:

  • 长时间代码任务;
  • 自动化重构;
  • 测试执行;
  • 文档生成;
  • 多步骤 agent 工作流;
  • 用户切换窗口或离开电脑时。

The main problem this solves is:

Users cannot constantly watch the terminal while waiting for an agent.

This is especially useful for:

  • long code tasks;
  • automated refactoring;
  • test execution;
  • document generation;
  • multi-step agent workflows;
  • users who switch windows or leave the computer.

3. 接入通讯软件或外部通知 / Integration with Messaging Apps or External Notifications

背景 / Background

除了本机视觉和声音提醒,未来是否可以考虑支持外部通知渠道,例如微信、企业微信、Telegram、Bark、Discord webhook 或自定义 webhook。

这类功能适合更长时间的任务,尤其当用户离开电脑后,仍然希望知道:

  • 任务是否完成;
  • 是否需要审批;
  • 是否需要继续输入;
  • 是否失败。

In addition to local visual and sound notifications, DeepSeek-TUI could consider supporting external notification channels in the future, such as WeChat, WeCom / Enterprise WeChat, Telegram, Bark, Discord webhook, or custom webhooks.

This would be useful for longer-running tasks, especially when users leave the computer but still want to know:

  • whether a task has completed;
  • whether approval is required;
  • whether more user input is needed;
  • whether the task has failed.

建议功能 / Suggested Feature

可以先支持通用 webhook,然后再考虑特定平台集成。

建议事件包括:

approval_required
user_input_required
task_completed
task_failed
long_running_task

A good first step could be supporting generic webhooks, then adding platform-specific integrations later.

Suggested events:

approval_required
user_input_required
task_completed
task_failed
long_running_task

配置示例 / Configuration Example

[notifications.webhook]
enabled = false
url = "https://example.com/webhook"
events = ["approval_required", "user_input_required", "task_completed", "task_failed"]

[notifications.webhook.payload]
include_workspace = true
include_session_id = true
include_task_summary = true

微信 / 企业微信方向 / WeChat / WeCom Direction

如果未来考虑中文用户场景,可以支持:

  • 企业微信机器人 webhook;
  • Server 酱 / PushDeer / Bark 等国内常见推送工具;
  • 自定义 HTTP callback,由用户自行转发到微信或其他平台。

For Chinese users, possible integrations could include:

  • WeCom / Enterprise WeChat bot webhooks;
  • ServerChan / PushDeer / Bark;
  • custom HTTP callbacks that users can forward to WeChat or other platforms themselves.

价值 / Value

外部通知可以解决本地声音无法覆盖的场景:

  • 用户离开电脑;
  • 电脑静音;
  • 远程服务器运行 DeepSeek-TUI;
  • 长时间任务需要异步关注;
  • agent 需要审批但用户不在终端前。

External notifications would help in cases where local sound is not enough:

  • the user is away from the computer;
  • the computer is muted;
  • DeepSeek-TUI is running on a remote server;
  • long-running tasks need asynchronous attention;
  • the agent requires approval but the user is not looking at the terminal.

总结 / Summary

希望 DeepSeek-TUI 可以考虑增加一套更完整的提醒系统,分为三个部分:

  1. 视觉提醒 / Visual status indicators

    • 任务完成;
    • 等待用户输入;
    • 等待用户审批;
    • 任务失败。
  2. 声音提醒 / Sound notifications

    • 默认声音;
    • 可开关事件;
    • 可替换声音文件;
    • 可配置声音目录;
    • 支持跨平台 fallback。
  3. 外部通知 / External notifications

    • 通用 webhook;
    • 企业微信 / 微信相关推送;
    • Telegram / Bark / Discord 等通知渠道;
    • 用户可配置通知事件和 payload 内容。

These improvements would make DeepSeek-TUI more suitable for real-world long-running agent workflows, where users often work in the background, switch windows, leave the computer, or wait for approval/task completion.

The most important use cases are:

  • approval required;
  • user input required;
  • task completed.

These notification features would significantly improve DeepSeek-TUI's usability as a practical terminal-based coding agent.

sailoun601349 avatar May 11 '26 02:05 sailoun601349

@Author, this is also a HOOK feature. In Claude Code, it corresponds to the two interfaces session start and session end.

#1364

LeXwDeX avatar May 11 '26 03:05 LeXwDeX

Closing this broad notification/status bundle as covered by the shipped surfaces: /statusline and the footer/sidebar expose running, waiting, agents, cost, cache, tokens, and route state; [notifications] supports threshold-based completion notifications with OSC9/BEL and Windows sound-file support; the notify tool can fire model-requested desktop notifications; and the hooks crate supports JSONL/stdout/webhook sinks for external event forwarding. If we still want per-event approval/user-input/task-failed sounds, that should be split into a small issue with exact events, config keys, and tests.

Hmbown avatar Jun 22 '26 19:06 Hmbown