Files
opsxshell/docs/02-运行中消息排队.md
Logan.Li 2ca32f3199 feat(ai): Agent 面板运行中消息排队
忙时可继续输入并排队;立即打断当前任务、编辑或撤销;
结束后自动续发。补充 zh/en 文案与 docs/02。
2026-09-19 00:17:08 +08:00

31 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 运行中消息排队(三产品统一)
> // Logan.Li
> 更新:2026-09-19
> 对标常见 Agent UX(Zcode / Cursor):当前任务仍在跑时,允许预写下一条。
## 语义
| 动作 | 含义 |
| ------------ | ---------------------------------------------------------------------------------------------------------------------- |
| **排队** | 运行中提交的新输入进入 `pending`(默认一条;再提交则覆盖或需先撤销) |
| **自动续发** | 当前任务 `completed` / `incomplete` / `failed` / `cancelled` 结束后,若仍有 pending,自动开始该条(continue/追问语义) |
| **立即** | 中断当前任务,立刻用 pending 内容开跑 |
| **编辑** | 把 pending 拉回输入框,清空排队槽 |
| **撤销** | 丢弃 pending,不发送 |
与 [运行结果状态与可续跑契约]((见 opsxcli/aiops docs/13-运行结果状态与可续跑契约.md)) 的关系:排队是**同会话并发输入**;incomplete 续跑是**上一趟未完成再继续**。两者可叠加。
## 产品落点
| 产品 | UI | 中断手段 |
| ----------- | ------------------------------------- | ------------------------------------------ |
| opsxshell | Agent 面板排队条 | `stopAgent`(bump runId)后立刻 `runAgent` |
| aiops Web | AgentCLI 输入区排队条 | WS `abort` 后再 `continue`/`start` |
| opsxcli TUI | 忙时 Enter 入队;快捷键立即/编辑/撤销 | cancel 当前 RunStream ctx |
## 不做
- 多条 FIFO 长队列(首版单槽)
- 跨会话排队