-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge remote seperate the new recognizer set sample
- Loading branch information
Showing
17 changed files
with
667 additions
and
201 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
...ges/server/assets/projects/TodoRecognizerSetSample/ComposerDialogs/AddToDo/AddToDo.dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"$type": "Microsoft.AdaptiveDialog", | ||
"$designer": { | ||
"id": "808722" | ||
}, | ||
"autoEndDialog": true, | ||
"defaultResultProperty": "dialog.result", | ||
"triggers": [ | ||
{ | ||
"$type": "Microsoft.OnBeginDialog", | ||
"$designer": { | ||
"id": "335456" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.TextInput", | ||
"$designer": { | ||
"id": "298897" | ||
}, | ||
"property": "dialog.todo", | ||
"prompt": "OK, please enter the title of your todo.", | ||
"maxTurnCount": 3, | ||
"value": "=@title", | ||
"alwaysPrompt": false, | ||
"allowInterruptions": "true" | ||
}, | ||
{ | ||
"$type": "Microsoft.EditArray", | ||
"$designer": { | ||
"id": "567087" | ||
}, | ||
"changeType": "push", | ||
"itemsProperty": "user.todos", | ||
"value": "=dialog.todo" | ||
}, | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "116673" | ||
}, | ||
"activity": "${bfdactivity-116673()}" | ||
} | ||
] | ||
} | ||
], | ||
"generator": "AddToDo.lg", | ||
"$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" | ||
} |
4 changes: 4 additions & 0 deletions
4
...ackages/server/assets/projects/TodoRecognizerSetSample/ComposerDialogs/AddToDo/AddToDo.lg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[import](common.lg) | ||
|
||
# bfdactivity-116673 | ||
-Successfully added a todo named ${dialog.todo} |
Empty file.
54 changes: 54 additions & 0 deletions
54
...rver/assets/projects/TodoRecognizerSetSample/ComposerDialogs/ClearToDos/ClearToDos.dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"$type": "Microsoft.AdaptiveDialog", | ||
"$designer": { | ||
"id": "316336" | ||
}, | ||
"autoEndDialog": true, | ||
"defaultResultProperty": "dialog.result", | ||
"triggers": [ | ||
{ | ||
"$type": "Microsoft.OnBeginDialog", | ||
"$designer": { | ||
"id": "480162" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.EditArray", | ||
"$designer": { | ||
"id": "832307" | ||
}, | ||
"changeType": "Clear", | ||
"itemsProperty": "user.todos", | ||
"resultProperty": "dialog.cleared" | ||
}, | ||
{ | ||
"$type": "Microsoft.IfCondition", | ||
"$designer": { | ||
"id": "983761" | ||
}, | ||
"condition": "dialog.cleared", | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "832307" | ||
}, | ||
"activity": "${bfdactivity-832307()}" | ||
} | ||
], | ||
"elseActions": [ | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "983761" | ||
}, | ||
"activity": "${bfdactivity-983761()}" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"generator": "ClearToDos.lg", | ||
"$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" | ||
} |
7 changes: 7 additions & 0 deletions
7
...s/server/assets/projects/TodoRecognizerSetSample/ComposerDialogs/ClearToDos/ClearToDos.lg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[import](common.lg) | ||
|
||
# bfdactivity-832307 | ||
-Successfully cleared items in the Todo List. | ||
|
||
# bfdactivity-983761 | ||
-You don't have any items in the Todo List. |
Empty file.
67 changes: 67 additions & 0 deletions
67
...rver/assets/projects/TodoRecognizerSetSample/ComposerDialogs/DeleteToDo/DeleteToDo.dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"$type": "Microsoft.AdaptiveDialog", | ||
"$designer": { | ||
"id": "114909" | ||
}, | ||
"autoEndDialog": true, | ||
"defaultResultProperty": "dialog.result", | ||
"triggers": [ | ||
{ | ||
"$type": "Microsoft.OnBeginDialog", | ||
"$designer": { | ||
"id": "768658" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.TextInput", | ||
"$designer": { | ||
"id": "870620" | ||
}, | ||
"property": "dialog.todo", | ||
"prompt": "OK, please enter the title of the todo you want to remove.", | ||
"maxTurnCount": 3, | ||
"value": "=@title", | ||
"alwaysPrompt": false, | ||
"allowInterruptions": "false" | ||
}, | ||
{ | ||
"$type": "Microsoft.EditArray", | ||
"$designer": { | ||
"id": "492096" | ||
}, | ||
"changeType": "Remove", | ||
"itemsProperty": "user.todos", | ||
"resultProperty": "dialog.removed", | ||
"value": "=dialog.todo" | ||
}, | ||
{ | ||
"$type": "Microsoft.IfCondition", | ||
"$designer": { | ||
"id": "549615" | ||
}, | ||
"condition": "dialog.removed", | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "725469" | ||
}, | ||
"activity": "${bfdactivity-725469()}" | ||
} | ||
], | ||
"elseActions": [ | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "549615" | ||
}, | ||
"activity": "${bfdactivity-549615()}" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"generator": "DeleteToDo.lg", | ||
"$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" | ||
} |
10 changes: 10 additions & 0 deletions
10
...s/server/assets/projects/TodoRecognizerSetSample/ComposerDialogs/DeleteToDo/DeleteToDo.lg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[import](common.lg) | ||
|
||
# bfdactivity-725469 | ||
-Successfully removed a todo named ${dialog.todo} | ||
|
||
# bfdactivity-549615 | ||
-${dialog.todo} is not in the Todo List | ||
|
||
# bfdprompt-870620() | ||
- OK, please enter the title of the todo you want to remove. |
Empty file.
202 changes: 202 additions & 0 deletions
202
.../packages/server/assets/projects/TodoRecognizerSetSample/ComposerDialogs/Main/Main.dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
{ | ||
"$type": "Microsoft.AdaptiveDialog", | ||
"$designer": { | ||
"id": "288769", | ||
"description": "This is a bot that demonstrates how to manage a ToDo list using Regular Expressions." | ||
}, | ||
"autoEndDialog": false, | ||
"defaultResultProperty": "dialog.result", | ||
"recognizer": { | ||
"$kind": "Microsoft.RecognizerSet", | ||
"recognizers": [ | ||
{ | ||
"$kind": "Microsoft.MultiLanguageRecognizer", | ||
"recognizers": { | ||
"en-us": { | ||
"$kind": "Microsoft.CrossTrainedRecognizerSet", | ||
"recognizers": [ | ||
{ | ||
"$kind": "Microsoft.RegexRecognizer", | ||
"id": "regex", | ||
"intents": [ | ||
{ | ||
"intent": "AddIntent", | ||
"pattern": "(?i)(?:add|create) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?" | ||
}, | ||
{ | ||
"intent": "ClearIntent", | ||
"pattern": "(?i)(?:delete|remove|clear) (?:all|every) (?:to-dos|todos|tasks)" | ||
}, | ||
{ | ||
"intent": "DeleteIntent", | ||
"pattern": "(?i)(?:delete|remove|clear) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?" | ||
}, | ||
{ | ||
"intent": "ShowIntent", | ||
"pattern": "(?i)(?:show|see|view) .*(?:to-do|todo|task)" | ||
}, | ||
{ | ||
"intent": "HelpIntent", | ||
"pattern": "(?i)help" | ||
}, | ||
{ | ||
"intent": "CancelIntent", | ||
"pattern": "(?i)cancel|never mind" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.ValueRecognizer" | ||
} | ||
] | ||
}, | ||
"generator": "Main.lg", | ||
"triggers": [ | ||
{ | ||
"$type": "Microsoft.OnConversationUpdateActivity", | ||
"$designer": { | ||
"id": "376720" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.Foreach", | ||
"$designer": { | ||
"id": "518944", | ||
"name": "Loop: for each item" | ||
}, | ||
"itemsProperty": "turn.Activity.membersAdded", | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.IfCondition", | ||
"$designer": { | ||
"id": "641773", | ||
"name": "Branch: if/else" | ||
}, | ||
"condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "157674", | ||
"name": "Send a response" | ||
}, | ||
"activity": "${bfdactivity-157674()}" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"$type": "Microsoft.OnIntent", | ||
"$designer": { | ||
"id": "064505" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.BeginDialog", | ||
"dialog": "AddToDo" | ||
} | ||
], | ||
"intent": "AddIntent" | ||
}, | ||
{ | ||
"$type": "Microsoft.OnIntent", | ||
"$designer": { | ||
"id": "114961" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.BeginDialog", | ||
"dialog": "DeleteToDo", | ||
"$designer": { | ||
"id": "978613" | ||
} | ||
} | ||
], | ||
"intent": "DeleteIntent" | ||
}, | ||
{ | ||
"$type": "Microsoft.OnIntent", | ||
"$designer": { | ||
"id": "088050" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.BeginDialog", | ||
"dialog": "ClearToDos" | ||
} | ||
], | ||
"intent": "ClearIntent" | ||
}, | ||
{ | ||
"$type": "Microsoft.OnIntent", | ||
"$designer": { | ||
"id": "633942" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "696707" | ||
}, | ||
"activity": "${bfdactivity-696707()}" | ||
} | ||
], | ||
"intent": "HelpIntent" | ||
}, | ||
{ | ||
"$type": "Microsoft.OnIntent", | ||
"$designer": { | ||
"id": "794124" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.BeginDialog", | ||
"dialog": "ShowToDos" | ||
} | ||
], | ||
"intent": "ShowIntent" | ||
}, | ||
{ | ||
"$type": "Microsoft.OnIntent", | ||
"$designer": { | ||
"id": "179728" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "677440" | ||
}, | ||
"activity": "ok." | ||
}, | ||
{ | ||
"$type": "Microsoft.EndDialog" | ||
} | ||
], | ||
"intent": "CancelIntent" | ||
}, | ||
{ | ||
"$type": "Microsoft.OnUnknownIntent", | ||
"$designer": { | ||
"id": "677447" | ||
}, | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "677448" | ||
}, | ||
"activity": "Hi! I'm a ToDo bot. Say \"add a todo named first\" to get started." | ||
} | ||
] | ||
} | ||
], | ||
"$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" | ||
} |
Oops, something went wrong.