()
| 275 | // This ensures that guests without read/write access can still view the |
| 276 | // R workspace |
| 277 | public requestAttach(): void { |
| 278 | if (this._isStarted) { |
| 279 | void liveShareRequest(Callback.RequestAttachGuest); |
| 280 | // focus guest term if it exists |
| 281 | const rTermNameOptions = ['R [Shared]', 'R Interactive [Shared]']; |
| 282 | const activeTerminalName = vscode.window.activeTerminal?.name; |
| 283 | if (activeTerminalName && !rTermNameOptions.includes(activeTerminalName)) { |
| 284 | for (const [i] of vscode.window.terminals.entries()) { |
| 285 | const terminal = vscode.window.terminals[i]; |
| 286 | const terminalName = terminal.name; |
| 287 | if (rTermNameOptions.includes(terminalName)) { |
| 288 | terminal.show(true); |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | } |
| 293 | } |
| 294 | // Used to ensure that the guest can run workspace viewer commands |
| 295 | // e.g.view, remove, clean |
| 296 | // * Permissions are handled host-side |
no test coverage detected