Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

feat: Language-Understanding LSP - #1711

Merged
Chris Whitten (cwhitten) merged 102 commits into
masterfrom
shuwan/AddLu_LSP
Jan 20, 2020
Merged

feat: Language-Understanding LSP#1711
Chris Whitten (cwhitten) merged 102 commits into
masterfrom
shuwan/AddLu_LSP

Conversation

@cosmicshuai

@cosmicshuai Shuai Wang (cosmicshuai) commented Dec 6, 2019

Copy link
Copy Markdown
Contributor

Description

An LSP implementation for language-understanding language features in composer

Language feature checklist

  • syntax highlighting for intent, utterance, entities;
    lu-lsp-syntax-highlight

  • Validation lu file

    • syntax errors
    • semantic errors
  • Auto-suggestion for creating entities

    • suggest entity types, hasRoles and useFeature
      auto suggest type
      auto suggest hasrole
      auto suggest useFeature

    • auto suggest prebuilt entities
      auto suggest prebuilt

    • auto suggest composite entities
      auto suggest composite

    • auto suggest regex entities
      auto suggest regex

  • Auto suggest, auto complete experience for writing patterns in utterance
    auto suggest pattern
    auto suggest pattern and roles

  • Auto complete when user typing in list entity
    auto suggest list

  • auto complete in ml entities
    auto format ml

  • Labeling Experience
    Auto adding unlabeled entity when user hit Shift + Enter,
    unlabelingExp

Task Item

refs #867

Screenshots

Please include screenshots or gifs if your PR include UX changes.

@github-actions

github-actions Bot commented Jan 9, 2020

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 42.756% when pulling e1f402e on shuwan/AddLu_LSP into cfb4b77 on master.

@vishwacsena

Copy link
Copy Markdown
Contributor

Dong Lei (@boydc2014)

