mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 06:02:42 +00:00
Improve before_compact hook: add messagesToKeep, replace apiKey with resolveApiKey
This commit is contained in:
parent
e4283294c8
commit
d9a542763a
8 changed files with 51 additions and 24 deletions
|
|
@ -767,11 +767,11 @@ export class AgentSession {
|
|||
previousSessionFile: null,
|
||||
reason: "before_compact",
|
||||
cutPoint: preparation.cutPoint,
|
||||
messagesToSummarize: preparation.messagesToSummarize,
|
||||
messagesToSummarize: [...preparation.messagesToSummarize],
|
||||
messagesToKeep: [...preparation.messagesToKeep],
|
||||
tokensBefore: preparation.tokensBefore,
|
||||
customInstructions,
|
||||
model: this.model,
|
||||
apiKey,
|
||||
resolveApiKey: this._resolveApiKey,
|
||||
})) as SessionEventResult | undefined;
|
||||
|
||||
|
|
@ -918,11 +918,11 @@ export class AgentSession {
|
|||
previousSessionFile: null,
|
||||
reason: "before_compact",
|
||||
cutPoint: preparation.cutPoint,
|
||||
messagesToSummarize: preparation.messagesToSummarize,
|
||||
messagesToSummarize: [...preparation.messagesToSummarize],
|
||||
messagesToKeep: [...preparation.messagesToKeep],
|
||||
tokensBefore: preparation.tokensBefore,
|
||||
customInstructions: undefined,
|
||||
model: this.model,
|
||||
apiKey,
|
||||
resolveApiKey: this._resolveApiKey,
|
||||
})) as SessionEventResult | undefined;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue