(messages: string[])
| 556 | } |
| 557 | |
| 558 | function extractState(messages: string[]): string { |
| 559 | // Look at last assistant message for state |
| 560 | const last = messages[messages.length - 1] || ""; |
| 561 | |
| 562 | // Look for state indicators |
| 563 | const stateMatch = last.match( |
| 564 | /(?:currently|now|at this point|so far|status:?)\s*(.+?)(?:\.|$)/i |
| 565 | ); |
| 566 | if (stateMatch) return stateMatch[0].trim().slice(0, 300); |
| 567 | |
| 568 | // Use last meaningful line |
| 569 | const lines = last.split("\n").filter((l) => l.trim().length > 20); |
| 570 | return lines[lines.length - 1]?.trim()?.slice(0, 300) || ""; |
| 571 | } |
| 572 | |
| 573 | function extractNextSteps(messages: string[]): string[] { |
| 574 | const steps: string[] = []; |
no outgoing calls
no test coverage detected