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

Conversation

@yeze322
Copy link
Contributor

@yeze322 yeze322 commented Oct 20, 2020

Description

#minor
refs #4135
closes #4433

In JS format, Recognizer's uischema can use the seedNewRecognizer method to customize how to initalize an instance.
However, in pure JSON format, we cannot define a function as the value of seedNewRecognizer.

This PR defines a new property fields in recognizer uischema to provide the ability to define how to initalize a recognizer instance in JSON format.

Definitions
With fields, the type of recognizer uischema is defined as

type RecognizerFieldSets = { fields: { [key: string]: string | number | boolean } };
export type RecognizerOptions = Omit<RecognizerSchema, 'id'> & Partial<RecognizerFieldSets>;

The fields is consumed by resolveSeedNewRecognizer.ts.

Examples
To generate dynamic instances,fields is integrated with bf-lg. It consumes the ShellData as the context.
As an example

"Microsoft.SomeRecognizer": {
  ...,
  fields: {
    projectId: "${projectId}",
    dialogId: "${dialogId}",
    locale: "${locale}",
  }  
}

will generate instances like this

{
  "$kind": "Microsoft.SomeRecognizer",
  "projectId": "MyProject",
  "dialogId": "Dialog1",
  "locale": "en-us"
}

PVA
In PVA scenario, we want the recognizer object contain an id field which equals to '${dialogName}.lu'.
With the fields property, we can define its uischema as below:

"Microsoft.VirtualAgents.Recognizer": {
    "recognizer": {
      "displayName": "Default Recognizer",
      "intentEditor": "LuIntentEditor",
      "default": true,
      "fields": {
        "id": "${dialogId}.lu"
      }
    }
  }

Then the instance of PVA recongizer will become

Task Item

Screenshots

@yeze322
Copy link
Contributor Author

yeze322 commented Oct 20, 2020

Due to botbuilder-lg becomes a dependency of @bfc/extension-client, there are warnings when executing the script plugin-host-preload.js

image

@coveralls
Copy link

coveralls commented Oct 20, 2020

Coverage Status

Coverage increased (+0.03%) to 54.5% when pulling c603081 on yeze322:uischema/recognizer-seed into 5af3f50 on microsoft:main.

@yeze322 yeze322 marked this pull request as ready for review October 21, 2020 04:13
@a-b-r-o-w-n a-b-r-o-w-n added the 1.3 1.3 Release label Nov 13, 2020
a-b-r-o-w-n
a-b-r-o-w-n previously approved these changes Nov 17, 2020
Copy link
Contributor

@a-b-r-o-w-n a-b-r-o-w-n left a comment

Choose a reason for hiding this comment

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

This is cool. I'd like to see our usage of the expression evaluation expanded.

@cwhitten
Copy link
Member

@yeze322 conflicts

zhixzhan and others added 14 commits November 30, 2020 09:46
Co-authored-by: Dong Lei <[email protected]>
Co-authored-by: Andy Brown <[email protected]>
…lishing (microsoft#4521)

* check if port in use before showing success message on local publishing

* change to dev dependency

* fix build error

Co-authored-by: Chris Whitten <[email protected]>
Co-authored-by: Andy Brown <[email protected]>
* updated js runtime to match the latest sdk

* updated composerbot of js runtime

* updated sdk to 4.11.0-rc1

* fixed test failure for js runtime

* updated sdk to 4.11 rc3

* added schemas in node runtime

* copy schemas folder while ejecting

* added sample for custom action

* inline comments and converters

* updated update-schema script

* more inline comments

* updated js runtime to 4.11.0

Co-authored-by: Lu Han <[email protected]>
Co-authored-by: Chris Whitten <[email protected]>
…osoft#5020)

* Updated installOneAuth script to target correct version.

* Better refactor
* expressions menu

* Fixing aligment of menu

* PR comments

Co-authored-by: Soroush <[email protected]>
* fix

* Improved handling of focus when leveraging an Intellisense suggestion

* comments on wrong lines
* refactor the luis build in azure publish

* update the orchestrator path

* update the cleanup

* fix typo

* catch the build error

* remove qna endpoint

* remove console

* add qnaconfig
lei9444 and others added 23 commits February 2, 2021 19:36
* fix: refinde the error message when the bot is deleted

* change the message

* update the string
* project tree menu item for remote skill

* fix react render list key warning

* lint
* keyboard move err

* lint

* add id for div

* lint

* move DOM opt inside useEffect

Co-authored-by: Lu Han <[email protected]>
Co-authored-by: zeye <[email protected]>
…5474)

* unify display name function in client, visual editor

* dialog displayName from $designer.name

* lint

* use getFriendlyName

* unify manager type in design page

* refactor type enums

* conflict

* specs failed

* spcs

* refactor code

* refactor

Co-authored-by: zhixzhan <[email protected]>
Co-authored-by: zeye <[email protected]>
Co-authored-by: Lu Han <[email protected]>
* consume some env variables from bash instead of JS

* update DEV_CERT_ID to be consumed in bash
…p 2) (microsoft#5673)

* use designPage only

* add router for link

* remove unused code

* add empty check

Co-authored-by: Srinaath Ravichandran <[email protected]>
…ilt-in function map (microsoft#5599)

* update package version

* fix version and add sqrt and abs
…ish (microsoft#5688)

* fix: No exception thrown when unsupported locale is set for Luis publish

* fix unit tests

* filter unsupport language when create cross train config

Co-authored-by: Dong Lei <[email protected]>
* fix cursor err

* refactor code style with other property

* lint

* use type

Co-authored-by: Dong Lei <[email protected]>
Co-authored-by: Lu Han <[email protected]>
…ndition) (microsoft#5693)

* add 100px marign right for branching nodes

* fix UT

* UT: switch node size

Co-authored-by: Lu Han <[email protected]>
* Update NuGet.Config

* Update NuGet.Config

* Remove clear

Signed-off-by: Srinaath Ravichandran <[email protected]>

* Added back clear

Signed-off-by: Srinaath Ravichandran <[email protected]>

Co-authored-by: Srinaath Ravichandran <[email protected]>
Co-authored-by: Srinaath Ravichandran <[email protected]>
…ns inaccessible issue on Project Tree (microsoft#5722)

* save for tmp use

* save tmp code

* save for tmp use

* add two more buttons

* update calculation for treeitem text maxwidth

* show parent icons if a link selected

* fix resize bug

* fix resize bug

* remove unused file

* handle comments

* fix truncated treeitem width bug

* remove addTrigger and addDialog Icons

Co-authored-by: Dong Lei <[email protected]>
@yeze322
Copy link
Contributor Author

yeze322 commented Mar 10, 2021

blocked by CI process, out of memory error

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

as a low priority feature, target it to R13

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.