(messages: string[])
| 571 | } |
| 572 | |
| 573 | function extractNextSteps(messages: string[]): string[] { |
| 574 | const steps: string[] = []; |
| 575 | |
| 576 | for (const msg of messages.slice(-5)) { |
| 577 | const nextMatch = msg.match( |
| 578 | /(?:next steps?|todo|remaining|still need to|should also)\s*:?\s*\n?((?:\s*[-*\d.]+\s*.+\n?)+)/i |
| 579 | ); |
| 580 | if (nextMatch) { |
| 581 | const items = nextMatch[1] |
| 582 | .split("\n") |
| 583 | .map((l) => l.replace(/^[\s\-*\d.]+/, "").trim()) |
| 584 | .filter((l) => l.length > 5); |
| 585 | steps.push(...items); |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | return [...new Set(steps)].slice(0, 8); |
| 590 | } |
| 591 | |
| 592 | function extractTaskFromMarkdown(content: string): string { |
| 593 | // Get title from first heading |
no outgoing calls
no test coverage detected