Merge remote-tracking branch 'origin/master' into worktree/web-model-request-retry

# Conflicts:
#	apps/cli/README.i18n.yaml
#	apps/cli/README.md
#	apps/cli/README.zh.md
#	apps/web/tests/snapshots/live-interactions/cancel.expected.md
#	apps/web/tests/snapshots/live-interactions/error-auth.expected.md
#	apps/web/tests/snapshots/live-interactions/retry.expected.md
#	packages/client/runtime/README.i18n.yaml
#	packages/client/runtime/src/client/sessions/session.ts
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/README.zh.md
This commit is contained in:
Yichen Jiang
2026-07-30 20:03:39 +08:00
684 changed files with 14535 additions and 5470 deletions

View File

@@ -417,7 +417,8 @@ describe('replay anchors and surface folds', () => {
expect(after.surfaceDeltaTokens).toBeLessThan(0)
expectSurfaceTotal(after)
expect(before.nodes).toHaveLength(2)
expect(before.logRevision).toBe(original.events.length)
// The earlier snapshot still reports the log it measured: seed + boundary.
expect(before.logRevision).toBe(original.events.length + 1)
expect(before.surfaceDeltaTokens).toBeGreaterThan(0)
})
@@ -677,13 +678,15 @@ describe('malformed replay and listener lifecycle', () => {
content: [{ type: 'text', text: 'one' }],
source: { kind: 'user' },
}), { surfaceOp: 'append' })
expect(revisions).toEqual([2])
expect(activeMeter.measure(session).logRevision).toBe(2)
// Seed, end-seed, then one live append. Only the last event published:
// end-seed predates store attachment, like the seed.
expect(revisions).toEqual([3])
expect(activeMeter.measure(session).logRevision).toBe(3)
await firstFiber.dispose()
const secondFiber = await ctx.plugin(TokenMeterService)
activeMeter = ctx.tokenMeter
expect(activeMeter.measure(session).logRevision).toBe(2)
expect(activeMeter.measure(session).logRevision).toBe(3)
await secondFiber.dispose()
})
})