MCPcopy Index your code
hub / github.com/REditorSupport/vscode-R / deploySessionWatcher

Function deploySessionWatcher

src/session.ts:70–84  ·  view source on GitHub ↗
(extensionPath: string)

Source from the content-addressed store, hash-verified

68let activeBrowserExternalUri: Uri | undefined;
69
70export function deploySessionWatcher(extensionPath: string): void {
71 console.info(`[deploySessionWatcher] extensionPath: ${extensionPath}`);
72 resDir = path.join(extensionPath, 'dist', 'resources');
73
74 const initPath = path.join(extensionPath, 'R', 'session', 'init.R');
75 const linkPath = path.join(homeExtDir(), 'init.R');
76 fs.writeFileSync(linkPath, `local(source("${initPath.replace(/\\/g, '\\\\')}", chdir = TRUE, local = TRUE))\n`);
77
78 writeSettings();
79 workspace.onDidChangeConfiguration(event => {
80 if (event.affectsConfiguration('r')) {
81 writeSettings();
82 }
83 });
84}
85
86export function startRequestWatcher(sessionStatusBarItem: StatusBarItem): void {
87 console.info('[startRequestWatcher] Starting');

Callers

nothing calls this directly

Calls 2

homeExtDirFunction · 0.90
writeSettingsFunction · 0.85

Tested by

no test coverage detected