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/transport-http/src | |
| 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/transport-http/src')
| -rw-r--r-- | packages/transport-http/src/app.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/transport-http/src/app.ts b/packages/transport-http/src/app.ts index 233e30e..64e46fd 100644 --- a/packages/transport-http/src/app.ts +++ b/packages/transport-http/src/app.ts @@ -725,7 +725,7 @@ export function createApp(opts: CreateServerOptions): Hono { const response: CompactResponse = { conversationId, - archiveId: result.archiveId, + newConversationId: result.newConversationId, messagesSummarized: result.messagesSummarized, messagesKept: result.messagesKept, }; |
