diff --git a/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx b/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx index 5cba01ef68..9ed6a81a59 100644 --- a/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx +++ b/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx @@ -59,6 +59,8 @@ export const TriggerCreationModal: React.FC = props = const { state } = useContext(StoreContext); const { dialogs, luFiles } = state; const luFile = luFiles.find(lu => lu.id === dialogId); + const dialogFile = dialogs.find(dialog => dialog.id === dialogId); + const onClickSubmitButton = e => { e.preventDefault(); const errors = validateForm(formData); @@ -94,14 +96,17 @@ export const TriggerCreationModal: React.FC = props = [field]: newValue, }); }; + const eventTypes = get(appschema, `definitions.['${eventTypeKey}'].properties.event.enum`, []).map(t => { return { key: t, text: t }; }); - const intents = get(luFile, 'parsedContent.LUISJsonStructure.intents', []); + const regexIntents = get(dialogFile, 'content.recognizer.intents', []); + const luisIntents = get(luFile, 'parsedContent.LUISJsonStructure.intents', []); + const intents = [...luisIntents, ...regexIntents]; const intentOptions = intents.map(t => { - return { key: t.name, text: t.name }; + return { key: t.name || t.intent, text: t.name || t.intent }; }); const showEventDropDown = formData.$type === eventTypeKey;