Skip to content

Commit 14e134e

Browse files
authored
Add separate enum for telemetry when running python manually. (#24157)
1 parent 06a976f commit 14e134e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/client/telemetry/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2313,7 +2313,7 @@ export interface IEventNamePropertyMapping {
23132313
/**
23142314
* Whether the user launched the Terminal REPL or Native REPL
23152315
*/
2316-
replType: 'Terminal' | 'Native';
2316+
replType: 'Terminal' | 'Native' | 'manualTerminal';
23172317
};
23182318
/**
23192319
* 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.)

src/client/terminals/codeExecution/terminalReplWatcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import { EventName } from '../../telemetry/constants';
55

66
function checkREPLCommand(command: string): boolean {
77
const lower = command.toLowerCase().trimStart();
8-
return lower.startsWith('python') || lower.startsWith('py');
8+
return lower.startsWith('python') || lower.startsWith('py ');
99
}
1010

1111
export function registerTriggerForTerminalREPL(disposables: Disposable[]): void {
1212
disposables.push(
1313
onDidStartTerminalShellExecution(async (e: TerminalShellExecutionStartEvent) => {
1414
if (e.execution.commandLine.isTrusted && checkREPLCommand(e.execution.commandLine.value)) {
15-
sendTelemetryEvent(EventName.REPL, undefined, { replType: 'Terminal' });
15+
sendTelemetryEvent(EventName.REPL, undefined, { replType: 'manualTerminal' });
1616
}
1717
}),
1818
);

0 commit comments

Comments
 (0)