feat(core): Render memory hierarchically in context. (#18350)

This commit is contained in:
joshualitt
2026-02-09 18:01:59 -08:00
committed by GitHub
parent 5d0570b113
commit 89d4556c45
25 changed files with 1189 additions and 530 deletions
+6 -3
View File
@@ -55,6 +55,7 @@ import {
coreEvents,
CoreEvent,
refreshServerHierarchicalMemory,
flattenMemory,
type MemoryChangedPayload,
writeToStdout,
disableMouseEvents,
@@ -871,12 +872,14 @@ Logging in with Google... Restarting Gemini CLI to continue.
const { memoryContent, fileCount } =
await refreshServerHierarchicalMemory(config);
const flattenedMemory = flattenMemory(memoryContent);
historyManager.addItem(
{
type: MessageType.INFO,
text: `Memory refreshed successfully. ${
memoryContent.length > 0
? `Loaded ${memoryContent.length} characters from ${fileCount} file(s).`
flattenedMemory.length > 0
? `Loaded ${flattenedMemory.length} characters from ${fileCount} file(s).`
: 'No memory content found.'
}`,
},
@@ -884,7 +887,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
);
if (config.getDebugMode()) {
debugLogger.log(
`[DEBUG] Refreshed memory content in config: ${memoryContent.substring(
`[DEBUG] Refreshed memory content in config: ${flattenedMemory.substring(
0,
200,
)}...`,