docs: integrate coding conversation controls on main
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# Data Flow
|
||||
|
||||
## Code conversation metadata
|
||||
|
||||
Main 的 `.makelore/conversations.json` schema v2 是 Conversation 标题和归档状态的唯一权威。新建自动命名会话由 Main 生命周期订阅从首条真实、完整用户消息提取标题;未命名会话的历史 hydration 可补齐同一次命名。串行存储重查 `titleMode` / `autoTitleSet`,手动命名和已删除记录不会被后续事件覆盖。内部命名字段不进入公共 DTO,也不向 Pi session title 双写。
|
||||
|
||||
重命名、归档和恢复经现有 Host API 修改元数据;`conversation.metadata-changed` 在现有 SSE 上只传项目和会话身份,不伪造运行时 generation/seq。Renderer 合并列表刷新、在重连时重新读取列表,并拒绝跨项目或早于本地变更的旧结果。归档不 dispose runtime、不移动 JSONL;Main 阻止归档会话的新 prompt/steer/follow-up 与 fork,保留已接受请求、现有任务、审批与中止能力。
|
||||
|
||||
## Cloud knowledge embedding
|
||||
|
||||
MakeLore 知识库 → Yuxi 已启用 embedding 目录与知识库/发布快照 → Yuxi 直连供应商 → Milvus 索引或查询。向量费用由平台承担,不进入 one-api/Works Square 模型目录、用户用量、词元点数或智能体金额预算。下述既有受管模型能力链不作为云知识库 embedding 入口;聊天及其他原有网关能力保持。访问资格和实际运行时限仍由云执行检查。
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
| `shared/coding-conversation-*.ts` / `coding-project-contracts.ts` | Main/Renderer 共用的产品中立 Conversation、project tool、subagent 与 reducer 合同 | 这是唯一公共实现;Pi 事件、RPC 与 Provider 形状保持 Main-private |
|
||||
| `electron/api/coding-composition.ts` / `electron/api/routes/coding-*.ts` | 唯一 Main-owned Coding composition 与 `/api/coding/*` Host API | 管理 project/Agent/Conversation、SSE、附件、文件、命令、交互和安全诊断;mutation 返回 202 acceptance 且按 request id 去重 |
|
||||
| `electron/coding-projects/` | `.makelore/project.json` 与 `.makelore/conversations.json` schema-v2 项目/Agent/Conversation 数据、原子持久化与项目文件能力 | 不读取或迁移 `.niancode` / `.opencode` 项目元数据;legacy 内容保持 inert 且不删除 |
|
||||
| `electron/coding-runtime/conversation-service.ts` | 产品级 Conversation orchestration、模型/思考强度、fork/archive/recover 与运行时门禁 | unresolved Conversation 先验证并持久化模型再首次 prepare;已解析 Conversation 的模型切换复用 target runtime seam |
|
||||
| `electron/coding-runtime/conversation-service.ts` / `conversation-title.ts` | 产品级 Conversation orchestration、首条用户消息命名、模型/思考强度、fork/archive/recover 与运行时门禁 | unresolved Conversation 先验证并持久化模型再首次 prepare;Main 生命周期订阅和 hydration 触发一次元数据命名,手动标题优先;归档保留 runtime,仅阻止新发送与 fork;元数据失效事件与 sequenced runtime Patch 分离 |
|
||||
| `src/pages/Chat/CodingConversationSidebar.tsx` / `CodingConversationRenameDialog.tsx` | 每个 Agent 的最近/归档列表、独立行菜单和标题栏共用重命名对话框 | 菜单操作不选择或准备目标;最后一条会话归档后保留空态;归档会话以恢复入口替代 Composer,恢复沿用同一 Conversation |
|
||||
| `electron/coding-runtime/pi/{agent-server-process,worker-pool,worker-process,rpc-client,session-registry,event-projector,session-projector}.ts` / `resources/pi-agent-server.mjs` | 一个长驻父 Agent Server 内的 per-Conversation 逻辑 Runtime/Session/channel、严格 LF JSONL RPC、generation recovery 与 Snapshot/Patch 投影 | 首个 extension 必须是生成的 Makelore bridge,所有后续显式 extension 作为 Pi `additionalExtensionPaths` 加载且不启用 ambient discovery;Session hydration 保留完整 active-branch 可见历史并把 compaction summary 留在 Main-private 模型上下文;正式包按 staged `pi-runtime` 的 manifest/root 解析并校验 Pi 包入口;top-level logical-turn cap 4、warm idle LRU 8;线程级替换只使目标 generation 失效,Server 退出使所有旧 channel 失效并在下次恢复时只重启一个 Server |
|
||||
| `electron/coding-runtime/pi/{provider-config,provider-refresh,provider-failure,resource-loader}.ts` / `electron/api/routes/ai-proxy.ts` | Main-owned Provider catalog、secret/env 投影、资源 revision、一次凭据刷新与上游错误分类 | secret 不进入 argv/catalog/Renderer;确定性的 Works user-context 缺失使缓存凭据过期并 fail fast,不自动重放 mutation;精确 Token Point exhaustion 被窄化为安全、不可重试、可持久恢复的产品错误,不透传原始上游正文 |
|
||||
| `electron/coding-runtime/pi/{extension-host,subagent,write-lease}.ts` / `electron/main/background-lifecycle.ts` | 必需 Makelore extension、显式安装且启用的 Device Package extensions、交互、子 Agent、同项目写租约与后台运行租约 | parent generation 加载完整 Main-selected extension 集;child 并发 4、单次最多 8、禁止递归;active/uncertain run 不因页面隐藏或确认超时被回收,所有 stop/replacement 必须有原因 |
|
||||
|
||||
@@ -4,6 +4,15 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
|
||||
|
||||
## Integrated Through
|
||||
|
||||
- 2026-09-20:任务 `20260920-merge-coding-sessions-bfb69ebb` 经用户确认释放旧集成登记并接管主目录,
|
||||
将会话管理源 `fd0293fe3d94b5a7725cff992ca94f129a6ac889` 从 `d612265` 无冲突快进合入本地 `main`。
|
||||
Code 支持归档/恢复及共享重命名入口;新会话使用首条用户消息首行作为标题,不调用模型,
|
||||
手动与历史标题保持稳定。归档只改变元数据,不停止运行任务;恢复后可继续发送。
|
||||
产品树与已验证源一致,沿用 115 项聚焦/压力测试、1 项 Electron 交互、前端类型检查、lint
|
||||
和 Vite 全目标构建证据;Main 类型检查有既有诊断但无新增。源记录原样导入,3 份原有文档保留。
|
||||
详见[集成记录](tasks/20260920-merge-coding-sessions-bfb69ebb.md)与[元数据流](../20-architecture/data-flow.md#code-conversation-metadata)。
|
||||
未推送、打包或部署;本地 Pi 历史与 Host 夹具测试不代表真实 Provider 验收。
|
||||
|
||||
- 2026-09-20:任务 `20260920-merge-account-ui-38b91cd6` 经用户授权移交主目录登记,
|
||||
将 `e047877`、`c953126`、`fba5880` 从 `7fb4c60` 无冲突快进合入本地 `main`。
|
||||
智能体移除指定用户分享入口并改名“使用与接入”;微信绑定确认后自动收起二维码,
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# Task: Merge coding conversation management into main
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260920-merge-coding-sessions-bfb69ebb
|
||||
- Mode: Integration
|
||||
- Branch: main
|
||||
- Worktree: D:\Datas\OthersProjects\makelore
|
||||
- Base commit: d61226532a5946af4a0b12b4eb02ce9059d20ddb
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Fast-forward completed source fd0293fe3d94b5a7725cff992ca94f129a6ac889 into local main and promote the accepted Code conversation title/archive ownership and behavior.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- User requested main integration and explicitly confirmed releasing completed owner 20260920-merge-account-ui-38b91cd6 and adopting the three original untracked task documents unchanged. Official release/start/status succeeded; this task exclusively owns main and the integration lock at the recorded base.
|
||||
- Concurrent Task Gate and Planning Gate Passed. Read entry, active task, memory index, positioning/current-state, Pi ADR-006, architecture/domain/success criteria, relevant evidence/reflection/commitment context and all 145 peer scope/intent/promotion sections. Historical placeholders remain unknown/read-only without a concrete conflicting dependency. The current skill takes precedence over legacy local shared-document restrictions and reflection advice.
|
||||
- User explicitly replaced the earlier model-generated-title proposal with first-user-message titles; this implementation and promotion honor that amendment. Preserve Main ownership, running work and manual/historical titles. Source task records stay read-only. No subagents, unrelated product changes, remote push, packaging or deployment.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Fast-forwarded local main from d612265 to fd0293f without conflicts. The merge includes archive/restore, shared rename UI and one-shot first-user-message titles without a model call.
|
||||
- Promoted the accepted metadata flow, module ownership and domain behavior in data-flow, module-map and business-rules; recorded the source commit under current-state Integrated Through. The source task record was imported unchanged.
|
||||
- The original untracked documents 20260901-package-122-c5e8.md, 20260901-package-123-d7f3.md and 20260902-client-hang-diagnosis-a47c9e2b.md remain outside the integration commit.
|
||||
|
||||
## Verification
|
||||
|
||||
- Source ancestry confirmed a direct fast-forward; the source worktree was clean at fd0293f. After merge, both the complete product tree and source task record match fd0293f exactly.
|
||||
- Reuse exact-source verification because the fast-forward introduces no product edits: 114 focused tests plus one pressure test, one Electron rename/archive/restore fixture, frontend typecheck, lint (0 errors, 8 existing warnings), and Vite Renderer/Main/preload/utility build passed. Real pinned Pi 0.84.2 history hydration was covered locally; no live Provider turn is claimed.
|
||||
- Explicit Main TypeScript checking retains baseline failures: source comparison found 89 baseline and 88 current diagnostics, with no added diagnostics. This integration does not broaden scope to those pre-existing errors.
|
||||
- git diff --check and the task-aware documentation drift check passed. The latter confirms imported source provenance and that all three adopted foreign documents are unchanged. Source registry/readiness, clean status, branch and latest HEAD match the committed source record.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Source task 20260920-coding-session-controls-10fee632 is retained awaiting cleanup confirmation at D:\Datas\OthersProjects\.codex-worktrees\makelore\20260920-coding-session-controls-10fee632, branch codex/20260920-coding-session-controls-10fee632-coding-session-controls. Its latest result is integrated; removing the checkout also removes ignored dependencies/build output while preserving branch and commits. Main is not a cleanup candidate.
|
||||
- An updated client build/install is needed to expose the feature in an installed app; this task only integrates source locally.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Accepted and promoted: Main metadata owns stable manual/historical and first-user-message automatic titles; archive preserves running work; list metadata invalidation is separate from sequenced runtime patches. The user's explicit amendment supplies the product decision; Pi runtime and Provider ownership remain unchanged.
|
||||
@@ -1,5 +1,12 @@
|
||||
# Business Rules
|
||||
|
||||
## Code conversation titles and archive
|
||||
|
||||
- 新建自动命名会话使用首条真实、完整、非空用户消息的首行,合并空白并截取最多 32 个 Unicode 字符;纯图片消息使用“附件对话”。斜杠命令、乐观消息和助手输出不触发命名;不调用模型生成标题。
|
||||
- 自动标题只设置一次。手动重命名去除首尾空白、最多 200 字符,并始终优先;历史会话和分支会话按手动标题处理,不自动回填或覆盖。仅标题变化不改变会话排序时间。
|
||||
- 归档只是会话列表管理,不删除历史、不停止正在运行的任务。已归档会话可查看、审批和中止既有工作;新 prompt/steer/follow-up 与 fork 必须先恢复,已接受请求的去重结果仍可读取。
|
||||
- 每个 Agent 提供归档数量及归档列表。归档最后一条最近会话时不自动创建替代会话;恢复沿用原会话并回到最近列表。菜单操作不应隐式切换或准备目标会话。
|
||||
|
||||
## Managed model capabilities
|
||||
|
||||
- 受管模型的图片输入与思考选项来自 Works v2 官方能力投影,未知、false 和空原生 effort 列表分开处理,不靠本地模型清单推测。运营激活与能力事实分离。
|
||||
|
||||
Reference in New Issue
Block a user