()
| 146 | } |
| 147 | |
| 148 | func (cli *ChatCLI) showLongTermMemory() { |
| 149 | content := cli.memoryStore.ReadLongTerm() |
| 150 | if content == "" { |
| 151 | fmt.Println(colorize(" "+i18n.T("memory.no_longterm"), ColorGray)) |
| 152 | return |
| 153 | } |
| 154 | |
| 155 | fmt.Println() |
| 156 | fmt.Println(colorize(" "+i18n.T("memory.header.longterm"), ColorCyan+ColorBold)) |
| 157 | fmt.Println(colorize(" ─────────────────────────────────────────", ColorGray)) |
| 158 | for _, line := range strings.Split(strings.TrimSpace(content), "\n") { |
| 159 | fmt.Printf(" %s\n", line) |
| 160 | } |
| 161 | fmt.Println() |
| 162 | } |
| 163 | |
| 164 | func (cli *ChatCLI) loadMemoryIntoContext(dateStr string) { |
| 165 | date, err := parseFlexibleDate(dateStr) |
no test coverage detected