(params: {
didError: boolean;
error?: string;
diagnosticMessage?: string;
debugSessionId?: string;
})
| 21 | type DebugDetachResult = DebugSessionActionDomainResult; |
| 22 | |
| 23 | function createDebugDetachResult(params: { |
| 24 | didError: boolean; |
| 25 | error?: string; |
| 26 | diagnosticMessage?: string; |
| 27 | debugSessionId?: string; |
| 28 | }): DebugDetachResult { |
| 29 | return { |
| 30 | kind: 'debug-session-action', |
| 31 | didError: params.didError, |
| 32 | error: params.error ?? null, |
| 33 | ...(params.didError |
| 34 | ? { |
| 35 | diagnostics: createBasicDiagnostics({ |
| 36 | errors: [params.diagnosticMessage ?? params.error ?? 'Unknown error'], |
| 37 | }), |
| 38 | } |
| 39 | : {}), |
| 40 | action: 'detach', |
| 41 | ...(params.debugSessionId |
| 42 | ? { |
| 43 | session: { |
| 44 | debugSessionId: params.debugSessionId, |
| 45 | connectionState: 'detached', |
| 46 | }, |
| 47 | } |
| 48 | : {}), |
| 49 | }; |
| 50 | } |
| 51 | |
| 52 | function setStructuredOutput(ctx: ToolHandlerContext, result: DebugDetachResult): void { |
| 53 | ctx.structuredOutput = { |
no test coverage detected