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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user