( executor: CommandExecutor, )
| 159 | } |
| 160 | |
| 161 | export function createListSimsExecutor( |
| 162 | executor: CommandExecutor, |
| 163 | ): NonStreamingExecutor<ListSimsParams, SimulatorListResult> { |
| 164 | return async (params) => { |
| 165 | try { |
| 166 | const simulators = await listSimulators(executor, params); |
| 167 | |
| 168 | return createSimulatorListResult(simulators); |
| 169 | } catch (error) { |
| 170 | return createSimulatorListErrorResult(toErrorMessage(error)); |
| 171 | } |
| 172 | }; |
| 173 | } |
| 174 | |
| 175 | function setStructuredOutput(ctx: ToolHandlerContext, result: SimulatorListResult): void { |
| 176 | ctx.structuredOutput = { |
no test coverage detected