You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add "Don't Show Again" button to env file notification
Adds a "Don't Show Again" button to the information notification that
appears when an environment file is configured but terminal environment
injection is disabled. The preference is persisted in global state so
it survives between sessions.
- Add `Common.dontShowAgain` localized string
- Add `ENV_FILE_NOTIFICATION_DONT_SHOW_KEY` persistent state key
- Use `showInformationMessage` wrapper instead of direct `window` API
- Extract notification logic to `showEnvFileNotification()` method
- Add 5 unit tests covering the new behavior
Fixes#419
Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/vscode-python-environments/sessions/d9efb122-775e-4477-9005-10a94641311d
* Manages injection of workspace-specific environment variables into VS Code terminals
21
25
* using the GlobalEnvironmentVariableCollection API.
@@ -65,9 +69,9 @@ export class TerminalEnvVarInjector implements Disposable {
65
69
66
70
// Only show notification when env vars change and we have an env file but injection is disabled
67
71
if(!useEnvFile&&envFilePath){
68
-
window.showInformationMessage(
69
-
'An environment file is configured but terminal environment injection is disabled. Enable "python.terminal.useEnvFile" to use environment variables from .env files in terminals.',
70
-
);
72
+
this.showEnvFileNotification().catch((error)=>{
73
+
traceError('Failed to show env file notification:',error);
74
+
});
71
75
}
72
76
73
77
if(args.changeType===2){
@@ -208,6 +212,26 @@ export class TerminalEnvVarInjector implements Disposable {
208
212
}
209
213
}
210
214
215
+
/**
216
+
* Show a notification about env file injection being disabled, with a "Don't Show Again" option.
'An environment file is configured but terminal environment injection is disabled. Enable "python.terminal.useEnvFile" to use environment variables from .env files in terminals.',
0 commit comments