feat(core): Implement JIT context memory loading and UI sync (#14469)

This commit is contained in:
Sandy Tao
2025-12-19 07:04:03 -10:00
committed by GitHub
parent 3c92bdb1ad
commit 2e229d3bb6
14 changed files with 292 additions and 91 deletions

View File

@@ -87,8 +87,18 @@ export const memoryCommand: SlashCommand = {
try {
const config = context.services.config;
if (config) {
const { memoryContent, fileCount } =
await refreshServerHierarchicalMemory(config);
let memoryContent = '';
let fileCount = 0;
if (config.isJitContextEnabled()) {
await config.getContextManager()?.refresh();
memoryContent = config.getUserMemory();
fileCount = config.getGeminiMdFileCount();
} else {
const result = await refreshServerHierarchicalMemory(config);
memoryContent = result.memoryContent;
fileCount = result.fileCount;
}
await config.updateSystemInstructionIfInitialized();