(params: {
simulatorId?: string;
didError: boolean;
error?: string;
diagnosticMessage?: string;
})
| 47 | ); |
| 48 | |
| 49 | function createBootSimResult(params: { |
| 50 | simulatorId?: string; |
| 51 | didError: boolean; |
| 52 | error?: string; |
| 53 | diagnosticMessage?: string; |
| 54 | }): BootSimResult { |
| 55 | return { |
| 56 | kind: 'simulator-action-result', |
| 57 | didError: params.didError, |
| 58 | error: params.error ?? null, |
| 59 | summary: { |
| 60 | status: params.didError ? 'FAILED' : 'SUCCEEDED', |
| 61 | }, |
| 62 | action: { |
| 63 | type: 'boot', |
| 64 | }, |
| 65 | ...(params.diagnosticMessage |
| 66 | ? { diagnostics: createBasicDiagnostics({ errors: [params.diagnosticMessage] }) } |
| 67 | : {}), |
| 68 | ...(params.simulatorId |
| 69 | ? { |
| 70 | artifacts: { |
| 71 | simulatorId: params.simulatorId, |
| 72 | }, |
| 73 | } |
| 74 | : {}), |
| 75 | }; |
| 76 | } |
| 77 | |
| 78 | function setStructuredOutput(ctx: ToolHandlerContext, result: BootSimResult): void { |
| 79 | ctx.structuredOutput = { |
no test coverage detected