fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04
2026-04-16
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -176,6 +176,14 @@ describe("agentCommand CLI provider handling", () => {
|
176 | 176 | sessionId: "cli-session-123", |
177 | 177 | provider: "google-gemini-cli", |
178 | 178 | model: "gemini-3.1-pro-preview", |
| 179 | +compactionCount: 2, |
| 180 | +usage: { |
| 181 | +input: 12, |
| 182 | +output: 4, |
| 183 | +cacheRead: 3, |
| 184 | +cacheWrite: 0, |
| 185 | +total: 19, |
| 186 | +}, |
179 | 187 | }, |
180 | 188 | executionTrace: { |
181 | 189 | winnerProvider: "google-gemini-cli", |
@@ -191,6 +199,12 @@ describe("agentCommand CLI provider handling", () => {
|
191 | 199 | const saved = readSessionStore<{ sessionFile?: string }>(store); |
192 | 200 | const sessionFile = saved[sessionKey]?.sessionFile; |
193 | 201 | expect(sessionFile).toBeTruthy(); |
| 202 | +expect(saved[sessionKey]).toMatchObject({ |
| 203 | +compactionCount: 2, |
| 204 | +inputTokens: 12, |
| 205 | +outputTokens: 4, |
| 206 | +cacheRead: 3, |
| 207 | +}); |
194 | 208 | |
195 | 209 | const messages = await readSessionMessages(sessionFile!); |
196 | 210 | expect(messages).toHaveLength(2); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。