mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 15:02:32 +00:00
Fix SessionEntry type to exclude SessionHeader
- SessionEntry now only contains conversation entries (messages, compaction, etc.) - SessionHeader is separate, not part of SessionEntry - FileEntry = SessionHeader | SessionEntry (for file storage) - getEntries() filters out header, returns SessionEntry[] - Added getHeader() for accessing session metadata - Updated compaction and tests to not expect header in entries - Updated mom package to use FileEntry for internal storage
This commit is contained in:
parent
251fea752c
commit
9478a3c1f5
6 changed files with 50 additions and 75 deletions
|
|
@ -759,7 +759,7 @@ export class AgentSession {
|
|||
if (lastEntry?.type === "compaction") {
|
||||
throw new Error("Already compacted");
|
||||
}
|
||||
throw new Error("Nothing to compact (session too small or needs migration)");
|
||||
throw new Error("Nothing to compact (session too small)");
|
||||
}
|
||||
|
||||
// Find previous compaction summary if any
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue