(part: ToolPart, text: string)
| 732 | } |
| 733 | |
| 734 | function failTool(part: ToolPart, text: string): SessionCommit { |
| 735 | return toolCommit(part, { |
| 736 | text, |
| 737 | phase: "final", |
| 738 | toolState: "error", |
| 739 | toolError: text, |
| 740 | }) |
| 741 | } |
| 742 | |
| 743 | // Emits "interrupted" final entries for all in-flight parts. Called when a turn is aborted. |
| 744 | export function flushInterrupted(data: SessionData, commits: SessionCommit[]) { |
no test coverage detected