feat(telegram): support context compaction for resume chats#11
Merged
Conversation
a8ed846 to
3aa98f0
Compare
3aa98f0 to
b005eae
Compare
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.
变更摘要
/compact命令,用于压缩当前resume会话上下文关联 Issue
Closes #10
具体改动
/compactTelegram 命令并新增 handlerCodexBridgeService中增加当前聊天 resume 线程的 compact 入口,并对无可用 resume 会话返回明确错误NativeCodexClient中新增thread/compact/start封装,处理contextCompaction/thread/compacted事件resume模式说明验证
pdm run pytest -qpdm run ruff check .风险 / 后续项
thread/compact/start的 JSON-RPC 参数和通知命名基于本机codex-cli 0.105.0实测与协议事件验证;不同 CLI 版本如果调整协议,后续需要同步 native client 适配。