(parts: SessionV1.Part[])
| 98 | type ErrorToolPart = SessionV1.ToolPart & { state: SessionV1.ToolStateError } |
| 99 | |
| 100 | function completedTool(parts: SessionV1.Part[]) { |
| 101 | const part = toolPart(parts) |
| 102 | expect(part?.state.status).toBe("completed") |
| 103 | return part?.state.status === "completed" ? (part as CompletedToolPart) : undefined |
| 104 | } |
| 105 | |
| 106 | function errorTool(parts: SessionV1.Part[]) { |
| 107 | const part = toolPart(parts) |
no test coverage detected