feat(core): Land ContextCompressionService (#24483)

This commit is contained in:
joshualitt
2026-04-02 09:22:04 -07:00
committed by GitHub
parent 826bc3359a
commit aee2dd8577
32 changed files with 1160 additions and 229 deletions
+6 -3
View File
@@ -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 '';