-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: lg naming migration #2597
Conversation
hey @zhixzhan. thanks for taking this one. I'd like to take the opportunity to change the LG template naming scheme to be more inline with where we want to go. instead of Additionally, let's make sure to also update the following: Inline LG naming conventions in the prompts Inline LU naming conventions in the prompts cc @tdurnford do you have any comments here? |
@cwhitten Okay, will update it. |
# TextInput.response-RuZhXe -> ${inputType}_Response_${id}
@zhixzhan I like your plan to migrate between LG parsers. Will you include that in this change? |
No I mean the strategy to update old templates to the new naming convention. |
…tFramework-Composer into lg-naming-migration
which include repeat option fix and OAuth ifx
I've tested this branch. All the luis bot are not working correctly because such settings are auto generated by lubuild, "=settings.luis.additem_en-us_lu", but we don't support - in expressions right now. Talked with @boydc2014 and @feich-ms , fei is going to make a change in lubuild to replace all the - with _ in expressions. We need to wait until fei's update is ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update bf lu package
@luhan2017 Luis package has been updated, can you have another try. |
do we need to migrate old luis settings that use the |
@luhan2017 if re-run lubuild or publish, can previous settings be erased? |
Yes they will be re-generated. |
@zhixzhan in the todowithluis sample I'm seeing broken behavior attempting to navigate between the all-up lg page and the design page, and also when trying to delete dialogs. I don't see the same behavior when using other samples. Also seeing the following in the console: LU Language Client: The server is initialized. |
it comes from re-open current project, the last file write maybe not finished. I add a try_catch to mute this error.
@cwhitten updated. |
* change - in template name to _ for all sample bots * update lg naming pattern * update tests * add method to convert template name when loading * Inline LU naming conventions in the prompts # TextInput.response-RuZhXe -> ${inputType}_Response_${id} * update lg name pattern * replace bfdactivity -> SendActivity * activity -> SendActivity * bfdprompt_1234 -> TextInput_Prompt_1234 * designerId no dash - * lgField use schema.$kind as lgNameType * use standalone method generate designer id * Update packages * Update sdk.schema * more replacement * change LG package version * upgrade lg package * fix api of Expression * Update BotProject.csproj update to the latest which include: 1. skill support 2. foreach and foreachPage nested fix. * update sample bot * use SDKKinds * use shared lu name builder * Update LanguagePolicy and IRecognzier * Recognizer -> IRecognizer * Update to the latest 200416 which include repeat option fix and OAuth ifx * Fix for skill AutoEndDialog * upgrade luis package * replace cover ${ } and @{ } expression syntax * upgrade luis package fix dash - * handle file write error * use a placeholder luSectionName Co-authored-by: Shuai Wang <shuwan@microsoft.com> Co-authored-by: Lu Han <32191031+luhan2017@users.noreply.github.com> Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Description
LG team recently changed the naming policy. microsoft/botbuilder-dotnet#3712
It's an incompatible change, and previous LG file must change their template name, probably use _ instead.
e.g, replace dash
-
to underline_
Likely there are 3 part work.
For 3, one migration solution is before we switch to new lg parser (which would failed to parse), do replacement at current lg parser ( which both support dash - & underline _ ).
Renaming check list
LG
LU
In this PR, we've also updated the sdk packages and schems which includes some features and bug fixes:
fixes #2499, #2624
Task Item
refs #2596
refs #778
Screenshots
After load a old bot, replace results:

*.dialog:
*.lg:

adaptiveCard.json

Won't auto-replace case:
technically can not distinguish it is an expression or a template reference.