fix(core): improve headless mode detection for flags and query args (#18855)

This commit is contained in:
Gal Zahavi
2026-02-11 16:20:54 -08:00
committed by GitHub
parent 941691ce72
commit 08e8eeab84
5 changed files with 94 additions and 25 deletions
@@ -449,6 +449,14 @@ describe('Trusted Folders', () => {
false,
);
});
it('should return true for isPathTrusted when isHeadlessMode is true', async () => {
const geminiCore = await import('@google/gemini-cli-core');
vi.spyOn(geminiCore, 'isHeadlessMode').mockReturnValue(true);
const folders = loadTrustedFolders();
expect(folders.isPathTrusted('/any-untrusted-path')).toBe(true);
});
});
describe('Trusted Folders Caching', () => {