[Adaptive] [LG] Create tooling to auto generate LG Template constants from LG files #1235
Description
Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Version
4.6.0-Daily-2019-07-17-01
Describe the bug
While using LG template in legacy dialogs like waterfall dialogs, incorrect/missing template name
could only be found in runtime which is a little bit suffer.
Except:
Have an indicator generator in VS Extension/VSCode Extension to generate all available template name list like this:
With this indicator, developers can easily refer the template name instead of hardcoded strings to reduce runtime error.
To Reproduce
Currently this is how we call LG in waterfall:
var result = await lgMultiLangEngine.Generate(turnContext, "[CancellingMessage]", null);
The [CancellingMessage] is a hardcoded string and can be easily misspelled. The code style with so many hardcoded strings is bad and when the template name is changed, it is easy to generate runtime error everywhere.
Expected behavior
Have a generator to help generate an indicator for a target LG file. And use LG like this:
var result = await lgMultiLangEngine.Generate(turnContext, SendEmailResponses.CancellingMessage , null);