Make compression threshold editable in the UI. (#12317)

This commit is contained in:
Tommaso Sciortino
2025-10-30 16:03:58 -07:00
committed by GitHub
parent 643f2c0958
commit 3332703fca
10 changed files with 41 additions and 109 deletions
+5 -9
View File
@@ -92,10 +92,6 @@ export interface BugCommandSettings {
urlTemplate: string;
}
export interface ChatCompressionSettings {
contextPercentageThreshold?: number;
}
export interface SummarizeToolOutputSettings {
tokenBudget?: number;
}
@@ -262,7 +258,7 @@ export interface ConfigParameters {
folderTrust?: boolean;
ideMode?: boolean;
loadMemoryFromIncludeDirectories?: boolean;
chatCompression?: ChatCompressionSettings;
compressionThreshold?: number;
interactive?: boolean;
trustedFolder?: boolean;
useRipgrep?: boolean;
@@ -359,7 +355,7 @@ export class Config {
| undefined;
private readonly experimentalZedIntegration: boolean = false;
private readonly loadMemoryFromIncludeDirectories: boolean = false;
private readonly chatCompression: ChatCompressionSettings | undefined;
private readonly compressionThreshold: number | undefined;
private readonly interactive: boolean;
private readonly ptyInfo: string;
private readonly trustedFolder: boolean | undefined;
@@ -462,7 +458,7 @@ export class Config {
this.ideMode = params.ideMode ?? false;
this.loadMemoryFromIncludeDirectories =
params.loadMemoryFromIncludeDirectories ?? false;
this.chatCompression = params.chatCompression;
this.compressionThreshold = params.compressionThreshold;
this.interactive = params.interactive ?? false;
this.ptyInfo = params.ptyInfo ?? 'child_process';
this.trustedFolder = params.trustedFolder;
@@ -1003,8 +999,8 @@ export class Config {
this.fileSystemService = fileSystemService;
}
getChatCompression(): ChatCompressionSettings | undefined {
return this.chatCompression;
getCompressionThreshold(): number | undefined {
return this.compressionThreshold;
}
isInteractiveShellEnabled(): boolean {