Repository navigation
feat: save local side chats as ordinary conversations - #2660
Open
toby1123yjh wants to merge 2 commits into
Open
toby1123yjh wants to merge 2 commits into
toby1123yjh wants to merge 2 commits into
Conversation
Author
|
@BigPizzaV3 Codex 仓库也有类似需求:openai/codex#26227 目前有 41 个赞、19 条评论,主要也是希望旁支内容不要在重启后丢失。方便的话优先看一下这个PR |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(side-chat): 支持将旁支保存为普通会话
问题
Side Chat 适合临时追问,但重启应用后无法从聊天列表恢复。如果旁支里形成了值得继续讨论的结论或代码,目前需要手动整理到新会话。
本 PR 增加「保存」入口,将需要保留的旁支变成独立普通会话,之后可以从列表重新打开并继续对话。
改动
原标题 (2)。保存成功后打开新会话;失败保留原旁支,同一次保存重试复用已写入的文件。thread/resume、thread/read登记并核验新会话,不直接写索引数据库。保存与分享分开处理,本地保存不继承分享的 16 MiB 上限。首版仅支持本地分页历史。旁支仍在回复、工具执行或等待审批时不可保存;历史未完整加载或旁支用户消息含图片附件时,会明确提示并保留旁支。
保存不调用模型,不重新执行历史工具。无法还原原始调用协议的工具记录作为历史参考保留,不承诺还原临时线程的全部隐藏状态。实现及边界说明见 [设计说明](https://github.com/toby1123yjh/CodexPlusPlus/blob/9d81de460965fbf14a8eeb216dfb6fdb6a263071/docs/specs/2026-10-21-save-side-chat.md)。
验证
基于上游
032ffa9a,Windows / Codex0.162.0-alpha.2:npm run check、npm run vite:build和两项注入产物一致性检查通过。cargo test -p codex-plus-core --test side_chat -- --include-ignored:9 项通过。原生兼容测试通过CODEX_PLUS_TEST_CODEX_BIN指定本机 Codex,使用合成历史和独立目录,验证列表可见、历史及工具状态保留、进程重启后恢复,不调用模型。前端测试排除了 14 项在本机 Git Bash 下超时的 DMG 打包测试。工作区 Rust 测试未完成;macOS未验证。
cargo clippy --workspace --all-features完成,存在仓库既有警告;全仓格式检查存在既有差异,新增 Rust 文件格式检查通过。