Skip to content

Commit ed29289

Browse files
committed
updates to reduce times computed
1 parent f5aeea3 commit ed29289

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

package.nls.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"python-envs.terminal.revertStartupScriptChanges.title": "Revert Shell Startup Script Changes",
1414
"python-envs.setEnvManager.title": "Set Environment Manager",
1515
"python-envs.setPkgManager.title": "Set Package Manager",
16-
"python-envs.addPythonProject.title": "Add as Python Project",
16+
"python-envs.addPythonProject.title": "Add Python Project",
1717
"python-envs.removePythonProject.title": "Remove Python Project",
1818
"python-envs.copyEnvPath.title": "Copy Environment Path",
1919
"python-envs.copyProjectPath.title": "Copy Project Path",
@@ -37,4 +37,4 @@
3737
"python-envs.uninstallPackage.title": "Uninstall Package",
3838
"python.languageModelTools.python_environment.userDescription": "Get Python environment info for a file or path, including version, packages, and the command to run it.",
3939
"python.languageModelTools.python_install_package.userDescription": "Installs Python packages in the given workspace."
40-
}
40+
}

src/extension.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { commands, ExtensionContext, LogOutputChannel, Terminal, Uri, workspace, window } from 'vscode';
1+
import { commands, ExtensionContext, LogOutputChannel, Terminal, Uri, window } from 'vscode';
22
import { PythonEnvironment, PythonEnvironmentApi } from './api';
33
import { ensureCorrectVersion } from './common/extVersion';
44
import { registerTools } from './common/lm.apis';
@@ -95,26 +95,6 @@ export async function activate(context: ExtensionContext): Promise<PythonEnviron
9595
return projectManager.get(uri) !== undefined;
9696
};
9797

98-
// Update the context key when explorer selection changes
99-
context.subscriptions.push(
100-
window.onDidChangeActiveTextEditor((editor) => {
101-
if (editor) {
102-
commands.executeCommand('setContext', 'python-envs:isExistingProject', isExistingProject(editor.document.uri));
103-
}
104-
}),
105-
window.onDidChangeWindowState(() => {
106-
const activeEditor = window.activeTextEditor;
107-
if (activeEditor) {
108-
commands.executeCommand('setContext', 'python-envs:isExistingProject', isExistingProject(activeEditor.document.uri));
109-
}
110-
}),
111-
workspace.onDidOpenTextDocument((document) => {
112-
if (window.activeTextEditor && window.activeTextEditor.document === document) {
113-
commands.executeCommand('setContext', 'python-envs:isExistingProject', isExistingProject(document.uri));
114-
}
115-
})
116-
);
117-
11898
const envVarManager: EnvVarManager = new PythonEnvVariableManager(projectManager);
11999
context.subscriptions.push(envVarManager);
120100

0 commit comments

Comments
 (0)