Skip to content

Commit

Permalink
fix: bot load files include form dialog generated files (microsoft#6041)
Browse files Browse the repository at this point in the history
* load files include form dialog generated files

* files pattern more generic

Co-authored-by: Dong Lei <[email protected]>
  • Loading branch information
zhixzhan and boydc2014 authored Mar 1, 2021
1 parent 2a8bebf commit 80dad34
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions Composer/packages/server/src/models/bot/botStructure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,12 @@ const parseSourceFileName = (name: string, locale: string) => {

export const BotStructureFilesPatterns = [
templateInterpolate(BotStructureTemplate.entry, { BOTNAME: '*' }),
templateInterpolate(BotStructureTemplate.lg, { BOTNAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.lu, { BOTNAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.qna, { BOTNAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.sourceQnA, { FILENAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.settings, { FILENAME: 'appsettings.json' }),
templateInterpolate(BotStructureTemplate.dialogs.entry, { DIALOGNAME: '*' }),
templateInterpolate(BotStructureTemplate.dialogs.lg, { DIALOGNAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.dialogs.lu, { DIALOGNAME: '*', LOCALE: '*' }),
templateInterpolate(BotStructureTemplate.dialogs.qna, { DIALOGNAME: '*', LOCALE: '*' }),
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' }),

Expand All @@ -94,6 +82,15 @@ export const BotStructureFilesPatterns = [
templateInterpolate(BotStructureTemplate.crossTrainConfig, { CROSSTRAINCONFIGNAME: 'cross-train.config.json' }),
'*.schema',
'*.uischema',
'language-generation/**/*.lg',
'language-understanding/**/*.lu',
'knowledge-base/**/*.qna',
'dialogs/*/language-generation/**/*.lg',
'dialogs/*/language-understanding/**/*.lu',
'dialogs/*/knowledge-base/**/*.qna',
'dialogs/imported/*/language-generation/**/*.lg',
'dialogs/imported/*/language-understanding/**/*.lu',
'dialogs/imported/*/knowledge-base/**/*.qna',
];

// parse file name: [fileId].[locale].[fileType]
Expand Down

0 comments on commit 80dad34

Please sign in to comment.