MCPcopy Create free account
hub / github.com/facebook/pyrefly / showInstallWarning

Method showInstallWarning

lsp/src/python-environment.ts:71–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69 }
70
71 private showInstallWarning() {
72 if (this.context.globalState.get(DISMISSED_KEY)) {
73 return;
74 }
75 const install = 'Install';
76 const dismiss = "Don't Show Again";
77 vscode.window
78 .showInformationMessage(
79 'Install the Python extension (ms-python.python) for improved experience with Pyrefly, including automatic Python environment detection.',
80 install,
81 dismiss,
82 )
83 .then(selection => {
84 if (selection === install) {
85 vscode.commands.executeCommand(
86 'workbench.extensions.installExtension',
87 'ms-python.python',
88 );
89 } else if (selection === dismiss) {
90 this.context.globalState.update(DISMISSED_KEY, true);
91 }
92 });
93 }
94
95 private watchExtensionChanges() {
96 let hadPyEnvs = !!vscode.extensions.getExtension(

Callers 1

constructorMethod · 0.95

Calls 2

getMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected