mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 22:03:45 +00:00
Pass fromHook to appendCompaction for both manual and auto compaction
This commit is contained in:
parent
f118cdc67b
commit
d4dc07ab20
2 changed files with 10 additions and 3 deletions
|
|
@ -641,7 +641,13 @@ export class SessionManager {
|
|||
}
|
||||
|
||||
/** Append a compaction summary as child of current leaf, then advance leaf. Returns entry id. */
|
||||
appendCompaction<T = unknown>(summary: string, firstKeptEntryId: string, tokensBefore: number, details?: T): string {
|
||||
appendCompaction<T = unknown>(
|
||||
summary: string,
|
||||
firstKeptEntryId: string,
|
||||
tokensBefore: number,
|
||||
details?: T,
|
||||
fromHook?: boolean,
|
||||
): string {
|
||||
const entry: CompactionEntry<T> = {
|
||||
type: "compaction",
|
||||
id: generateId(this.byId),
|
||||
|
|
@ -651,6 +657,7 @@ export class SessionManager {
|
|||
firstKeptEntryId,
|
||||
tokensBefore,
|
||||
details,
|
||||
fromHook,
|
||||
};
|
||||
this._appendEntry(entry);
|
||||
return entry.id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue