()
| 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( |
no test coverage detected