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