diff options
| author | Adam Malczewski <[email protected]> | 2026-06-22 01:31:29 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-22 01:31:29 +0900 |
| commit | 2772e0723cfc7898443320515e165a625de1db46 (patch) | |
| tree | c65e8a7c1a9ffb1ca6b44147cd3eb8629aa47830 /src/core | |
| parent | 54e88b71efd9a6fd9d880b6e90d844a875808662 (diff) | |
| download | dispatch-web-2772e0723cfc7898443320515e165a625de1db46.tar.gz dispatch-web-2772e0723cfc7898443320515e165a625de1db46.zip | |
feat(compaction): conversation compacting + auto-compact threshold
Consume the compaction handoff ([email protected], [email protected]).
Re-pinned file: deps + re-mirrored .dispatch/*.reference.md.
- New 'Compaction' sidebar view (CompactionView.svelte):
- 'Compact now' button → POST /conversations/:id/compact (loading indicator
+ result: 'N messages summarized, M kept')
- Auto-compact threshold number input → GET/PUT
/conversations/:id/compact-threshold (0 = disabled, default 350000)
- Re-mounts per conversation via {#key}
- App store: compactNow() + compactThreshold reactive state +
setCompactThreshold(), seeded on focus change (like reasoning-effort + cwd)
- conversation.compacted WS handler: reloads the SAME conversation's history
(ID unchanged — old history forked to an archive, not a tab switch)
- WS adapter parses newConversationId field on ConversationCompactedMessage
- conformance guards + tests cover the new type
686 tests green.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/wire/conformance.test.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/wire/conformance.test.ts b/src/core/wire/conformance.test.ts index 58cba3a..c50cbf4 100644 --- a/src/core/wire/conformance.test.ts +++ b/src/core/wire/conformance.test.ts @@ -148,6 +148,7 @@ describe("classifies every WsServerMessage type", () => { { type: "conversation.compacted" as const, conversationId: "c1", + newConversationId: "c2", messagesSummarized: 10, messagesKept: 5, }, |
