Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { getDropdownOptions } from './getDropdownOptions';
export const RecognizerField: React.FC<FieldProps<MicrosoftIRecognizer>> = (props) => {
const { value, id, label, description, uiOptions, required, onChange } = props;
const { shellApi, ...shellData } = useShellApi();
const { telemetryClient } = shellApi;

useMigrationEffect(value, onChange);
const { recognizers: recognizerConfigs, currentRecognizer } = useRecognizerConfig();
Expand All @@ -38,6 +39,7 @@ export const RecognizerField: React.FC<FieldProps<MicrosoftIRecognizer>> = (prop
? seedNewRecognizer(shellData, shellApi)
: { $kind: option.key as string, intents: [] }; // fallback to default Recognizer instance;
onChange(recognizerInstance);
telemetryClient?.track('RecognizerChanged', { recognizer: option.key as string });
};

return (
Expand Down
7 changes: 6 additions & 1 deletion Composer/packages/types/src/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ type OrchestratorEvents = {
OrchestratorBuildCompleted: { baseModel: string; firstBuild: boolean };
};

type PropertyEditorEvents = {
RecognizerChanged: { recognizer: string };
};

type OtherEvents = {};

type PageView = {
Expand Down Expand Up @@ -232,7 +236,8 @@ export type TelemetryEvents = ApplicationEvents &
LgEditorEvents &
WebChatEvents &
LuEditorEvents &
OrchestratorEvents;
OrchestratorEvents &
PropertyEditorEvents;

export type TelemetryEventName = keyof TelemetryEvents;

Expand Down