(params: {
didError: boolean;
error?: string;
diagnosticMessage?: string;
})
| 16 | type OpenSimResult = SimulatorActionResultDomainResult; |
| 17 | |
| 18 | function createOpenSimResult(params: { |
| 19 | didError: boolean; |
| 20 | error?: string; |
| 21 | diagnosticMessage?: string; |
| 22 | }): OpenSimResult { |
| 23 | return { |
| 24 | kind: 'simulator-action-result', |
| 25 | didError: params.didError, |
| 26 | error: params.error ?? null, |
| 27 | summary: { |
| 28 | status: params.didError ? 'FAILED' : 'SUCCEEDED', |
| 29 | }, |
| 30 | action: { |
| 31 | type: 'open', |
| 32 | }, |
| 33 | ...(params.diagnosticMessage |
| 34 | ? { diagnostics: createBasicDiagnostics({ errors: [params.diagnosticMessage] }) } |
| 35 | : {}), |
| 36 | }; |
| 37 | } |
| 38 | |
| 39 | function setStructuredOutput(ctx: ToolHandlerContext, result: OpenSimResult): void { |
| 40 | ctx.structuredOutput = { |
no test coverage detected