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

Method drainMemoryNotices

cli/memory_notice.go:37–46  ·  view source on GitHub ↗

drainMemoryNotices prints and clears any queued notices. It runs on the main loop so writes never race with go-prompt's redraw.

()

Source from the content-addressed store, hash-verified

35// drainMemoryNotices prints and clears any queued notices. It runs on the
36// main loop so writes never race with go-prompt's redraw.
37func (cli *ChatCLI) drainMemoryNotices() {
38 cli.memNoticeMu.Lock()
39 notices := cli.memNotices
40 cli.memNotices = nil
41 cli.memNoticeMu.Unlock()
42
43 for _, n := range notices {
44 fmt.Println(colorize(" "+n, ColorGray))
45 }
46}
47
48// formatMemoryNotice renders an ExtractionSummary as a compact one-liner,
49// e.g. "memory: +2 facts, profile updated, +1 project". Returns "" when

Callers 3

executorMethod · 0.95

Calls 3

colorizeFunction · 0.85
LockMethod · 0.80
UnlockMethod · 0.80

Tested by 1