MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / requestAttach

Method requestAttach

src/liveShare/index.ts:277–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

startServiceMethod · 0.95
attachActiveGuestFunction · 0.80

Calls 2

liveShareRequestFunction · 0.90
showMethod · 0.80

Tested by

no test coverage detected