Skip to content

Commit

Permalink
add imports for new telemetry scope
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Sep 14, 2023
1 parent 874cb06 commit 75a2135
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/client/terminals/codeExecution/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { ICodeExecutionHelper } from '../types';
import { traceError } from '../../logging';
import { IExperimentService, Resource } from '../../common/types';
import { EnableREPLSmartSend } from '../../common/experiments/groups';
import { sendTelemetryEvent } from '../../telemetry';
import { EventName } from '../../telemetry/constants';

@injectable()
export class CodeExecutionHelper implements ICodeExecutionHelper {
Expand Down Expand Up @@ -70,7 +72,10 @@ export class CodeExecutionHelper implements ICodeExecutionHelper {
normalizeOutput.resolve(normalized);
},
});

// If there is no explicit selection, we are exeucting 'line' or 'block'.
if (activeEditor!.selection.isEmpty) {
sendTelemetryEvent(EventName.EXECUTION_CODE, undefined, { scope: 'line' });
}
// The normalization script expects a serialized JSON object, with the selection under the "code" key.
// We're using a JSON object so that we don't have to worry about encoding, or escaping non-ASCII characters.
const input = JSON.stringify({
Expand Down

0 comments on commit 75a2135

Please sign in to comment.