Few things observed when I played with this

  1. Entity auto-suggest/ auto-complete does not work for utterances that appear above the entity definition. In example below, adding a { in one of the two utterances does not bring up entity auto suggest/ completion flyout. However I do see this on { in intent/ utterances added after the entity definition. Entities are tied to the application and so the position where they are defined should not matter.
# foo bar intent
- this is a test utterance with
- this is another utterance with 

@ ml simple1
@ prebuilt  age  hasRoles userAge
  1. We appear to insert additional space before usesFeature and hasRoles when selecting these options from auto-suggest. Notice the extra space before hasRoles in the auto-completed example above for prebuilt entity age
  2. Roles do not need @ notation for suggestions to show up in auto-suggest/ auto-complete. We should just show this when we show other entity suggestions when labelling.

@cosmicshuai

Copy link
Copy Markdown
Contributor Author

Dong Lei (@boydc2014)

Few things observed when I played with this

  1. Entity auto-suggest/ auto-complete does not work for utterances that appear above the entity definition. In example below, adding a { in one of the two utterances does not bring up entity auto suggest/ completion flyout. However I do see this on { in intent/ utterances added after the entity definition. Entities are tied to the application and so the position where they are defined should not matter.
# foo bar intent
- this is a test utterance with
- this is another utterance with 

@ ml simple1
@ prebuilt  age  hasRoles userAge
  1. We appear to insert additional space before usesFeature and hasRoles when selecting these options from auto-suggest. Notice the extra space before hasRoles in the auto-completed example above for prebuilt entity age
  2. Roles do not need @ notation for suggestions to show up in auto-suggest/ auto-complete. We should just show this when we show other entity suggestions when labelling.

Dong Lei (@boydc2014)

Few things observed when I played with this

  1. Entity auto-suggest/ auto-complete does not work for utterances that appear above the entity definition. In example below, adding a { in one of the two utterances does not bring up entity auto suggest/ completion flyout. However I do see this on { in intent/ utterances added after the entity definition. Entities are tied to the application and so the position where they are defined should not matter.
# foo bar intent
- this is a test utterance with
- this is another utterance with 

@ ml simple1
@ prebuilt  age  hasRoles userAge
  1. We appear to insert additional space before usesFeature and hasRoles when selecting these options from auto-suggest. Notice the extra space before hasRoles in the auto-completed example above for prebuilt entity age
  2. Roles do not need @ notation for suggestions to show up in auto-suggest/ auto-complete. We should just show this when we show other entity suggestions when labelling.

I will look into it and fix the problems.

Comment thread Composer/packages/lib/code-editor/src/LuEditor.tsx Outdated
Comment thread Composer/packages/lib/code-editor/src/languages/lu.ts Outdated
Comment thread Composer/packages/lib/code-editor/src/LuEditor.tsx Outdated
Comment thread Composer/packages/lib/code-editor/src/LuEditor.tsx Outdated
Comment thread Composer/packages/lib/code-editor/src/languages/lu.ts Outdated
@cosmicshuai

Copy link
Copy Markdown
Contributor Author

Chris Whitten (@cwhitten) I've already fixed your comments and some test cases for the utility functions are added.

@cwhitten Chris Whitten (cwhitten) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice work!

@cwhitten
Chris Whitten (cwhitten) merged commit bed2bdc into master Jan 20, 2020
@cwhitten
Chris Whitten (cwhitten) deleted the shuwan/AddLu_LSP branch January 20, 2020 18:51
Chris Whitten (cwhitten) added a commit that referenced this pull request Jan 28, 2020
### 01-27-2020

#### Added

- feat: enrich prebuilt memory paths and add user defined memory paths ([#1868](#1868)) ([@lei9444](https://github.com/lei9444))
- feat: Language-Understanding LSP ([#1711](#1711)) ([@cosmicshuai](https://github.com/cosmicshuai))
- feat: lu shell api ([#1810](#1810)) ([@zhixzhan](https://github.com/zhixzhan))
- feat: Start Botproject runtime in bot folder ([#1672](#1672)) ([@VanyLaw](https://github.com/VanyLaw))
- feat: Schema-driven visual editor - migrates 15 simple types ([#1811](#1811)) ([@yeze322](https://github.com/yeze322))
- feat: Update OnConversationUpdate actions ([#1794](#1794)) ([@luhan2017](https://github.com/luhan2017))
- feat: Update LG and built in expression functions in LSP ([#1790](#1790)) ([@Danieladu](https://github.com/Danieladu))
- feat: Add dynamic choices to Choice Prompt ([#1777](#1777)) ([@tdurnford](https://github.com/tdurnford))
- feat: update ui for new schema ([#1775](#1775)) ([@alanlong9278](https://github.com/alanlong9278))
- feat: lu all up view ux enhancement ([#1879](#1879)) ([@zhixzhan](https://github.com/zhixzhan))
- feat: add autoClosingPairs for lg editor ([#1789](#1789)) ([@cosmicshuai](https://github.com/cosmicshuai))

#### Fixed

- fix: update the lg content to store when editor editing ([#1884](#1884)) ([@lei9444](https://github.com/lei9444))
- fix: Aligned elements in prompt settings ([#1893](#1893)) ([@tdurnford](https://github.com/tdurnford))
- fix: remove label from validations ([#1891](#1891)) ([@tdurnford](https://github.com/tdurnford))
- fix: Undo / redo behavior on LG resources ([#1813](#1813)) ([@lei9444](https://github.com/lei9444))
- fix: botproject build script powershell version limit ([#1857](#1857)) ([@VanyLaw](https://github.com/VanyLaw))
- fix: Add support of auto suggestion memory variable ([#1819](#1819)) ([@cosmicshuai](https://github.com/cosmicshuai))
- fix: Fixed Multiple Choice Type undo/redo functionality ([#1844](#1844)) ([@tdurnford](https://github.com/tdurnford))
- fix: RepeatDialog not shown ([#1835](#1835)) ([@yeze322](https://github.com/yeze322))
- fix: do not preset name when creating a dialog ([#1805](#1805)) ([@liweitian](https://github.com/liweitian))
- fix: luis authoringRegion not update in popup form ([#1818](#1818)) ([@VanyLaw](https://github.com/VanyLaw))
- fix: Check all expressions in dialog ([#1798](#1798)) ([@lei9444](https://github.com/lei9444))
- fix: TextWidget hover ([#1825](#1825)) ([@tdurnford](https://github.com/tdurnford))
- fix: Create bot from scratch may create a non-empty bot ([#1796](#1796)) ([@liweitian](https://github.com/liweitian))
- fix: Updated release version on about page ([#1788](#1788)) ([@tdurnford](https://github.com/tdurnford))
- fix: Remove the unused lufiles in notifications ([#1760](#1760)) ([@lei9444](https://github.com/lei9444))
- fix: update form correctly when undo or redo changes ([#1808](#1808)) ([@lei9444](https://github.com/lei9444))
- fix: handle multiple ctrl+z in lg editor ([#1804](#1804)) ([@zhixzhan](https://github.com/zhixzhan))

#### Changed

- refactor: re-provide `getLgTemplates` api ([#1746](#1746)) ([@yeze322](https://github.com/yeze322))
- style: updated delete icon ([#1892](#1892)) ([@tdurnford](https://github.com/tdurnford))
- refactor: let ElementWrapper control the focus state ([#1880](#1880)) ([@yeze322](https://github.com/yeze322))
- refactor: render Elements with composition strategy (ElementRenderer -> ElementWrapper) ([#1873](#1873)) ([@yeze322](https://github.com/yeze322))

#### Other

- chore: migrate IfCondition, SwitchCondition, Foreach(Page) to uischema ([#1899](#1899)) ([@yeze322](https://github.com/yeze322))
- chore: migrate TextInput and all other \*Input types to uischema ([#1874](#1874)) ([@yeze322](https://github.com/yeze322))
- chore: migrate SendActivity, BeginDialog, ReplaceDialog to uischema ([#1840](#1840)) ([@yeze322](https://github.com/yeze322))
- chore: retire 'DefaultRenderer' in visual editor ([#1836](#1836)) ([@yeze322](https://github.com/yeze322))
- chore: update lu/lg all up view ([#1806](#1806)) ([@liweitian](https://github.com/liweitian))
- chore: share server's resource to lsp server ([#1793](#1793)) ([@zhixzhan](https://github.com/zhixzhan))
- chore: refactor lg page route & url ([#1756](#1756)) ([@zhixzhan](https://github.com/zhixzhan))
- chore: convert ludown to bf-lu ([#1608](#1608)) ([@lei9444](https://github.com/lei9444))
- chore: proxy lsp ws request in dev ([#1754](#1754)) ([@zhixzhan](https://github.com/zhixzhan))
- docs: fix a typo ([#1901](#1901)) ([@HiltonGiesenow](https://github.com/HiltonGiesenow))
- docs: use correct link in events and triggers documentation ([#1832](#1832)) ([@arafattehsin](https://github.com/arafattehsin))
- docs: fix memory documentation link and typo ([#1833](#1833)) ([@arafattehsin](https://github.com/arafattehsin))
- docs: fix the links to intents and advanced definitions ([#1854](#1854)) ([@arafattehsin](https://github.com/arafattehsin))
- chore: bump immer to 5.2.0 ([#1846](#1846)) ([@cwhitten](https://github.com/cwhitten))
- chore: update botproject packages ([#1809](#1809)) ([@luhan2017](https://github.com/luhan2017))
- chore: update github templates ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- chore: update schema and samples ([@luhan2017](https://github.com/luhan2017))
@TylerOdenthal

Copy link
Copy Markdown

Congratz on pushing this out with v1.0.2! Just got the update and noticed the change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants