( api: APIClient, workspaceId: string, options?: TerminalSessionCreateOptions )
| 70 | * @returns The created session with sessionId |
| 71 | */ |
| 72 | export async function createTerminalSession( |
| 73 | api: APIClient, |
| 74 | workspaceId: string, |
| 75 | options?: TerminalSessionCreateOptions |
| 76 | ): Promise<{ sessionId: string; workspaceId: string; cols: number; rows: number }> { |
| 77 | return api.terminal.create({ |
| 78 | workspaceId, |
| 79 | cols: DEFAULT_TERMINAL_SIZE.cols, |
| 80 | rows: DEFAULT_TERMINAL_SIZE.rows, |
| 81 | initialCommand: options?.initialCommand, |
| 82 | }); |
| 83 | } |
no test coverage detected