mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 18:01:22 +00:00
Use AgentMessage in BranchPreparation and add BranchSummarySettings
- BranchPreparation now uses AgentMessage[] instead of custom type - Reuse getMessageFromEntry pattern from compaction.ts - Add BranchSummarySettings with reserveFraction to settings.json - Add getBranchSummarySettings() to SettingsManager - Use settings for reserveFraction instead of hardcoded value
This commit is contained in:
parent
08fab16e2d
commit
839a46e6fe
3 changed files with 110 additions and 107 deletions
|
|
@ -1650,11 +1650,13 @@ export class AgentSession {
|
|||
if (!apiKey) {
|
||||
throw new Error(`No API key for ${model.provider}`);
|
||||
}
|
||||
const branchSummarySettings = this.settingsManager.getBranchSummarySettings();
|
||||
const result = await generateBranchSummary(entriesToSummarize, {
|
||||
model,
|
||||
apiKey,
|
||||
signal: this._branchSummaryAbortController.signal,
|
||||
customInstructions: options.customInstructions,
|
||||
reserveFraction: branchSummarySettings.reserveFraction,
|
||||
});
|
||||
this._branchSummaryAbortController = undefined;
|
||||
if (result.aborted) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue