Skip to content

Commit

Permalink
broaded pattern to allow imported dialogs (#5940)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
  • Loading branch information
benbrown and cwhitten authored Feb 24, 2021
1 parent e326753 commit 1ad2104
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Composer/packages/server/src/models/bot/botStructure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ const BotStructureTemplate = {
dialogSchema: 'dialogs/${DIALOGNAME}/${DIALOGNAME}.dialog.schema',
recognizer: 'dialogs/${DIALOGNAME}/recognizers/${RECOGNIZERNAME}',
},
importedDialogs: {
entry: 'dialogs/imported/${DIALOGNAME}/${DIALOGNAME}.dialog',
lg: 'dialogs/imported/${DIALOGNAME}/language-generation/${LOCALE}/${DIALOGNAME}.${LOCALE}.lg',
lu: 'dialogs/imported/${DIALOGNAME}/language-understanding/${LOCALE}/${DIALOGNAME}.${LOCALE}.lu',
qna: 'dialogs/imported/${DIALOGNAME}/knowledge-base/en-us/${DIALOGNAME}.en-us.qna',
sourceQnA: 'dialogs/imported/${DIALOGNAME}/knowledge-base/source/${FILENAME}.source.qna',
dialogSchema: 'dialogs/imported/${DIALOGNAME}/${DIALOGNAME}.dialog.schema',
recognizer: 'dialogs/imported/${DIALOGNAME}/recognizers/${RECOGNIZERNAME}',
},
formDialogs: 'form-dialogs/${FORMDIALOGNAME}',
skillManifests: 'manifests/${MANIFESTFILENAME}',
botProject: '${BOTNAME}.botproj',
Expand Down Expand Up @@ -69,6 +78,15 @@ export const BotStructureFilesPatterns = [
templateInterpolate(BotStructureTemplate.dialogs.sourceQnA, { DIALOGNAME: '*', FILENAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.dialogs.dialogSchema, { DIALOGNAME: '*' }),
templateInterpolate(BotStructureTemplate.dialogs.recognizer, { DIALOGNAME: '*', RECOGNIZERNAME: '*.dialog' }),

templateInterpolate(BotStructureTemplate.importedDialogs.entry, { DIALOGNAME: '*' }),
templateInterpolate(BotStructureTemplate.importedDialogs.lg, { DIALOGNAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.importedDialogs.lu, { DIALOGNAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.importedDialogs.qna, { DIALOGNAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.importedDialogs.sourceQnA, { DIALOGNAME: '*', FILENAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.importedDialogs.dialogSchema, { DIALOGNAME: '*' }),
templateInterpolate(BotStructureTemplate.importedDialogs.recognizer, { DIALOGNAME: '*', RECOGNIZERNAME: '*.dialog' }),

templateInterpolate(BotStructureTemplate.formDialogs, { FORMDIALOGNAME: '*.form' }),
templateInterpolate(BotStructureTemplate.skillManifests, { MANIFESTFILENAME: '*.json' }),
templateInterpolate(BotStructureTemplate.botProject, { BOTNAME: '*' }),
Expand Down

0 comments on commit 1ad2104

Please sign in to comment.