(raw: string)
| 22 | * FTS operators like AND/OR/NEAR/"/*) and OR-joined so recall is broad. Returns '' when there's |
| 23 | * nothing searchable, so the caller can fall back. PURE — unit-tested. */ |
| 24 | export function buildFtsMatch(raw: string): string { |
| 25 | const toks = dedupe(factTokens(raw)); |
| 26 | if (!toks.length) return ''; |
| 27 | return toks.map(t => `"${t}"`).join(' OR '); |
| 28 | } |
| 29 | |
| 30 | export interface Message { |
| 31 | role: 'system' | 'user' | 'assistant' | 'tool'; |
no test coverage detected