diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index fb1cb3a96be7..2e29cd72d66c 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -2313,7 +2313,7 @@ export interface IEventNamePropertyMapping { /** * Whether the user launched the Terminal REPL or Native REPL */ - replType: 'Terminal' | 'Native'; + replType: 'Terminal' | 'Native' | 'manualTerminal'; }; /** * Telemetry event sent if and when user configure tests command. This command can be trigerred from multiple places in the extension. (Command palette, prompt etc.) diff --git a/src/client/terminals/codeExecution/terminalReplWatcher.ts b/src/client/terminals/codeExecution/terminalReplWatcher.ts index dfe89ce1dc87..bab70cb2f654 100644 --- a/src/client/terminals/codeExecution/terminalReplWatcher.ts +++ b/src/client/terminals/codeExecution/terminalReplWatcher.ts @@ -5,14 +5,14 @@ import { EventName } from '../../telemetry/constants'; function checkREPLCommand(command: string): boolean { const lower = command.toLowerCase().trimStart(); - return lower.startsWith('python') || lower.startsWith('py'); + return lower.startsWith('python') || lower.startsWith('py '); } export function registerTriggerForTerminalREPL(disposables: Disposable[]): void { disposables.push( onDidStartTerminalShellExecution(async (e: TerminalShellExecutionStartEvent) => { if (e.execution.commandLine.isTrusted && checkREPLCommand(e.execution.commandLine.value)) { - sendTelemetryEvent(EventName.REPL, undefined, { replType: 'Terminal' }); + sendTelemetryEvent(EventName.REPL, undefined, { replType: 'manualTerminal' }); } }), );