(params: {
didError: boolean;
error?: string;
diagnosticMessage?: string;
threads?: DebugThread[];
})
| 27 | type DebugStackResult = DebugStackResultDomainResult; |
| 28 | |
| 29 | function createDebugStackResult(params: { |
| 30 | didError: boolean; |
| 31 | error?: string; |
| 32 | diagnosticMessage?: string; |
| 33 | threads?: DebugThread[]; |
| 34 | }): DebugStackResult { |
| 35 | return { |
| 36 | kind: 'debug-stack-result', |
| 37 | didError: params.didError, |
| 38 | error: params.error ?? null, |
| 39 | ...(params.didError |
| 40 | ? { |
| 41 | diagnostics: createBasicDiagnostics({ |
| 42 | errors: [params.diagnosticMessage ?? params.error ?? 'Unknown error'], |
| 43 | }), |
| 44 | } |
| 45 | : {}), |
| 46 | ...(params.threads ? { threads: params.threads } : {}), |
| 47 | }; |
| 48 | } |
| 49 | |
| 50 | function setStructuredOutput(ctx: ToolHandlerContext, result: DebugStackResult): void { |
| 51 | ctx.structuredOutput = { |
no test coverage detected