AtomCode v5.0.9 新子系统深度分析 — Todo 任务规划、提示词预测与会话标题
基于
strings工具契约 + 系统提示注入文本 + WebUI 面板的还原分析 2026-09-09 前置报告:05-version-diff-v4.25.5-to-v5.0.9.md
1. 源码模块(全新)
crates/atomcode-coding/src/todo.rs ← Todo 工具
crates/atomcode-coding/src/next_prompt_suggestion.rs ← 下一步提示词预测
crates/atomcode-coding/src/session_title.rs ← 会话标题
crates/atomcode-coding/src/controllers.rs ← 编码控制器
crates/atomcode-capabilities/src/tools/todo.rs ← Todo 工具(capabilities 侧)2. Todo 任务规划系统
2.1 命令面
/todo add <task description> ← 追加任务
/todo clear ← 清空
Show the current todo list ← 显示(overlay modal)
Current todos: / No todos ← 空态2.2 todowrite 工具契约(完整还原)
todowrite: invalid JSON arguments.
todowrite: provide either `todos` (full list to plan) or `action` (add|update|delete)
todowrite: `action` must be `add` or `update`.
todowrite: `update` needs a `status` of pending|in_progress|completed.
todowrite: `status` must be one of pending|in_progress|completed (got ...)
todowrite: `update` needs an `id` (the task number).
needs non-empty `content`2.3 工具状态机
| 动作 | 载荷 | 语义 |
|---|---|---|
{todos: [...]} | 完整列表 | 全量规划(REPLACE) |
{action:"add"} | content | 追加一项 |
{action:"update", id:N, status} | pending/in_progress/completed | 状态推进 |
{action:"delete"} | id | 删除 |
2.4 系统提示注入(强制使用)
You MUST call `todowrite` now, before any other tool or prose.
Create the complete executable plan ...
As changes land, call `todowrite` FIRST with the full list to lay out the steps.
The initial list ...
When you START an item: `todowrite` {"action":"update","id":N,"status":"in_progress"}
When you FINISH an item: `todowrite` {"action":"update","id":N,"status":"completed"}
(do not send the whole list)
For multi-step work, call `todowrite` with the new full list to REPLACE the old one→ 强指令注入:规划 → 更新 → 完成的回合内强制契约。
2.5 触发条件
This task benefits from a todo list. If it has multiple requests, phases, files,
dependencies, ambiguity, or is a long-running multi-step task, ...2.6 平台限制
[todo] eager=always is unsupported by provider type ollama; using ...→ eager 模式(eager=always)在 Ollama provider 上不受支持,降级。
2.7 WebUI Todo 进度面板
todo-progress-panel / todo-progress-item
status: in_progress (ring) / completed (ring)
todo-progress-spin / todo-progress-chevron
aria-label: todo.panel.title→ 实时进度面板:旋转环(进行中)+ 完成态。
3. next_prompt_suggestion(提示词预测,全新)
Predict the short message the user is most likely to type next
output_chars ← 输出字符上限
next prompt suggestion failed because ... ← 失败串- 在用户回合结束前预测下一步输入,加速交互
output_chars约束输出长度(提示词摘要)
4. session_title(会话标题,全新)
crates/atomcode-coding/src/session_title.rs
ai_session_naming = ... ← 配置键(Config 27 字段之一)→ AI 生成会话标题,与 [ui] ai_session_naming 配置配套。
5. 逆向方法论备注
todowrite: provide eithertodosoraction`` 错误串直接暴露双模式工具契约- 系统提示注入文本(
You MUST call todowrite now)以完整句子存在 → 强制策略可逐字还原 eager=always is unsupported by provider type ollama揭示 provider 能力差异化降级Predict the short message the user is most likely to type next是功能的自描述字符串- WebUI 的
todo-progress-*CSS 类族还原实时进度面板结构
本报告由持续分析循环生成 — v5.0.9 Todo 任务规划、提示词预测与会话标题深度分析