* Format selected entries as a system-prompt block. Returns '' if nothing * matches.
(query, opts = {})
| 237 | * matches. |
| 238 | */ |
| 239 | formatForPrompt(query, opts = {}) { |
| 240 | const entries = this.selectForQuery(query, opts); |
| 241 | if (entries.length === 0) return ''; |
| 242 | let out = '\n\nRelevant reference notes:\n'; |
| 243 | for (const e of entries) { |
| 244 | out += `\n--- ${e.relPath} ---\n${e.content}\n`; |
| 245 | } |
| 246 | return out; |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * Drop the cached index — next call rebuilds. Useful in tests or after |
nothing calls this directly
no test coverage detected