refactor: compact copilot sessions through sdk state · openclaw/openclaw@db4990d
steipete
·
2026-06-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -190,11 +190,10 @@ plugins, channels, and core code only see the standard
|
190 | 190 | |
191 | 191 | When `harness.compact` runs, the Copilot SDK harness: |
192 | 192 | |
193 | | -1. Enables `infiniteSessions` on the SDK session. |
194 | | -2. Lets the SDK perform its native compaction. |
195 | | -3. Writes an OpenClaw-shaped marker at |
196 | | -`workspacePath/files/openclaw-compaction-<ts>.json` so existing OpenClaw |
197 | | - transcript readers still see a familiar artifact. |
| 193 | +1. Resumes the tracked SDK session without continuing pending work. |
| 194 | +2. Calls the SDK's session-scoped history compaction RPC. |
| 195 | +3. Returns the SDK compaction outcome without writing compatibility marker |
| 196 | + files under the workspace. |
198 | 197 | |
199 | 198 | The OpenClaw side transcript mirror (see below) continues to receive the |
200 | 199 | post-compaction messages, so user-facing chat history stays consistent. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -457,6 +457,10 @@ The branch already has a real shared SQLite base:
|
457 | 457 | - GitHub Copilot token exchange cache uses the shared SQLite plugin-state table |
458 | 458 | under `github-copilot/token-cache/default`. It is provider-owned cache state, |
459 | 459 | so it intentionally does not add a host schema table. |
| 460 | +- GitHub Copilot compaction no longer writes `openclaw-compaction-*.json` |
| 461 | + workspace sidecars. The harness calls the SDK history compaction RPC for the |
| 462 | + tracked SDK session, and OpenClaw keeps durable session/transcript state in |
| 463 | + SQLite instead of compatibility marker files. |
460 | 464 | - The shared Swift runtime (`OpenClawKit`) uses the same |
461 | 465 | `state/openclaw.sqlite` rows for device identity and device auth. macOS app |
462 | 466 | helpers import the shared SQLite helpers instead of owning a second JSON or |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。