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:
@@ -8,6 +8,10 @@ export interface CompactionSettings {
|
||||
keepRecentTokens?: number; // default: 20000
|
||||
}
|
||||
|
||||
export interface BranchSummarySettings {
|
||||
reserveFraction?: number; // default: 0.2 (fraction of context window reserved for summary)
|
||||
}
|
||||
|
||||
export interface RetrySettings {
|
||||
enabled?: boolean; // default: true
|
||||
maxRetries?: number; // default: 3
|
||||
@@ -38,6 +42,7 @@ export interface Settings {
|
||||
queueMode?: "all" | "one-at-a-time";
|
||||
theme?: string;
|
||||
compaction?: CompactionSettings;
|
||||
branchSummary?: BranchSummarySettings;
|
||||
retry?: RetrySettings;
|
||||
hideThinkingBlock?: boolean;
|
||||
shellPath?: string; // Custom shell path (e.g., for Cygwin users on Windows)
|
||||
@@ -255,6 +260,12 @@ export class SettingsManager {
|
||||
};
|
||||
}
|
||||
|
||||
getBranchSummarySettings(): { reserveFraction: number } {
|
||||
return {
|
||||
reserveFraction: this.settings.branchSummary?.reserveFraction ?? 0.2,
|
||||
};
|
||||
}
|
||||
|
||||
getRetryEnabled(): boolean {
|
||||
return this.settings.retry?.enabled ?? true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user