MCPcopy Create free account
hub / github.com/diillson/chatcli / writeMemoryMD

Method writeMemoryMD

cli/workspace/memory/compactor.go:216–222  ·  view source on GitHub ↗

writeMemoryMD writes MEMORY.md from the current fact index.

()

Source from the content-addressed store, hash-verified

214
215// writeMemoryMD writes MEMORY.md from the current fact index.
216func (c *Compactor) writeMemoryMD() {
217 content := c.facts.GenerateMarkdown(c.config.MaxMemoryMDSize)
218 path := c.memDir + "/MEMORY.md"
219 if err := atomicWriteFile(path, []byte(content), 0o600); err != nil {
220 c.logger.Warn("Failed to regenerate MEMORY.md", zap.Error(err))
221 }
222}
223
224// RegenerateMemoryMD is the public version for external callers.
225func (c *Compactor) RegenerateMemoryMD() {

Callers 3

RunWithLLMMethod · 0.95
RunScoreBasedMethod · 0.95
RegenerateMemoryMDMethod · 0.95

Calls 4

atomicWriteFileFunction · 0.85
GenerateMarkdownMethod · 0.80
WarnMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected