- add local-folder OnlyOffice sign/callback writeback and edit-tab handling - align main resource tabs, attachment edit menu, slash isolation, and filetree context behavior - record Sidex/Hermes gap reviews and Reasonix task checklists
57 lines
2.2 KiB
Markdown
57 lines
2.2 KiB
Markdown
# Reasonix 任务:ACP session/load 恢复
|
||
|
||
Project root: `/mnt/Data1T/mnote`
|
||
|
||
你不是唯一在代码库中工作的 agent。不要回滚、覆盖或整理与你任务无关的改动;不要提交 git;不要修改 `.gitignore`、`.codegraph/`、`auth-console.txt`、`auth-network.txt`。
|
||
|
||
## 背景
|
||
|
||
Codex 已写 review:`design/10-review/process/13-hermes-vscode-plugin-gap-review-v1.md`
|
||
|
||
本任务对应 checklist:`design/07-ai/process/7-30-acp-session-load-resume-checklist-v1.md`
|
||
|
||
参考实现:`reference-code/hermes-vscode-main/src/sessionManager.ts`,重点是 `ensureSession()` 中调用 `session/load { sessionId, cwd, mcpServers: [] }`,失败再 fallback `session/new`。
|
||
|
||
## Ownership
|
||
|
||
允许直接修改:
|
||
|
||
- `rust/crates/mnote-web/src/acp_session_manager.rs`
|
||
- `rust/crates/mnote-web/src/routes/hermes_client.rs`
|
||
- 与上述变更直接相关的 Rust 测试
|
||
- `design/07-ai/process/7-30-acp-session-load-resume-checklist-v1.md` 的执行记录
|
||
|
||
禁止修改:
|
||
|
||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||
- Convex schema / migrations
|
||
- 无关设计稿和 smoke 脚本
|
||
|
||
## 目标
|
||
|
||
实现或补齐 ACP `session/load` 恢复能力。恢复已有 ACP adapter session 时必须实际调用 adapter;load 返回 null 或错误时 fallback 到 `session/new`。
|
||
|
||
## 具体要求
|
||
|
||
1. 给 `AcpSessionManager` 增加清晰 API,例如 `load_session(session_id, cwd)` / `ensure_session(cwd, stored_session_id)`。
|
||
2. load 成功后当前 `session_id` 必须是 stored id。
|
||
3. load 失败、返回 null 或不支持时,不应让后续 prompt 继续使用 phantom id,应创建新 ACP session。
|
||
4. 在 `routes/hermes_client.rs` ACP run 启动处接入恢复逻辑;注意区分 MNote session id、ACP session id、run id。
|
||
5. 补 mock ACP 测试:`session/load` 成功、null fallback、新建 session 后 prompt 仍可工作。
|
||
|
||
## 验收命令
|
||
|
||
请至少运行:
|
||
|
||
```bash
|
||
cd /mnt/Data1T/mnote/rust && cargo test -p mnote-web acp_session_manager -- --test-threads=1
|
||
cd /mnt/Data1T/mnote/rust && cargo test -p mnote-web hermes_client_acp_resume -- --test-threads=1
|
||
```
|
||
|
||
## 最终回复格式
|
||
|
||
- 修改文件列表
|
||
- 关键实现说明
|
||
- 实际运行的验证命令和结果
|
||
- 未完成项 / 风险
|