mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-22 02:54:31 -07:00
fix(core): attempt compression before context overflow check (#16914)
This commit is contained in:
@@ -1123,9 +1123,9 @@ describe('fileUtils', () => {
|
||||
const formatted = formatTruncatedToolOutput(content, outputFile);
|
||||
|
||||
expect(formatted).toContain(
|
||||
'Output too large. Showing the last 10,000 characters',
|
||||
'Output too large. Showing the last 4,000 characters',
|
||||
);
|
||||
expect(formatted.endsWith(content.slice(-10000))).toBe(true);
|
||||
expect(formatted.endsWith(content.slice(-4000))).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -517,7 +517,7 @@ export async function fileExists(filePath: string): Promise<boolean> {
|
||||
}
|
||||
|
||||
const MAX_TRUNCATED_LINE_WIDTH = 1000;
|
||||
const MAX_TRUNCATED_CHARS = 10000;
|
||||
const MAX_TRUNCATED_CHARS = 4000;
|
||||
|
||||
/**
|
||||
* Formats a truncated message for tool output, handling multi-line and single-line (elephant) cases.
|
||||
|
||||
Reference in New Issue
Block a user