( text: string, nextSteps: ToolResponse['nextSteps'], nextStepParams?: ToolResponse['nextStepParams'], )
| 157 | } |
| 158 | |
| 159 | function emitNextStepsHandler( |
| 160 | text: string, |
| 161 | nextSteps: ToolResponse['nextSteps'], |
| 162 | nextStepParams?: ToolResponse['nextStepParams'], |
| 163 | ): ToolDefinition['handler'] { |
| 164 | return vi.fn(async (_params, ctx) => { |
| 165 | ctx.structuredOutput = structuredTextOutput(text); |
| 166 | if (nextSteps) ctx.nextSteps = nextSteps; |
| 167 | if (nextStepParams) ctx.nextStepParams = nextStepParams; |
| 168 | }); |
| 169 | } |
| 170 | |
| 171 | function emitErrorEventsHandler(events: AnyFragment[]): ToolDefinition['handler'] { |
| 172 | return vi.fn(async (_params, ctx) => { |
no test coverage detected