(state: EventHandlerState)
| 526 | |
| 527 | export const createEventHandler = |
| 528 | (state: EventHandlerState) => (event: SDKEvent) => { |
| 529 | return match(event) |
| 530 | .with({ type: 'subagent_start' }, (e) => handleSubagentStart(state, e)) |
| 531 | .with({ type: 'subagent_finish' }, (e) => handleSubagentFinish(state, e)) |
| 532 | .with({ type: 'tool_call' }, (e) => handleToolCall(state, e)) |
| 533 | .with({ type: 'tool_result' }, (e) => handleToolResult(state, e)) |
| 534 | .with({ type: 'finish' }, (e) => handleFinish(state, e)) |
| 535 | .otherwise(() => undefined) |
| 536 | } |
no test coverage detected