mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-22 07:41:23 -07:00
feat(core): Land ContextCompressionService (#24483)
This commit is contained in:
@@ -25,15 +25,18 @@ export async function discoverJitContext(
|
||||
return '';
|
||||
}
|
||||
|
||||
const contextManager = config.getContextManager();
|
||||
if (!contextManager) {
|
||||
const memoryContextManager = config.getMemoryContextManager();
|
||||
if (!memoryContextManager) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const trustedRoots = [...config.getWorkspaceContext().getDirectories()];
|
||||
|
||||
try {
|
||||
return await contextManager.discoverContext(accessedPath, trustedRoots);
|
||||
return await memoryContextManager.discoverContext(
|
||||
accessedPath,
|
||||
trustedRoots,
|
||||
);
|
||||
} catch {
|
||||
// JIT context is supplementary — never fail the tool's primary operation.
|
||||
return '';
|
||||
|
||||
Reference in New Issue
Block a user