Skip to content
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

fix: lg editor validation error & intelligence #3816

Merged
merged 2 commits into from
Aug 10, 2020
Merged

Conversation

zhixzhan
Copy link
Contributor

@zhixzhan zhixzhan commented Aug 10, 2020

Description

fix lg editor validation error & intelligence, bug introduced by #3738 & #3337

Task Item

close #3815
close #3812

Screenshots

image

@boydc2014
Copy link
Contributor

Can you add some details about the cause and the fix to better understand the context

@boydc2014
Copy link
Contributor

I can repro the issue without this fix and confirm this PR fixed it.

boydc2014
boydc2014 previously approved these changes Aug 10, 2020
@zhixzhan
Copy link
Contributor Author

intelligence not work is because this line only return templates of current lg file, but we need is allTemplate(include imported file)
https://github.com/microsoft/BotFramework-Composer/pull/3337/files#r467668623

@@ -166,7 +166,8 @@ export class LGServer {
const lgTextFile = lgTextFiles.find((item) => item.id === fileId);
if (lgTextFile) {
const lgFile = lgUtil.parse(lgTextFile.id, lgTextFile.content, lgTextFiles);
return lgUtil.updateTemplate(lgFile, templateId, { body: content });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgUtil.updateTemplate now accept resolver and return lgFile, here miss resolver then diagnostic show imported file not find

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.006%) to 56.422% when pulling ffb2d4c on zhixzhan/lg-resolve-fix into f4e5f30 on main.

@boydc2014 boydc2014 merged commit f1b8b4e into main Aug 10, 2020
@boydc2014 boydc2014 deleted the zhixzhan/lg-resolve-fix branch August 10, 2020 07:10
alanlong9278 added a commit that referenced this pull request Aug 11, 2020
* main:
  Update user.ts (#3825)
  do not force dialog name to lowercase (#3817)
  fix: lg editor validation error & intelligence (#3816)
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* use allTemplate for completion

* update worker parse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline lg validation is wrong on import file Regression in LSP LG function evaluator & editing
3 participants