diff --git a/Composer/cypress/integration/Onboarding.spec.ts b/Composer/cypress/integration/Onboarding.spec.ts index 19d361c8e0..a4b5c4a29b 100644 --- a/Composer/cypress/integration/Onboarding.spec.ts +++ b/Composer/cypress/integration/Onboarding.spec.ts @@ -9,7 +9,7 @@ context('Onboarding', () => { //enable onboarding setting cy.visitPage('Settings'); - + cy.wait(1000); cy.findByText('Onboarding').click(); cy.findByTestId('onboardingToggle').click(); cy.visitPage('Design Flow'); diff --git a/Composer/cypress/integration/SaveAs.spec.ts b/Composer/cypress/integration/SaveAs.spec.ts index 300776f0db..1a536ed48d 100644 --- a/Composer/cypress/integration/SaveAs.spec.ts +++ b/Composer/cypress/integration/SaveAs.spec.ts @@ -15,7 +15,7 @@ context('Saving As', () => { cy.findByTestId('ProjectTree').within(() => { cy.findByText('__TestSaveAs.Main').should('exist'); - cy.findByText('ViewCollection').should('exist'); + cy.findByText('View').should('exist'); }); }); }); diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/AddItem.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/AddItem.dialog new file mode 100644 index 0000000000..b3e3f277ca --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/AddItem.dialog @@ -0,0 +1,114 @@ +{ + "$type": "Microsoft.AdaptiveDialog", + "$designer": { + "name": "AddItem", + "id": "225905" + }, + "autoEndDialog": "true", + "defaultResultProperty": "dialog.result", + "triggers": [ + { + "$type": "Microsoft.OnBeginDialog", + "$designer": { + "name": "BeginDialog", + "id": "479346" + }, + "actions": [ + { + "$type": "Microsoft.SetProperties", + "$designer": { + "id": "811190", + "name": "Set properties" + }, + "assignments": [ + { + "property": "dialog.itemTitle", + "value": "=coalesce(@itemTite, $itemTitle)" + }, + { + "property": "dialog.listType", + "value": "=coalesce(@listType, $listType)" + } + ] + }, + { + "$type": "Microsoft.TextInput", + "$designer": { + "id": "282825", + "name": "AskForTitle" + }, + "prompt": "${bfdprompt-282825()}", + "maxTurnCount": "3", + "property": "dialog.itemTitle", + "value": "=coalesce(@itemTitle, $itemTitle)", + "allowInterruptions": "!@itemTitle && #_Interruption.Score >= 0.9" + }, + { + "$type": "Microsoft.ChoiceInput", + "$designer": { + "id": "878594", + "name": "AskForListType" + }, + "prompt": "${bfdprompt-878594()}", + "maxTurnCount": "3", + "property": "dialog.listType", + "value": "=@listType", + "allowInterruptions": "!@listType", + "outputFormat": "value", + "choices": [ + { + "value": "todo", + "synonyms": [ + "to do" + ] + }, + { + "value": "grocery", + "synonyms": [ + "groceries" + ] + }, + { + "value": "shopping", + "synonyms": [ + "shoppers" + ] + } + ], + "appendChoices": "true", + "defaultLocale": "en-us", + "style": "Auto", + "choiceOptions": { + "inlineSeparator": ", ", + "inlineOr": " or ", + "inlineOrMore": ", or ", + "includeNumbers": true + }, + "recognizerOptions": { + "noValue": false + } + }, + { + "$type": "Microsoft.EditArray", + "$designer": { + "id": "733511", + "name": "Edit an Array property" + }, + "changeType": "Push", + "itemsProperty": "user.lists[dialog.listType]", + "value": "=$itemTitle" + }, + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "139532", + "name": "Send a response" + }, + "activity": "${bfdactivity-139532()}" + } + ] + } + ], + "generator": "AddItem.lg", + "recognizer": "AddItem.lu" +} diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/language-generation/en-us/AddItem.en-us.lg b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/language-generation/en-us/AddItem.en-us.lg new file mode 100644 index 0000000000..b379046112 --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/language-generation/en-us/AddItem.en-us.lg @@ -0,0 +1,13 @@ +[import](common.lg) + +# bfdprompt-282825() +- What would you like to add? + +# bfdprompt-878594() +- Pick a list to add the item to.. + +# bfdactivity-139532() +- Sure. I've added **${dialog.itemTitle}** to **${dialog.listType}** list. You have ${count(user.lists[dialog.listType])} items in your list. + + + diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/language-understanding/en-us/AddItem.en-us.lu b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/language-understanding/en-us/AddItem.en-us.lu new file mode 100644 index 0000000000..8d09ac25a8 --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/language-understanding/en-us/AddItem.en-us.lu @@ -0,0 +1,77 @@ + +# TextInput.response-282825 +- Please remind me to {itemTitle=buy milk} +- Please remember that I need to {itemTitle=buy milk} +- I need you to remember that {itemTitle=my wife's birthday is Jan 9th} +- Add a todo named {itemTitle=send report over this weekend} +- Add {itemTitle=get a new car} to the todo list +- Add {itemTitle=write a spec} to the list +- Add {itemTitle=finish this demo} to my todo list +- add a todo item {itemTitle=vacuuming by october 3rd} +- add {itemTitle=call my mother} to my todo list +- add {itemTitle=due date august to peanut butter jelly bread milk} on todos list +- add {itemTitle=go running} to my todos +- add to my todos list {itemTitle=mail the insurance forms out by saturday} +- can i add {itemTitle=shirts} on the todos list +- could i add {itemTitle=medicine} to the todos list +- would you add {itemTitle=heavy cream} to the todos list +- add a to do that {itemTitle=purchase a nice sweater} +- add a to do to {itemTitle=buy shoes} +- add an task of {itemTitle=chores to do around the house} +- add {itemTitle=go to whole foods} in my to do list +- add {itemTitle=reading} to my to do list +- add this thing in to do list +- add to my to do list {itemTitle=pick up clothes} +- add to my to do list {itemTitle=print papers for 10 copies this afternoon} +- create to do that {itemTitle=read a book tonight} +- create to do to {itemTitle=go running in the park} +- put {itemTitle=hikes} on my to do list +- remind me to {itemTitle = pick up dry cleaning} +> Add patterns +- Please remember [to] {itemTitle} +- I need you to remember [that] {itemTitle} +- Add a todo named {itemTitle} +- Add {itemTitle} to the list +- [Please] add {itemTitle} to the todo list +- Add {itemTitle} to my todo +- add {itemTitle} to my to do list +- add {itemTitle} to my to dos +- add a to do that buy {itemTitle} +- add a to do that purchase {itemTitle} +- add a to do that shop {itemTitle} +- add a to do to {itemTitle} +- add to do that {itemTitle} +- add to do to {itemTitle} +- create a to do to {itemTitle} +- create to do to {itemTitle} +- remind me to {itemTitle} +- add {itemTitle} to my todo list + +@ ml itemTitle + + + + + + + +# ChoiceInput.response-878594 +- todo list +- shopping list +- how about the to do list? + +@ list listType = + - todo : + - to do + - todos + - laundry + - grocery : + - groceries + - fruits + - vegetables + - household items + - house hold items + - shopping : + - shopping + - shop + - shoppers \ No newline at end of file diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/DeleteItem.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/DeleteItem.dialog new file mode 100644 index 0000000000..42e483b6c0 --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/DeleteItem.dialog @@ -0,0 +1,182 @@ +{ + "$type": "Microsoft.AdaptiveDialog", + "$designer": { + "name": "DeleteItem", + "id": "715675" + }, + "autoEndDialog": "true", + "defaultResultProperty": "dialog.result", + "triggers": [ + { + "$type": "Microsoft.OnBeginDialog", + "$designer": { + "name": "BeginDialog", + "id": "479346" + }, + "actions": [ + { + "$type": "Microsoft.SetProperties", + "$designer": { + "id": "419199", + "name": "Set properties" + }, + "assignments": [ + { + "property": "dialog.itemTitle", + "value": "=coalesce(@itemTite, $itemTitle)" + }, + { + "property": "dialog.listType", + "value": "=coalesce(@listType, $listType)" + } + ] + }, + { + "$type": "Microsoft.ChoiceInput", + "$designer": { + "id": "461607", + "name": "AskForListType" + }, + "prompt": "${bfdprompt-461607()}", + "maxTurnCount": "3", + "property": "$listType", + "value": "=@listType", + "allowInterruptions": "!@listType", + "outputFormat": "value", + "choices": [ + { + "value": "todo", + "synonyms": [ + "to do" + ] + }, + { + "value": "grocery", + "synonyms": [ + "groceries" + ] + }, + { + "value": "shopping", + "synonyms": [ + "shoppers" + ] + } + ], + "appendChoices": "true", + "defaultLocale": "en-us", + "style": "Auto", + "choiceOptions": { + "inlineSeparator": ", ", + "inlineOr": " or ", + "inlineOrMore": ", or ", + "includeNumbers": true + }, + "recognizerOptions": { + "noValue": false + } + }, + { + "$type": "Microsoft.IfCondition", + "$designer": { + "id": "074106", + "name": "Branch: if/else" + }, + "condition": "count(user.lists[dialog.listType]) == 0", + "actions": [ + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "555579", + "name": "Send a response" + }, + "activity": "${bfdactivity-555579()}" + }, + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "121384", + "name": "Send a response" + }, + "activity": "${bfdactivity-121384()}" + } + ], + "elseActions": [ + { + "$type": "Microsoft.IfCondition", + "$designer": { + "id": "803801", + "name": "Branch: if/else" + }, + "condition": "$itemTitle == null", + "actions": [ + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "534454", + "name": "Send a response" + }, + "activity": "${bfdactivity-534454()}" + } + ] + }, + { + "$type": "Microsoft.ChoiceInput", + "$designer": { + "id": "702637", + "name": "Multiple choice" + }, + "prompt": "${bfdprompt-702637()}", + "maxTurnCount": "3", + "property": "$itemTitle", + "value": "=coalesce(@itemTitle, $itemTitle, if(@number, user.lists[dialog.listType][int(@number) - 1], null))", + "allowInterruptions": "!@itemTitle && !@number", + "outputFormat": "value", + "choices": "=user.lists[dialog.listType]", + "appendChoices": "true", + "defaultLocale": "en-us", + "style": "List", + "choiceOptions": { + "inlineSeparator": ", ", + "inlineOr": " or ", + "inlineOrMore": ", or ", + "includeNumbers": true + }, + "recognizerOptions": { + "noValue": false + } + }, + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "728630", + "name": "Send a response" + }, + "activity": "${bfdactivity-728630()}" + }, + { + "$type": "Microsoft.EditArray", + "$designer": { + "id": "747071", + "name": "Edit an Array property" + }, + "changeType": "Remove", + "itemsProperty": "user.lists[dialog.listType]", + "value": "=dialog.itemTitle" + }, + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "015149", + "name": "Send a response" + }, + "activity": "${bfdactivity-015149()}" + } + ] + } + ] + } + ], + "generator": "DeleteItem.lg", + "recognizer": "DeleteItem.lu" +} diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/language-generation/en-us/DeleteItem.en-us.lg b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/language-generation/en-us/DeleteItem.en-us.lg new file mode 100644 index 0000000000..8f7d57494e --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/language-generation/en-us/DeleteItem.en-us.lg @@ -0,0 +1,27 @@ +[import](common.lg) +[import](ViewItem.lg) + +# bfdprompt-461607() +- What list would you like to delete an item from? + +> This LG template is defined in ViewItem. You can refer to this with an import statement (see line #2) + +# bfdactivity-555579() +- ${showLists()} + +# bfdactivity-534454() +- ${showLists()} + +# bfdprompt-702637() +- What would you like to delete? \n Give me the item number or exact item text + +# bfdactivity-728630() +- Sure, deleting ${dialog.itemTitle} from ${dialog.listType} + +# bfdactivity-015149() +- ${showLists()} + +# bfdactivity-121384() +- Nothing to delete... + + diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/language-understanding/en-us/DeleteItem.en-us.lu b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/language-understanding/en-us/DeleteItem.en-us.lu new file mode 100644 index 0000000000..052dae13e4 --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/language-understanding/en-us/DeleteItem.en-us.lu @@ -0,0 +1,173 @@ + +# ChoiceInput.response-461607 +- todo list +- shopping list +- how about the to do list? + +@ list listType = + - todo : + - to do + - todos + - laundry + - grocery : + - groceries + - fruits + - vegetables + - household items + - house hold items + - shopping : + - shopping + - shop + - shoppers + + + + +# ChoiceInput.response-652623 +- Remove todo +- first one +- last one +- Mark {itemTitle = buy milk} as complete +- Flag {itemTitle = first one} as done +- Remove {itemTitle = finish this demo} from the todo list +- remove another one +- remove +- clear my todo named {itemTitle = get a new car} +- I'm done with the first todo +- I finished the las todo +- Remove the first todo +- Delete todo +- Clear my todos +- Delete all my todos +- Remove all my todo +- Forget the list +- Purge the todo list +- can you delete {itemTitle=todo1} +- can you delete {itemTitle=xxx} item +- delete {itemTitle=eggs} from list +- delete off {itemTitle=pancake mix} on the shopping list +- delete {itemTitle=shampoo} from shopping list +- delete {itemTitle=shirts} from list +- delete task {itemTitle=go fishing} +- delete task {itemTitle=go to cinema tonight} +- delete the item {itemTitle=buy socks} from my todo list +- delete the second task in my shopping list +- delete the task {itemTitle=house cleanup this weekend} +- delete the task that {itemTitle=hit the gym every morning} +- delete the to do {itemTitle=meet my friends tomorrow} +- delete the to do that {itemTitle=daily practice piano} +- delete the to do that {itemTitle=meet john when he come here the next friday} +- delete to do {itemTitle=buy milk} +- delete to do {itemTitle=go shopping} +- delete to do that {itemTitle=go hiking tomorrow} +- erase {itemTitle=bananas} from shopping list +- erase {itemTitle=peanuts} on the shopping list +- remove {itemTitle=asprin} from shopping list +- remove {itemTitle=black shoes} from shopping list +- remove {itemTitle=class} from todo list +- remove {itemTitle=salad vegetables} from grocery list +- remove task {itemTitle=buy dog food} +- remove task {itemTitle=go shopping} +- remove task that {itemTitle=go hiking this weekend} +- remove task that {itemTitle=lawn mowing} +- remove the item {itemTitle=paris} from my list +- remove the task that {itemTitle=go to library after work} +- remove the to do {itemTitle=physical examination} +- remove the to do that {itemTitle=pick tom up at six p.m.} +- remove to do {itemTitle=go to the gym} +- remove to do that {itemTitle=go to the dentist tomorrow morning} +> Add patterns +- I did {itemTitle} +- I completed {itemTitle} +- Delete {itemTitle} +- Mark {itemTitle} as complete +- Remove {itemTitle} from my [todo] list +- [Please] delete {itemTitle} from the list + +> entity definitions +@ ml itemTitle + +> phrase list definitions +@ phraseList deleteItem(interchangeable) = + - remove + - delete + - get + - erase + + +# ChoiceInput.response-702637 +- Remove todo +- first one +- how about the first one? +- I would like to remove the last item +- last item +- Mark {itemTitle = buy milk} as complete +- Flag {itemTitle = first one} as done +- Remove {itemTitle = finish this demo} from the todo list +- remove another one +- remove +- clear my todo named {itemTitle = get a new car} +- I'm done with the first todo +- I finished the las todo +- Remove the first todo +- Delete todo +- Clear my todos +- Delete all my todos +- Remove all my todo +- Forget the list +- Purge the todo list +- can you delete {itemTitle=todo1} +- can you delete {itemTitle=xxx} item +- delete {itemTitle=eggs} from list +- delete off {itemTitle=pancake mix} on the shopping list +- delete {itemTitle=shampoo} from shopping list +- delete {itemTitle=shirts} from list +- delete task {itemTitle=go fishing} +- delete task {itemTitle=go to cinema tonight} +- delete the item {itemTitle=buy socks} from my todo list +- delete the second task in my shopping list +- delete the task {itemTitle=house cleanup this weekend} +- delete the task that {itemTitle=hit the gym every morning} +- delete the to do {itemTitle=meet my friends tomorrow} +- delete the to do that {itemTitle=daily practice piano} +- delete the to do that {itemTitle=meet john when he come here the next friday} +- delete to do {itemTitle=buy milk} +- delete to do {itemTitle=go shopping} +- delete to do that {itemTitle=go hiking tomorrow} +- erase {itemTitle=bananas} from shopping list +- erase {itemTitle=peanuts} on the shopping list +- remove {itemTitle=asprin} from shopping list +- remove {itemTitle=black shoes} from shopping list +- remove {itemTitle=class} from todo list +- remove {itemTitle=salad vegetables} from grocery list +- remove task {itemTitle=buy dog food} +- remove task {itemTitle=go shopping} +- remove task that {itemTitle=go hiking this weekend} +- remove task that {itemTitle=lawn mowing} +- remove the item {itemTitle=paris} from my list +- remove the task that {itemTitle=go to library after work} +- remove the to do {itemTitle=physical examination} +- remove the to do that {itemTitle=pick tom up at six p.m.} +- remove to do {itemTitle=go to the gym} +- remove to do that {itemTitle=go to the dentist tomorrow morning} +> Add patterns +- I did {itemTitle} +- I completed {itemTitle} +- Delete {itemTitle} +- Mark {itemTitle} as complete +- Remove {itemTitle} from my [todo] list +- [Please] delete {itemTitle} from the list +- {itemTitle} + +> entity definitions +@ ml itemTitle + +> add number to catch item number +@ prebuilt number + +> phrase list definitions +@ phraseList deleteItem(interchangeable) = + - remove + - delete + - get + - erase \ No newline at end of file diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/Help.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/Help.dialog new file mode 100644 index 0000000000..da570b1187 --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/Help.dialog @@ -0,0 +1,29 @@ +{ + "$type": "Microsoft.AdaptiveDialog", + "$designer": { + "name": "Help", + "id": "429319" + }, + "autoEndDialog": "true", + "defaultResultProperty": "dialog.result", + "triggers": [ + { + "$type": "Microsoft.OnBeginDialog", + "$designer": { + "name": "BeginDialog", + "id": "911430" + }, + "actions": [ + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "641395", + "name": "Send a response" + }, + "activity": "${bfdactivity-641395()}" + } + ] + } + ], + "generator": "Help.lg" +} diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/language-generation/en-us/Help.en-us.lg b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/language-generation/en-us/Help.en-us.lg new file mode 100644 index 0000000000..c81f7c697c --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/language-generation/en-us/Help.en-us.lg @@ -0,0 +1,9 @@ +[import](common.lg) + +# bfdactivity-641395() +- I'm a demo bot. I can manage todo or shopping lists. + + + + + diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/language-understanding/en-us/Help.en-us.lu b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/language-understanding/en-us/Help.en-us.lu new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/UserProfile.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/UserProfile.dialog new file mode 100644 index 0000000000..7e5fb35dd8 --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/UserProfile.dialog @@ -0,0 +1,218 @@ +{ + "$type": "Microsoft.AdaptiveDialog", + "$designer": { + "name": "UserProfile", + "id": "732608" + }, + "autoEndDialog": "true", + "defaultResultProperty": "dialog.result", + "triggers": [ + { + "$type": "Microsoft.OnBeginDialog", + "$designer": { + "name": "BeginDialog", + "id": "479346" + }, + "actions": [ + { + "$type": "Microsoft.TextInput", + "$designer": { + "id": "267073", + "name": "AskForName" + }, + "prompt": "${bfdprompt-267073()}", + "maxTurnCount": "3", + "property": "user.name", + "value": "=coalesce(@userName, @personName)", + "alwaysPrompt": "false", + "allowInterruptions": "!@userName && !@personName" + }, + { + "$type": "Microsoft.NumberInput", + "$designer": { + "id": "826115", + "name": "Number input" + }, + "prompt": "${bfdprompt-826115()}", + "invalidPrompt": "${bfdinvalidPrompt-826115()}", + "maxTurnCount": "3", + "validations": [ + "int(this.value) >= 1", + "int(this.value) <= 150" + ], + "property": "user.age", + "defaultValue": "30", + "value": "=coalesce(@userAge, @age, @number)", + "alwaysPrompt": "true", + "allowInterruptions": "!@userAge && !@age && !@number", + "defaultLocale": "en-us", + "defaultValueResponse": "${bfddefaultValueResponse-826115()}" + }, + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "744717", + "name": "Send a response" + }, + "activity": "${bfdactivity-744717()}" + } + ] + }, + { + "$type": "Microsoft.OnIntent", + "$designer": { + "id": "993953" + }, + "intent": "Cancel", + "actions": [ + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "210613", + "name": "Send a response" + }, + "activity": "${bfdactivity-210613()}" + }, + { + "$type": "Microsoft.EndDialog", + "$designer": { + "id": "632724", + "name": "End this dialog" + } + } + ] + }, + { + "$type": "Microsoft.OnIntent", + "$designer": { + "id": "660586" + }, + "intent": "Why", + "actions": [ + { + "$type": "Microsoft.IfCondition", + "$designer": { + "id": "796427", + "name": "Branch: if/else" + }, + "condition": "user.name == null", + "actions": [ + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "351007", + "name": "Send a response" + }, + "activity": "${bfdactivity-351007()}" + } + ], + "elseActions": [ + { + "$type": "Microsoft.IfCondition", + "$designer": { + "id": "090448", + "name": "Branch: if/else" + }, + "condition": "user.age == null", + "actions": [ + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "977137", + "name": "Send a response" + }, + "activity": "${bfdactivity-977137()}" + } + ] + } + ] + }, + { + "$type": "Microsoft.SetProperty", + "$designer": { + "id": "957864", + "name": "Set a property" + }, + "property": "turn.interrupted", + "value": "=true" + } + ] + }, + { + "$type": "Microsoft.OnIntent", + "$designer": { + "id": "887328" + }, + "intent": "NoValue", + "actions": [ + { + "$type": "Microsoft.IfCondition", + "$designer": { + "id": "914072", + "name": "Branch: if/else" + }, + "condition": "user.name == null", + "actions": [ + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "304840", + "name": "Send a response" + }, + "activity": "${bfdactivity-304840()}" + }, + { + "$type": "Microsoft.SetProperty", + "$designer": { + "id": "023051", + "name": "Set a property" + }, + "property": "user.name", + "value": "Human" + } + ], + "elseActions": [ + { + "$type": "Microsoft.IfCondition", + "$designer": { + "id": "524800", + "name": "Branch: if/else" + }, + "condition": "user.age == null", + "actions": [ + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "991655", + "name": "Send a response" + }, + "activity": "${bfdactivity-991655()}" + }, + { + "$type": "Microsoft.SetProperty", + "$designer": { + "id": "874049", + "name": "Set a property" + }, + "property": "user.age", + "value": "30" + } + ] + } + ] + }, + { + "$type": "Microsoft.SetProperty", + "$designer": { + "id": "376791", + "name": "Set a property" + }, + "property": "turn.interrupted", + "value": "=true" + } + ] + } + ], + "generator": "UserProfile.lg", + "recognizer": "UserProfile.lu" +} diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/language-generation/en-us/UserProfile.en-us.lg b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/language-generation/en-us/UserProfile.en-us.lg new file mode 100644 index 0000000000..81e0fa51a9 --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/language-generation/en-us/UserProfile.en-us.lg @@ -0,0 +1,33 @@ +[import](common.lg) + +# bfdprompt-267073() +- Hi, what is your name? You can \n - state your name \n - say things like 'my name is ' \n - ask 'why do you need my name' \n - say 'I'm not going to give you my name'. + +# bfdactivity-744717() +- Thanks. I have ${user.name} as your name and ${user.age} as your age. + +# bfdprompt-826115() +- Hello ${user.name}, how old are you? + +# bfdinvalidPrompt-826115() +- Sorry ${this.value} does not work. I'm expecting a value between 1-150. What is your age? + +# bfddefaultValueResponse-826115() +- Sorry, this is not working :(. For now, I'm going to set your age to 30. + +# bfdactivity-210613() +- Sure, cancelling user profile... + +# bfdactivity-351007() +- I need your name to address you correctly! \n You can say things like 'My name is ' to introduce yourself to me. + +# bfdactivity-977137() +- I just like to know your age .. no good reason! \n Try saying "I'm years old" + +# bfdactivity-304840() +- No worries. I'm going to set your name to 'Human'. \n You can say "My name is " to re-introduce yourself to me. + +# bfdactivity-991655() +- No worries. I'm just going to assume you are 30! + + diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/language-understanding/en-us/UserProfile.en-us.lu b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/language-understanding/en-us/UserProfile.en-us.lu new file mode 100644 index 0000000000..797161ea1a --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/language-understanding/en-us/UserProfile.en-us.lu @@ -0,0 +1,51 @@ + +# TextInput.response-267073 +- my name is {@userName = vishwac} +- I'm {@userName = tom} +- you can call me {@userName = chris} +- I'm {@userName = scott} and I'm {@userAge = 36} years old +> add few patterns +- my name is {@userName} + +> add entities +@ prebuilt personName hasRoles userName + + + + + + + + + +# NumberInput.response-826115 +- I'm {@userAge} years old +- {@userAge = 36} + +@ prebuilt age hasRoles userAge +@ prebuilt number + + + + +# Cancel +- cancel +- stop that + + +# Why +- help +- what can I say +- why do you need my name? +- why age? +- what do you need my profile for? +- why do you ask? +- why do you need that information? + + +# NoValue +- Not going to give you that +- No name +- no age +- I will not give you my name +- not going to give you that. \ No newline at end of file diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/ViewItem.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/ViewItem.dialog new file mode 100644 index 0000000000..130ffa3504 --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/ViewItem.dialog @@ -0,0 +1,82 @@ +{ + "$type": "Microsoft.AdaptiveDialog", + "$designer": { + "name": "ViewItem", + "id": "944085" + }, + "autoEndDialog": "true", + "defaultResultProperty": "dialog.result", + "triggers": [ + { + "$type": "Microsoft.OnBeginDialog", + "$designer": { + "name": "BeginDialog", + "id": "479346" + }, + "actions": [ + { + "$type": "Microsoft.ChoiceInput", + "$designer": { + "id": "308464", + "name": "AskForListType" + }, + "prompt": "${bfdprompt-308464()}", + "maxTurnCount": "3", + "property": "dialog.listType", + "value": "=@listType", + "allowInterruptions": "!@listType", + "outputFormat": "value", + "choices": [ + { + "value": "todo", + "synonyms": [ + "to do" + ] + }, + { + "value": "grocery", + "synonyms": [ + "groceries" + ] + }, + { + "value": "shopping", + "synonyms": [ + "shoppers" + ] + }, + { + "value": "all", + "synonyms": [ + "everything", + "all" + ] + } + ], + "appendChoices": "true", + "defaultLocale": "en-us", + "style": "Auto", + "choiceOptions": { + "inlineSeparator": ", ", + "inlineOr": " or ", + "inlineOrMore": ", or ", + "includeNumbers": true + }, + "recognizerOptions": { + "noValue": false + } + }, + { + "$type": "Microsoft.SendActivity", + "$designer": { + "id": "996807", + "name": "Send a response" + }, + "activity": "${bfdactivity-996807()}" + } + ] + } + ], + "generator": "ViewItem.lg", + "recognizer": "ViewItem.lu" +} diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/language-generation/en-us/ViewItem.en-us.lg b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/language-generation/en-us/ViewItem.en-us.lg new file mode 100644 index 0000000000..15f19d9f4c --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/language-generation/en-us/ViewItem.en-us.lg @@ -0,0 +1,34 @@ +[import](common.lg) + +# bfdprompt-308464() +- What list would you like to see? + +# bfdactivity-996807() +- ${showLists()} + +# showLists +- SWITCH : ${dialog.listType} + - CASE : ${'todo'} + - ${list(user.lists.todo, 'todo')} + - CASE : ${'grocery'} + - ${list(user.lists.grocery, 'grocery')} + - CASE : ${'shopping'} + - ${list(user.lists.shopping, 'shopping')} + - DEFAULT : + - ``` +## Todo list +${list(user.lists.todo, 'todo')} + +## Grocery list +${list(user.lists.grocery, 'grocery')} + +## Shopping list +${list(user.lists.shopping, 'shopping')} + ``` + +# list(collection, name) +- IF : ${collection != null} + - You have ${count(collection)} item(s) in your **${name}** list. \n ${join(foreach(collection, item, concat('- ', item)), '\n')} +- ELSE : + - You do not have any items in your **${name}** list. + diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/language-understanding/en-us/ViewItem.en-us.lu b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/language-understanding/en-us/ViewItem.en-us.lu new file mode 100644 index 0000000000..1f406ee7a9 --- /dev/null +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/language-understanding/en-us/ViewItem.en-us.lu @@ -0,0 +1,25 @@ + +# ChoiceInput.response-308464 +- todo list +- shopping list +- how about the to do list? + +@ list listType = + - all : + - everything + - all items + - todo : + - to do + - todos + - laundry + - grocery : + - groceries + - fruits + - vegetables + - household items + - house hold items + - shopping : + - shopping + - shop + - shoppers + diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/common.en-us.lg b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/common.en-us.lg index 703ab0c800..e69de29bb2 100644 --- a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/common.en-us.lg +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/common.en-us.lg @@ -1,88 +0,0 @@ -# bfdprompt-038757 -[Activity - Text = Ok, give me the exact title of the todo you would like to delete.. - SuggestedActions = Help | Cancel -] - - -> Language generation templates. -# Welcome-Actions -[Activity - SuggestedActions = Add | View | Remove | Cancel | Help -] - -# Welcome-Suffix -- How can I be of help today? -- What can I do for you today? - -# Welcome-Prefix -- Hi -- Hello -- Hiya - -# Welcome-Message -[Activity - Text = ${Welcome-Prefix()}, I'm the Todo sample bot. ${Welcome-Suffix()} - ${Welcome-Actions()} -] - -> This template uses pre-built functions to construct a response. -# Delete-Items-readback -- IF: ${turn.itemDeleted} - - ```I have removed **${dialog.item}** from your ${dialog.listType} list. - You have **${count(user.taskLists[dialog.listType])}** items in your ${dialog.listType} list. - ``` - - ELSE : - - Sorry, I did not find **${dialog.item}** in your todo list - -# Items-Ordinality (list) -- IF: ${list == null || count(list) == 1} - - item -- ELSE: - - items - -# Items-readback -- IF : ${toLower(dialog.listType) == 'all' } - - ${Show-all-lists()} -- ELSE : - - ${List-readback (user.taskLists, dialog.listType)} - -# Show-all-lists -- ``` -## Shopping list -${List-readback (user.taskLists, 'shopping')} - -## Grocery list -${List-readback (user.taskLists, 'grocery')} - -## Todo list -${List-readback (user.taskLists, 'todo')} -``` - -> This template uses a foreach prebuilt function to call a template. The template helps with putting together each item in a line prefixed with `-` -> This way, clients that support multi-line markdown for text can render the items as a list. -# List-readback (collection, type) -- IF: ${collection != null && collection[type] != null && count(collection[type]) != 0} - - ``` -You have ${count(collection[type])} ${Items-Ordinality(collection[type])} in your ${type} collection. - - ${join(foreach(collection[type], item, todo-line(item)), '')} -``` -- ELSE: - - ``` -You do not have any items in your ${type} list. -``` - -# todo-line (item) -- ``` -- ${item}``` - -# Help-prefix -- Sure -- You bet -- Absolutely - -# Add-Todo-Text -- ``` -${Help-prefix()}, I have added **${dialog.item}** to your ${dialog.listType} list.  -You have **${count(user.taskLists[dialog.listType])}** items in your ${dialog.listType} list. -``` \ No newline at end of file diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/todobotwithluissample.en-us.lg b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/todobotwithluissample.en-us.lg index 0cd081b29b..7119bb67a0 100644 --- a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/todobotwithluissample.en-us.lg +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/todobotwithluissample.en-us.lg @@ -1,70 +1,25 @@ -[import](common.lg) - -# bfdactivity-037171 -- ${Welcome-Message()} - -# bfdactivity-113335 -- ${Welcome-Message()} - -# bfdprompt-183920 -- Are you sure you want to cancel? - -# bfdactivity-304360 -[Activity - Text = Cancelling ... - ${Welcome-Actions()} -] - -# bfdactivity-470975 -- No worries. Let's get right back to where we were... - -# bfdactivity-456012 -- ${Welcome-Message()} - -# bfdprompt-069270 -[Activity - Text = Ok, what would you like to add? - SuggestedActions = Help | Cancel -] - -# bfdprompt-781953 -- Which list should I add **${dialog.item}** to? - -# bfdactivity-775572 -[Activity -    Text = ${Add-Todo-Text()} -    ${Welcome-Actions()} -] - -# bfdprompt-637111 -- Which list do you want to remove an item from? - -# bfdactivity-212971 -- ${List-readback(user.taskLists, dialog.listType)} - -# bfdprompt-879447 -[Activity - Text = Ok, give me the exact title of the todo you would like to delete.. - SuggestedActions = Help | Cancel -] - -# bfdactivity-056974 -[Activity - Text = ${Delete-Items-readback()} - ${Welcome-Actions()} -] - -# bfdactivity-084161 -[Activity - Text = ${Items-readback()} - ${Welcome-Actions()} -] - -# bfdprompt-059540 -- What list would you like to see? - -# bfdactivity-052697 -[Activity - Text = ${Items-readback()} - ${Welcome-Actions()} -] +[import](common.lg) + +# bfdactivity-202664() +[Activity + Text = Hi, how can I help today? + SuggestedActions = Add | Show | Delete | Profile +] + +# foo +- test + +# bfdactivity-269411() +- ${@answer} + +# bfdprompt-107784() +- Are you sure you want to cancel? + +# bfdactivity-140076() +- Sure, cancelling all dialogs. + +# bfdactivity-272233() +- No worries. + +# bfdactivity-037398() +- Sorry, not sure what you mean. Can you rephrase? diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-understanding/en-us/todobotwithluissample.en-us.lu b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-understanding/en-us/todobotwithluissample.en-us.lu index 4aeb05580c..5c5001463f 100644 --- a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-understanding/en-us/todobotwithluissample.en-us.lu +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/language-understanding/en-us/todobotwithluissample.en-us.lu @@ -1,97 +1,5 @@ -> !# @enableSections = true - -> Entity definitions -$ itemTitle : simple - -> Add a Phrase List with todo variations. Mark them as interchangeable. -$ todoItem : PhraseList interchangeable - - todo - - todos - - to dos - - todo list - - todos list - - item list - - items collection - - collection - - list - -> Add a list entity to detect list tye -$ listType : todo = -- to do -- todos -- laundry - -$ listType : shopping = -- shopping -- shop -- shoppers - -$ listType : grocery = -- groceries -- fruits -- vegetables -- household items -- house hold items - -> Sample for nested section -# CheckTodo -## CheckUnreadTodo -- check my unread todo -- show my unread todos - -@ simple todoTitle - -## CheckDeletedTodo -- check my deleted todo -- show my deleted todos - -@ simple todoSubject - -> Help intent and related utterances. -# Help -- What can I say? -- Who are you? -- I need help -- Not sure what I can do -- What do you want me to say? -- What can you do? -- What can you help with? -- help please -- What are my options? -- well, I do not know what my todo's title is -- I do not know -- can you please help? - -> Greeting intent and related utterances -# Greeting -- hi -- hello -- hiya -- how are you? -- how do you do? - -> Cancel intent and related utterances -# Cancel -- cancel -- cancel all -- stop that -- do not do it -- abort -- please stop what you are doing -- I changed my mind -- cancel add todo -- cancel that -- I do not want to add a todo -- No todo for me -- Cancel this -- cancel delete todo -- Let's just leave it as is -- I do not wish to delete my todo anymore -- Keep my todos as is -- No todo for me - -> Add item -# AddItem + +# Add - Add todo - add a to do item - Please remind me to {itemTitle=buy milk} @@ -145,7 +53,45 @@ $ listType : grocery = - create to do to {itemTitle} - remind me to {itemTitle} -# DeleteItem +> entity definitions +@ ml itemTitle + +@ list listType = + - todo : + - to do + - todos + - laundry + - grocery : + - groceries + - fruits + - vegetables + - household items + - house hold items + - shopping : + - shopping + - shop + - shoppers + +> phrase list definitions +@ phraseList addItem(interchangeable) = + - add + - put + - plus + + +> + + + + + + + + + + + +# Delete - Remove todo - Mark {itemTitle = buy milk} as complete - Flag {itemTitle = first one} as done @@ -204,7 +150,26 @@ $ listType : grocery = - Remove {itemTitle} from my [todo] list - [Please] delete {itemTitle} from the list -# ViewCollection +> entity definitions +@ ml itemTitle + +> phrase list definitions +@ phraseList deleteItem(interchangeable) = + - remove + - delete + - get + - erase + + + + + + + + + + +# View - show my todo - can you please show my todos? - please show my todo list @@ -221,4 +186,45 @@ $ listType : grocery = - view my todos - can you show my todo - see todo -- I would like to see my todos list \ No newline at end of file +- I would like to see my todos list +- show all my lists +- show my lists +- what do i have on my list? + + +# UserProfile +- get started +- my name is {@userName} +- Profile + +@ prebuilt personName hasRoles userName + + + + + +# whatCanYouDo +- what can you do? + + +# cancel +- cancel +- cancel that +- stop that +- abort + + +# ConfirmInput.response-107784 +- yes +- no + +@ list confirmation = + - yes : + - yeah + - ok + - yup + - no : + - nope + - not now + - not really + - go back \ No newline at end of file diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog index b5515d9a34..6f6674c89d 100644 --- a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog @@ -1,10 +1,12 @@ { "$type": "Microsoft.AdaptiveDialog", "$designer": { - "name": "Sample", - "description": "Test" + "$designer": { + "name": "ToDoBotWithLuisSample-17", + "id": "232009" + } }, - "autoEndDialog": true, + "autoEndDialog": "true", "defaultResultProperty": "dialog.result", "recognizer": "todobotwithluissample.lu", "triggers": [ @@ -34,433 +36,219 @@ { "$type": "Microsoft.SendActivity", "$designer": { - "id": "037171", + "id": "202664", "name": "Send a response" }, - "activity": "${bfdactivity-037171()}" + "activity": "${bfdactivity-202664()}" } ] } ] + }, + { + "$type": "Microsoft.SetProperties", + "$designer": { + "id": "987914", + "name": "Set properties" + }, + "assignments": [ + { + "property": "user.lists", + "value": "={}" + }, + { + "property": "user.lists.todo", + "value": "=[]" + }, + { + "property": "user.lists.grocery", + "value": "=[]" + }, + { + "property": "user.lists.shopping", + "value": "=[]" + } + ] } ] }, { "$type": "Microsoft.OnIntent", "$designer": { - "id": "722893" + "id": "263959" }, - "condition": "#Help.Score > 0.8", + "intent": "Add", + "condition": "#Add.Score > 0.8", "actions": [ { - "$type": "Microsoft.SendActivity", + "$type": "Microsoft.BeginDialog", "$designer": { - "id": "113335", - "name": "Send a response" + "id": "361215", + "name": "Begin a new dialog" }, - "activity": "${bfdactivity-113335()}" + "activityProcessed": true, + "dialog": "AddItem" } - ], - "intent": "Help" + ] }, { "$type": "Microsoft.OnIntent", "$designer": { - "id": "463265" + "id": "100671" }, - "condition": "#Cancel.Score > 0.8", + "intent": "Delete", + "condition": "#Delete.Score > 0.8", "actions": [ { - "$type": "Microsoft.ConfirmInput", + "$type": "Microsoft.BeginDialog", "$designer": { - "id": "183920", - "name": "Confirmation" + "id": "901183", + "name": "Begin a new dialog" }, - "prompt": "${bfdprompt-183920()}", - "maxTurnCount": 3, - "property": "turn.cancelConfirmation", - "defaultValue": "false", - "alwaysPrompt": false, - "allowInterruptions": "false", - "defaultLocale": "en-us", - "style": "Auto", - "choiceOptions": { - "inlineSeparator": ", ", - "inlineOr": " or ", - "inlineOrMore": ", or ", - "includeNumbers": true - } - }, - { - "$type": "Microsoft.IfCondition", - "$designer": { - "id": "262862", - "name": "Branch: If/Else" - }, - "condition": "turn.cancelConfirmation", - "actions": [ - { - "$type": "Microsoft.SendActivity", - "$designer": { - "id": "304360", - "name": "Send a response" - }, - "activity": "${bfdactivity-304360()}" - }, - { - "$type": "Microsoft.CancelAllDialogs", - "$designer": { - "id": "897773", - "name": "Cancel all dialogs" - } - } - ], - "elseActions": [ - { - "$type": "Microsoft.SendActivity", - "$designer": { - "id": "470975", - "name": "Send a response" - }, - "activity": "${bfdactivity-470975()}" - } - ] + "activityProcessed": true, + "dialog": "DeleteItem" } - ], - "intent": "Cancel" + ] }, { "$type": "Microsoft.OnIntent", "$designer": { - "id": "903332" + "id": "660567" }, - "condition": "#Greeting.Score > 0.8", + "intent": "View", + "condition": "#View.Score > 0.8", "actions": [ { - "$type": "Microsoft.SendActivity", + "$type": "Microsoft.BeginDialog", "$designer": { - "id": "456012", - "name": "Send a response" + "id": "994400", + "name": "Begin a new dialog" }, - "activity": "${bfdactivity-456012()}" + "activityProcessed": true, + "dialog": "ViewItem" } - ], - "intent": "Greeting" + ] }, { "$type": "Microsoft.OnIntent", "$designer": { - "id": "723797" + "id": "802923" }, + "intent": "UserProfile", + "condition": "#UserProfile.Score > 0.8", "actions": [ { - "$type": "Microsoft.TextInput", - "$designer": { - "id": "069270", - "name": "Text input" - }, - "prompt": "${bfdprompt-069270()}", - "maxTurnCount": 3, - "property": "dialog.item", - "alwaysPrompt": false, - "allowInterruptions": "turn.recognized.score > 0.7 && !#AddItem && !@itemTitle", - "value": "=@itemTitle" - }, - { - "$type": "Microsoft.IfCondition", - "$designer": { - "id": "954569", - "name": "Branch: If/Else" - }, - "condition": "dialog.listType == null", - "actions": [ - { - "$type": "Microsoft.ChoiceInput", - "$designer": { - "id": "781953", - "name": "Multiple choice" - }, - "prompt": "${bfdprompt-781953()}", - "maxTurnCount": 3, - "property": "dialog.listType", - "alwaysPrompt": false, - "allowInterruptions": "turn.recognized.score > 0.7 && !#AddItem && !@listType", - "outputFormat": "value", - "choices": [ - { - "value": "Shopping" - }, - { - "value": "Todo" - }, - { - "value": "Grocery" - } - ], - "appendChoices": "true", - "defaultLocale": "en-us", - "style": "Auto", - "choiceOptions": { - "inlineSeparator": ", ", - "inlineOr": " or ", - "inlineOrMore": ", or ", - "includeNumbers": true - }, - "recognizerOptions": { - "noValue": false - }, - "value": "=@listType" - } - ] - }, - { - "$type": "Microsoft.EditArray", - "$designer": { - "id": "052998", - "name": "Edit an Array Property" - }, - "changeType": "Push", - "itemsProperty": "user.taskLists[dialog.listType]", - "value": "=dialog.item" - }, - { - "$type": "Microsoft.SendActivity", - "$designer": { - "id": "775572", - "name": "Send a response" - }, - "activity": "${bfdactivity-775572()}" - }, - { - "$type": "Microsoft.DeleteProperty", + "$type": "Microsoft.BeginDialog", "$designer": { - "id": "739935", - "name": "Delete a Property" + "id": "187925", + "name": "Begin a new dialog" }, - "property": "dialog.item" - }, + "activityProcessed": true, + "dialog": "UserProfile" + } + ] + }, + { + "$type": "Microsoft.OnIntent", + "$designer": { + "id": "732966" + }, + "intent": "whatCanYouDo", + "condition": "#whatCanYouDo.Score > 0.8", + "actions": [ { - "$type": "Microsoft.DeleteProperty", + "$type": "Microsoft.BeginDialog", "$designer": { - "id": "485938", - "name": "Delete a Property" + "id": "623941", + "name": "Begin a new dialog" }, - "property": "dialog.listType" + "activityProcessed": true, + "dialog": "Help" } - ], - "intent": "AddItem" + ] }, { "$type": "Microsoft.OnIntent", "$designer": { - "id": "332735" + "id": "683937" }, + "intent": "cancel", + "condition": "#cancel.Score > 0.8", "actions": [ { - "$type": "Microsoft.IfCondition", + "$type": "Microsoft.ConfirmInput", "$designer": { - "id": "233783", - "name": "Branch: If/Else" + "id": "107784", + "name": "Confirmation" }, - "condition": "dialog.listType == null", - "actions": [ - { - "$type": "Microsoft.ChoiceInput", - "$designer": { - "id": "637111", - "name": "Multiple choice" - }, - "prompt": "${bfdprompt-637111()}", - "maxTurnCount": 3, - "property": "dialog.listType", - "alwaysPrompt": false, - "allowInterruptions": "turn.recognized.score > 0.7 && !#DeleteItem && !@listType", - "outputFormat": "value", - "value": "=@listType", - "choices": [ - { - "value": "Shopping" - }, - { - "value": "Grocery" - }, - { - "value": "Todo" - } - ], - "appendChoices": "true", - "defaultLocale": "en-us", - "style": "Auto", - "choiceOptions": { - "inlineSeparator": ", ", - "inlineOr": " or ", - "inlineOrMore": ", or ", - "includeNumbers": true - }, - "recognizerOptions": { - "noValue": false - } - } - ] + "prompt": "${bfdprompt-107784()}", + "maxTurnCount": "3", + "property": "turn.cancelOutcome", + "value": "=@confirmation", + "allowInterruptions": "!@confirmation", + "defaultLocale": "en-us", + "style": "Auto", + "choiceOptions": { + "inlineSeparator": ", ", + "inlineOr": " or ", + "inlineOrMore": ", or ", + "includeNumbers": true + } }, { "$type": "Microsoft.IfCondition", "$designer": { - "id": "474448", - "name": "Branch: If/Else" + "id": "487483", + "name": "Branch: if/else" }, - "condition": "user.taskLists && user.taskLists[dialog.listType] && count(user.taskLists[dialog.listType]) > 0", + "condition": "turn.cancelOutcome == true || turn.cancelOutcome == \"yes\"", "actions": [ { "$type": "Microsoft.SendActivity", "$designer": { - "id": "212971", + "id": "140076", "name": "Send a response" }, - "activity": "${bfdactivity-212971()}" - }, - { - "$type": "Microsoft.TextInput", - "$designer": { - "id": "879447", - "name": "Text input" - }, - "prompt": "${bfdprompt-879447()}", - "maxTurnCount": 3, - "property": "dialog.item", - "alwaysPrompt": false, - "allowInterruptions": "turn.recognized.score > 0.7 && !#DeleteItem && !@itemTitle", - "value": "=@itemTitle" + "activity": "${bfdactivity-140076()}" }, { - "$type": "Microsoft.EditArray", - "$designer": { - "id": "528783", - "name": "Edit an Array Property" - }, - "changeType": "Remove", - "itemsProperty": "user.taskLists[dialog.listType]", - "resultProperty": "turn.itemDeleted", - "value": "=dialog.item" - }, - { - "$type": "Microsoft.SendActivity", + "$type": "Microsoft.CancelAllDialogs", "$designer": { - "id": "056974", - "name": "Send a response" - }, - "activity": "${bfdactivity-056974()}" + "id": "803782", + "name": "Cancel all dialogs" + } } ], "elseActions": [ { "$type": "Microsoft.SendActivity", "$designer": { - "id": "084161", + "id": "272233", "name": "Send a response" }, - "activity": "${bfdactivity-084161()}" + "activity": "${bfdactivity-272233()}" } ] - }, - { - "$type": "Microsoft.DeleteProperty", - "$designer": { - "id": "807371", - "name": "Delete a Property" - }, - "property": "dialog.item" - }, - { - "$type": "Microsoft.DeleteProperty", - "$designer": { - "id": "194084", - "name": "Delete a Property" - }, - "property": "dialog.listType" } - ], - "intent": "DeleteItem" + ] }, { - "$type": "Microsoft.OnIntent", + "$type": "Microsoft.OnUnknownIntent", "$designer": { - "id": "877754" + "id": "303881" }, "actions": [ - { - "$type": "Microsoft.IfCondition", - "$designer": { - "id": "380536", - "name": "Branch: If/Else" - }, - "condition": "dialog.listType == null", - "actions": [ - { - "$type": "Microsoft.ChoiceInput", - "$designer": { - "id": "059540", - "name": "Multiple choice" - }, - "prompt": "${bfdprompt-059540()}", - "maxTurnCount": 3, - "property": "dialog.listType", - "alwaysPrompt": false, - "allowInterruptions": "turn.recognized.score > 0.7 && !#ViewCollection && !@listType", - "outputFormat": "value", - "value": "=@listType", - "choices": [ - { - "value": "Todo" - }, - { - "value": "Shopping" - }, - { - "value": "Grocery" - }, - { - "value": "All" - }, - { - "value": "Cancel" - } - ], - "appendChoices": "true", - "defaultLocale": "en-us", - "style": "Auto", - "choiceOptions": { - "inlineSeparator": ", ", - "inlineOr": " or ", - "inlineOrMore": ", or ", - "includeNumbers": true - }, - "recognizerOptions": { - "noValue": false - } - } - ] - }, { "$type": "Microsoft.SendActivity", "$designer": { - "id": "052697", + "id": "037398", "name": "Send a response" }, - "activity": "${bfdactivity-052697()}" - }, - { - "$type": "Microsoft.DeleteProperty", - "$designer": { - "id": "885825", - "name": "Delete a Property" - }, - "property": "dialog.listType" + "activity": "${bfdactivity-037398()}" } - ], - "intent": "ViewCollection" + ] } ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "todobotwithluissample.lg" -} \ No newline at end of file +}