Repository navigation
fix(core): 同步清理桌面端拒绝投影 - #25
Merged
Merged
Conversation
省略主语的“不能继续做这件事”原先不会被判为拒绝,桌面端分页会话又从 thread_history 读取 item_completed 副本。现在同一条回复的 JSONL 副本和投影文本会一起替换,完整投影的游标也会跟着修正。
Contributor
Author
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.
摘要
item_completed/AgentMessage和thread_history_1.sqlite。清理现在会把同一条回复的 JSONL 副本和投影文本一起替换,并删除已投影的 reasoning。next_rollout_byte_offset/next_rollout_ordinal,避免桌面端按旧游标把拒绝内容再投影回来。JSONL 写入失败时只回滚游标,已替换的投影文本保留。验证
python -m pytest tests/test_patcher.py tests/test_thread_history.py -q -o addopts= -p no:cacheprovidertests/test_patcher.py里 3 个记忆文件失败是既有的codex_patcher.py在 Windows GBK 默认编码下open()未指定 UTF-8,这次没有改那条路径。thread_items.item_json中消失,完整投影游标改到新的文件长度。没有写入正在使用的~/.codex/thread_history_1.sqlite。测试计划
thread_historysidecar 能一起恢复。