Skip to content

feat(telegram): support context compaction for resume chats#11

Merged
ttiee merged 1 commit into
mainfrom
feat/telegram-context-compaction
Mar 17, 2026
Merged

feat(telegram): support context compaction for resume chats#11
ttiee merged 1 commit into
mainfrom
feat/telegram-context-compaction

Conversation

@ttiee

@ttiee ttiee commented Mar 17, 2026

Copy link
Copy Markdown
Owner

变更摘要

  • 为 Telegram 增加 /compact 命令,用于压缩当前 resume 会话上下文
  • 打通 service 与 native client 的 compact 流程,并把 compaction 事件透传为 Telegram 可见提示
  • 更新 README、命令菜单与对应回归测试

关联 Issue

Closes #10

具体改动

  • 注册 /compact Telegram 命令并新增 handler
  • CodexBridgeService 中增加当前聊天 resume 线程的 compact 入口,并对无可用 resume 会话返回明确错误
  • NativeCodexClient 中新增 thread/compact/start 封装,处理 contextCompaction / thread/compacted 事件
  • 补充命令菜单、handler、service、native client 的测试覆盖
  • 更新 README 的命令与 resume 模式说明

验证

  • pdm run pytest -q
  • pdm run ruff check .

风险 / 后续项

  • thread/compact/start 的 JSON-RPC 参数和通知命名基于本机 codex-cli 0.105.0 实测与协议事件验证;不同 CLI 版本如果调整协议,后续需要同步 native client 适配。

@ttiee ttiee force-pushed the feat/telegram-context-compaction branch from a8ed846 to 3aa98f0 Compare March 17, 2026 13:45
@ttiee ttiee force-pushed the feat/telegram-context-compaction branch from 3aa98f0 to b005eae Compare March 17, 2026 14:55
@ttiee ttiee merged commit 9b6560b into main Mar 17, 2026
5 checks passed
@ttiee ttiee deleted the feat/telegram-context-compaction branch March 17, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: support Telegram context compaction for long-lived Codex sessions

1 participant