(text, limit = 8)
| 80 | } |
| 81 | |
| 82 | function extractPatternLines(text, limit = 8) { |
| 83 | return text |
| 84 | .split(/\r?\n/) |
| 85 | .map((line) => line.trim()) |
| 86 | .filter((line) => line.startsWith('- ') || line.startsWith('**What') || line.startsWith('**Why') || line.startsWith('| `/')) |
| 87 | .slice(0, limit); |
| 88 | } |
| 89 | |
| 90 | function block(id, type, scope, sources, body, confidence = 'medium', options = {}) { |
| 91 | return { |