diff --git a/src/client/common/utils/localize.ts b/src/client/common/utils/localize.ts index 56818afa376d..538795e022e5 100644 --- a/src/client/common/utils/localize.ts +++ b/src/client/common/utils/localize.ts @@ -197,7 +197,7 @@ export namespace Interpreters { export const activatingTerminals = l10n.t('Reactivating terminals...'); export const activateTerminalDescription = l10n.t('Activated environment for'); export const terminalEnvVarCollectionPrompt = l10n.t( - 'The Python extension automatically activates all terminals using the selected environment, even when the name of the environment{0} is not present in the terminal prompt. [Learn more](https://aka.ms/vscodePythonTerminalActivation).', + 'The selected Python environment indicator{0} may not be present in the terminal prompt. Rest assured, all terminals are still activated. [Learn more](https://aka.ms/vscodePythonTerminalActivation).', ); export const terminalDeactivateProgress = l10n.t('Editing {0}...'); export const restartingTerminal = l10n.t('Restarting terminal and deactivating...'); diff --git a/src/client/terminals/envCollectionActivation/deactivatePrompt.ts b/src/client/terminals/envCollectionActivation/deactivatePrompt.ts index 5871cbac92c8..a9fd804291a5 100644 --- a/src/client/terminals/envCollectionActivation/deactivatePrompt.ts +++ b/src/client/terminals/envCollectionActivation/deactivatePrompt.ts @@ -65,7 +65,7 @@ export class TerminalDeactivateLimitationPrompt implements IExtensionSingleActiv } if (!isTestExecution()) { // Avoid showing prompt until startup completes. - await sleep(5000); + await sleep(6000); } this.disposableRegistry.push( this.appShell.onDidWriteTerminalData(async (e) => { diff --git a/src/client/terminals/envCollectionActivation/indicatorPrompt.ts b/src/client/terminals/envCollectionActivation/indicatorPrompt.ts index bc4c3cc90fc0..090ab54c342a 100644 --- a/src/client/terminals/envCollectionActivation/indicatorPrompt.ts +++ b/src/client/terminals/envCollectionActivation/indicatorPrompt.ts @@ -46,10 +46,17 @@ export class TerminalIndicatorPrompt implements IExtensionSingleActivationServic } if (!isTestExecution()) { // Avoid showing prompt until startup completes. - await sleep(5000); + await sleep(6000); } this.disposableRegistry.push( this.terminalManager.onDidOpenTerminal(async (terminal) => { + const hideFromUser = + 'hideFromUser' in terminal.creationOptions && terminal.creationOptions.hideFromUser; + const strictEnv = 'strictEnv' in terminal.creationOptions && terminal.creationOptions.strictEnv; + if (hideFromUser || strictEnv || terminal.creationOptions.name) { + // Only show this notification for basic terminals created using the '+' button. + return; + } const cwd = 'cwd' in terminal.creationOptions && terminal.creationOptions.cwd ? terminal.creationOptions.cwd @@ -78,6 +85,9 @@ export class TerminalIndicatorPrompt implements IExtensionSingleActivationServic } const prompts = [Common.doNotShowAgain]; const interpreter = await this.interpreterService.getActiveInterpreter(resource); + if (!interpreter) { + return; + } const terminalPromptName = getPromptName(interpreter); const selection = await this.appShell.showInformationMessage( Interpreters.terminalEnvVarCollectionPrompt.format(terminalPromptName), @@ -92,10 +102,7 @@ export class TerminalIndicatorPrompt implements IExtensionSingleActivationServic } } -function getPromptName(interpreter?: PythonEnvironment) { - if (!interpreter) { - return ''; - } +function getPromptName(interpreter: PythonEnvironment) { if (interpreter.envName) { return `, ${l10n.t('i.e')} "(${interpreter.envName})"`; } diff --git a/src/test/interpreters/activation/terminalEnvVarCollectionPrompt.unit.test.ts b/src/test/interpreters/activation/indicatorPrompt.unit.test.ts similarity index 100% rename from src/test/interpreters/activation/terminalEnvVarCollectionPrompt.unit.test.ts rename to src/test/interpreters/activation/indicatorPrompt.unit.test.ts diff --git a/src/test/tensorBoard/nbextensionCodeLensProvider.unit.test.ts b/src/test/tensorBoard/nbextensionCodeLensProvider.unit.test.ts index aef90d14eacf..d4339a4af61b 100644 --- a/src/test/tensorBoard/nbextensionCodeLensProvider.unit.test.ts +++ b/src/test/tensorBoard/nbextensionCodeLensProvider.unit.test.ts @@ -11,7 +11,7 @@ import { TensorboardExperiment } from '../../client/tensorBoard/tensorboarExperi [true, false].forEach((tbExtensionInstalled) => { suite(`Tensorboard Extension is ${tbExtensionInstalled ? 'installed' : 'not installed'}`, () => { - suite.only('TensorBoard nbextension code lens provider', () => { + suite('TensorBoard nbextension code lens provider', () => { let experiment: TensorboardExperiment; let codeLensProvider: TensorBoardNbextensionCodeLensProvider; let cancelTokenSource: CancellationTokenSource; diff --git a/src/test/tensorBoard/tensorBoardImportCodeLensProvider.unit.test.ts b/src/test/tensorBoard/tensorBoardImportCodeLensProvider.unit.test.ts index 07bcce035a7c..8b16301753a6 100644 --- a/src/test/tensorBoard/tensorBoardImportCodeLensProvider.unit.test.ts +++ b/src/test/tensorBoard/tensorBoardImportCodeLensProvider.unit.test.ts @@ -11,7 +11,7 @@ import { TensorboardExperiment } from '../../client/tensorBoard/tensorboarExperi [true, false].forEach((tbExtensionInstalled) => { suite(`Tensorboard Extension is ${tbExtensionInstalled ? 'installed' : 'not installed'}`, () => { - suite.only('TensorBoard import code lens provider', () => { + suite('TensorBoard import code lens provider', () => { let experiment: TensorboardExperiment; let codeLensProvider: TensorBoardImportCodeLensProvider; let cancelTokenSource: CancellationTokenSource; diff --git a/src/test/tensorBoard/tensorBoardPrompt.unit.test.ts b/src/test/tensorBoard/tensorBoardPrompt.unit.test.ts index d94b0d6c5f23..6f096e560d70 100644 --- a/src/test/tensorBoard/tensorBoardPrompt.unit.test.ts +++ b/src/test/tensorBoard/tensorBoardPrompt.unit.test.ts @@ -7,7 +7,7 @@ import { Common } from '../../client/common/utils/localize'; import { TensorBoardEntrypointTrigger } from '../../client/tensorBoard/constants'; import { TensorBoardPrompt } from '../../client/tensorBoard/tensorBoardPrompt'; -suite.only('TensorBoard prompt', () => { +suite('TensorBoard prompt', () => { let applicationShell: ApplicationShell; let commandManager: CommandManager; let persistentState: PersistentState; diff --git a/src/test/tensorBoard/tensorBoardUsageTracker.unit.test.ts b/src/test/tensorBoard/tensorBoardUsageTracker.unit.test.ts index 54771ab4b6b6..7eba1805c8bf 100644 --- a/src/test/tensorBoard/tensorBoardUsageTracker.unit.test.ts +++ b/src/test/tensorBoard/tensorBoardUsageTracker.unit.test.ts @@ -10,7 +10,7 @@ import { TensorboardExperiment } from '../../client/tensorBoard/tensorboarExperi [true, false].forEach((tbExtensionInstalled) => { suite(`Tensorboard Extension is ${tbExtensionInstalled ? 'installed' : 'not installed'}`, () => { - suite.only('TensorBoard usage tracker', () => { + suite('TensorBoard usage tracker', () => { let experiment: TensorboardExperiment; let documentManager: MockDocumentManager; let tensorBoardImportTracker: TensorBoardUsageTracker;