| 1 | package cli |
| 2 | |
| 3 | import ( |
| 4 | tea "charm.land/bubbletea/v2" |
| 5 | |
| 6 | "reasonix/internal/memory" |
| 7 | ) |
| 8 | |
| 9 | // showContextReport prints the window, the thresholds derived from it, and how |
| 10 | // the last maintenance pass ended. It commits a block rather than a notice |
| 11 | // because the numbers are meant to be compared with each other. |
| 12 | func (m *chatTUI) showContextReport(input string) tea.Cmd { |
| 13 | m.echoLocalCommand(input) |
| 14 | summary, detail := m.ctrl.ContextReport() |
| 15 | if detail != "" { |
| 16 | summary += "\n" + detail |
| 17 | } |
| 18 | m.commitLine(summary) |
| 19 | return nil |
| 20 | } |
| 21 | |
| 22 | func (m *chatTUI) rememberNote(note string) { |
| 23 | if note == "" { |
| 24 | m.notice("nothing to remember") |
| 25 | return |
| 26 | } |
| 27 | path, err := m.ctrl.QuickAdd(memory.ScopeProject, note) |
| 28 | if err != nil { |
| 29 | m.notice("memory: " + err.Error()) |
| 30 | return |
| 31 | } |
| 32 | m.notice("remembered → " + path) |
| 33 | } |
| 34 |