mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-29 06:25:16 -07:00
fix(core): attempt compression before context overflow check (#16914)
This commit is contained in:
@@ -490,6 +490,7 @@ export class Config {
|
||||
private readonly enablePromptCompletion: boolean = false;
|
||||
private readonly truncateToolOutputThreshold: number;
|
||||
private readonly truncateToolOutputLines: number;
|
||||
private compressionTruncationCounter = 0;
|
||||
private readonly enableToolOutputTruncation: boolean;
|
||||
private initialized: boolean = false;
|
||||
readonly storage: Storage;
|
||||
@@ -1585,6 +1586,8 @@ export class Config {
|
||||
return this.compressionThreshold;
|
||||
}
|
||||
|
||||
await this.ensureExperimentsLoaded();
|
||||
|
||||
const remoteThreshold =
|
||||
this.experiments?.flags[ExperimentFlags.CONTEXT_COMPRESSION_THRESHOLD]
|
||||
?.floatValue;
|
||||
@@ -1766,6 +1769,10 @@ export class Config {
|
||||
return this.truncateToolOutputLines;
|
||||
}
|
||||
|
||||
getNextCompressionTruncationId(): number {
|
||||
return ++this.compressionTruncationCounter;
|
||||
}
|
||||
|
||||
getUseWriteTodos(): boolean {
|
||||
return this.useWriteTodos;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user