moaToolsetForRun decides the capabilities for a run: knowledge follows the same gate as the chat exception (enabled + a base attached to the session); recall is granted only when the compression layer is wired AND the shared history actually carries a CCR marker — offering it otherwise would be a de
(history []models.Message)
| 78 | // retrieval did not surface — the pull closes that gap (and @moa in |
| 79 | // agent/coder mode gets no memory push at all). |
| 80 | func (cli *ChatCLI) moaToolsetForRun(history []models.Message) moaToolset { |
| 81 | ts := moaToolset{ |
| 82 | knowledge: cli.chatKnowledgeActive(), |
| 83 | memory: loadMemoryMode() != memModeOff, |
| 84 | } |
| 85 | if cli.compressionLayer != nil && historyHasCCRMarkers(history) { |
| 86 | ts.recall = true |
| 87 | } |
| 88 | return ts |
| 89 | } |
| 90 | |
| 91 | // historyHasCCRMarkers reports whether any message carries a "<<ccr:KEY>>" |
| 92 | // compression marker, using the compress package's own key scanner. |