From 2772e0723cfc7898443320515e165a625de1db46 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Mon, 22 Jun 2026 01:31:29 +0900 Subject: feat(compaction): conversation compacting + auto-compact threshold MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consume the compaction handoff (wire@0.11.0, transport-contract@0.15.0). 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. --- src/core/wire/conformance.test.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') 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, }, -- cgit v1.2.3