(answer: string)
| 76 | |
| 77 | /** Pull bulleted/■ issue lines out of the vision answer (everything after the verdict token). */ |
| 78 | export function extractIssues(answer: string): string[] { |
| 79 | const lines = (answer || '').split('\n').map(l => l.trim()); |
| 80 | const out: string[] = []; |
| 81 | for (const l of lines) { |
| 82 | const m = l.match(/^[-*•]\s+(.*)$/); |
| 83 | if (m && m[1] && !/^none\.?$/i.test(m[1].trim())) out.push(m[1].trim()); |
| 84 | } |
| 85 | return out; |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Assemble the final report. Runtime/page errors are authoritative: if the page threw, the |
no test coverage detected