diff options
| author | Adam Malczewski <[email protected]> | 2026-06-22 01:22:21 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-22 01:22:21 +0900 |
| commit | ae8f61cefd383417bc0f80447d7ab1bfdfe0726d (patch) | |
| tree | ddb6ccb08a4338aa2c6ccb397696074d8c2c22c5 /packages/wire | |
| parent | 54613fc2bd4869a95ffda34230006da6d9dfc8c3 (diff) | |
| download | dispatch-ae8f61cefd383417bc0f80447d7ab1bfdfe0726d.tar.gz dispatch-ae8f61cefd383417bc0f80447d7ab1bfdfe0726d.zip | |
fix: compaction keeps original ID, forks old history to archive, chains via compactedFrom
Reworked compaction to match the confirmed design:
- The compacted conversation KEEPS its original ID (messaging between
agents is unaffected — the ID never changes)
- The old full history is forked to a new archive conversation (new UUID)
- The archive inherits the source's compactedFrom, creating a chain:
A → Y → X (walk compactedFrom backward)
- A's history is replaced with [summary + recent N]
- A.compactedFrom = archive ID
forkHistory: inherit compactedFrom from source (not set to sourceId),
so archives chain backward to previous archives.
FE: no tab switching needed — the ID doesn't change. Just reload history.
Diffstat (limited to 'packages/wire')
| -rw-r--r-- | packages/wire/src/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/wire/src/index.ts b/packages/wire/src/index.ts index 8c85f89..4ab8825 100644 --- a/packages/wire/src/index.ts +++ b/packages/wire/src/index.ts @@ -535,12 +535,12 @@ export interface ConversationMeta { * Result of a compaction operation. `summary` is the text the model produced; * `messagesKept` is how many recent messages were retained after the summary; * `messagesSummarized` is how many old messages were replaced by the summary. - * `archiveId` is the ID of the new conversation that holds the full + * `newConversationId` is the ID of the new conversation that holds the full * pre-compaction history (non-destructive — the original history is preserved). */ export interface CompactionResult { readonly summary: string; - readonly archiveId: string; + readonly newConversationId: string; readonly messagesSummarized: number; readonly messagesKept: number; } |
