( sessionId: string, reason?: string, )
| 62 | } |
| 63 | |
| 64 | export function terminateTerminalSession( |
| 65 | sessionId: string, |
| 66 | reason?: string, |
| 67 | ): Promise<TerminalSessionResponse> { |
| 68 | return apiFetch<TerminalSessionResponse>(`/terminals/${sessionId}/terminate`, { |
| 69 | method: 'POST', |
| 70 | body: reason === undefined ? undefined : JSON.stringify({ reason }), |
| 71 | }) |
| 72 | } |
| 73 | |
| 74 | export function terminalWebSocketUrl(sessionId: string, attachToken: string): string { |
| 75 | const url = new URL( |
no test coverage detected