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

Function cleanupSession

src/session.ts:845–859  ·  view source on GitHub ↗
(pidArg: string)

Source from the content-addressed store, hash-verified

843}
844
845export async function cleanupSession(pidArg: string): Promise<void> {
846 if (pid === pidArg) {
847 if (sessionStatusBarItem) {
848 sessionStatusBarItem.text = 'R: (not attached)';
849 sessionStatusBarItem.tooltip = 'Click to attach active terminal.';
850 }
851 server = undefined;
852 workspaceData.globalenv = {};
853 workspaceData.loaded_namespaces = [];
854 workspaceData.search = [];
855 rWorkspace?.refresh();
856 removeSessionFiles();
857 await setContext('rSessionActive', false);
858 }
859}
860
861async function watchProcess(pid: string): Promise<string> {
862 function pidIsRunning(pid: number) {

Callers 2

deleteTerminalFunction · 0.90
updateRequestFunction · 0.85

Calls 3

setContextFunction · 0.90
removeSessionFilesFunction · 0.85
refreshMethod · 0.65

Tested by

no test coverage detected