Skip to content

Commit 0adb503

Browse files
authored
Remove stale persistentState (#1046)
Resolves: #1045
1 parent 4720192 commit 0adb503

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/features/terminal/shells/common/shellUtils.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { PythonCommandRunConfiguration, PythonEnvironment } from '../../../../api';
22
import { traceInfo } from '../../../../common/logging';
3-
import { getGlobalPersistentState } from '../../../../common/persistentState';
43
import { timeout } from '../../../../common/utils/asyncUtils';
54
import { isWindows } from '../../../../common/utils/platformUtils';
65
import { activeTerminalShellIntegration } from '../../../../common/window.apis';
@@ -9,8 +8,6 @@ import { ShellConstants } from '../../../common/shellConstants';
98
import { quoteArgs } from '../../../execution/execUtils';
109
import { SHELL_INTEGRATION_POLL_INTERVAL, SHELL_INTEGRATION_TIMEOUT } from '../../utils';
1110

12-
export const SHELL_INTEGRATION_STATE_KEY = 'shellIntegration.enabled';
13-
1411
function getCommandAsString(command: PythonCommandRunConfiguration[], shell: string, delimiter: string): string {
1512
const parts = [];
1613
for (const cmd of command) {
@@ -119,10 +116,6 @@ export async function shellIntegrationForActiveTerminal(name: string, profile?:
119116
`SHELL: Shell integration is available on your active terminal, with name ${name} and profile ${profile}. Python activate scripts will be evaluated at shell integration level, except in WSL.`,
120117
);
121118

122-
// Update persistent storage to reflect that shell integration is available
123-
const persistentState = await getGlobalPersistentState();
124-
await persistentState.set(SHELL_INTEGRATION_STATE_KEY, true);
125-
126119
return true;
127120
}
128121
return false;
@@ -134,7 +127,6 @@ export function isWsl(): boolean {
134127
}
135128

136129
export async function getShellIntegrationEnabledCache(): Promise<boolean> {
137-
const persistentState = await getGlobalPersistentState();
138130
const shellIntegrationInspect =
139131
getConfiguration('terminal.integrated').inspect<boolean>('shellIntegration.enabled');
140132

@@ -158,7 +150,6 @@ export async function getShellIntegrationEnabledCache(): Promise<boolean> {
158150
}
159151
}
160152

161-
await persistentState.set(SHELL_INTEGRATION_STATE_KEY, shellIntegrationEnabled);
162153
return shellIntegrationEnabled;
163154
}
164155

0 commit comments

Comments
 (0)