@microsoft/agents-hosting-dialogs 1.0.0 → 1.0.7-g73d3d58001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/agentStateSet.d.ts +30 -27
- package/dist/src/agentStateSet.js +30 -27
- package/dist/src/agentStateSet.js.map +1 -1
- package/dist/src/choices/findValues.d.ts +21 -12
- package/dist/src/choices/findValues.js +8 -5
- package/dist/src/choices/findValues.js.map +1 -1
- package/dist/src/componentDialog.d.ts +117 -95
- package/dist/src/componentDialog.js +106 -84
- package/dist/src/componentDialog.js.map +1 -1
- package/dist/src/dialog.d.ts +15 -10
- package/dist/src/dialog.js +15 -10
- package/dist/src/dialog.js.map +1 -1
- package/dist/src/dialogContainer.d.ts +5 -2
- package/dist/src/dialogContainer.js +5 -2
- package/dist/src/dialogContainer.js.map +1 -1
- package/dist/src/dialogContext.d.ts +33 -12
- package/dist/src/dialogContext.js +33 -13
- package/dist/src/dialogContext.js.map +1 -1
- package/dist/src/dialogInstance.d.ts +11 -11
- package/dist/src/dialogReason.d.ts +13 -13
- package/dist/src/dialogReason.js +13 -13
- package/dist/src/dialogReason.js.map +1 -1
- package/dist/src/dialogSet.d.ts +12 -7
- package/dist/src/dialogSet.js +10 -5
- package/dist/src/dialogSet.js.map +1 -1
- package/dist/src/dialogTurnResult.d.ts +1 -0
- package/dist/src/dialogTurnStateConstants.d.ts +1 -0
- package/dist/src/dialogTurnStateConstants.js +1 -0
- package/dist/src/dialogTurnStateConstants.js.map +1 -1
- package/dist/src/dialogTurnStatus.d.ts +1 -0
- package/dist/src/dialogTurnStatus.js +1 -0
- package/dist/src/dialogTurnStatus.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/memory/dialogPath.d.ts +8 -8
- package/dist/src/memory/dialogPath.js +8 -8
- package/dist/src/memory/dialogStateManager.d.ts +9 -4
- package/dist/src/memory/dialogStateManager.js +9 -4
- package/dist/src/memory/dialogStateManager.js.map +1 -1
- package/dist/src/memory/turnPath.d.ts +12 -12
- package/dist/src/memory/turnPath.js +12 -12
- package/dist/src/prompts/activityPrompt.d.ts +4 -0
- package/dist/src/prompts/activityPrompt.js +4 -0
- package/dist/src/prompts/activityPrompt.js.map +1 -1
- package/dist/src/prompts/attachmentPrompt.d.ts +1 -0
- package/dist/src/prompts/attachmentPrompt.js +1 -0
- package/dist/src/prompts/attachmentPrompt.js.map +1 -1
- package/dist/src/prompts/choicePrompt.d.ts +4 -0
- package/dist/src/prompts/choicePrompt.js +1 -0
- package/dist/src/prompts/choicePrompt.js.map +1 -1
- package/dist/src/prompts/confirmPrompt.d.ts +4 -1
- package/dist/src/prompts/confirmPrompt.js +1 -0
- package/dist/src/prompts/confirmPrompt.js.map +1 -1
- package/dist/src/prompts/datetimePrompt.d.ts +1 -0
- package/dist/src/prompts/datetimePrompt.js +1 -0
- package/dist/src/prompts/datetimePrompt.js.map +1 -1
- package/dist/src/prompts/numberPrompt.d.ts +1 -0
- package/dist/src/prompts/numberPrompt.js +1 -0
- package/dist/src/prompts/numberPrompt.js.map +1 -1
- package/dist/src/prompts/prompt.d.ts +24 -8
- package/dist/src/prompts/prompt.js +8 -0
- package/dist/src/prompts/prompt.js.map +1 -1
- package/dist/src/prompts/promptCultureModels.d.ts +16 -1
- package/dist/src/prompts/promptCultureModels.js +4 -1
- package/dist/src/prompts/promptCultureModels.js.map +1 -1
- package/dist/src/prompts/textPrompt.d.ts +3 -0
- package/dist/src/prompts/textPrompt.js +3 -0
- package/dist/src/prompts/textPrompt.js.map +1 -1
- package/dist/src/recognizer.d.ts +3 -0
- package/dist/src/recognizer.js +1 -0
- package/dist/src/recognizer.js.map +1 -1
- package/dist/src/recognizerResult.d.ts +5 -4
- package/dist/src/recognizerResult.js +5 -4
- package/dist/src/recognizerResult.js.map +1 -1
- package/dist/src/stringUtils.d.ts +4 -3
- package/dist/src/stringUtils.js +4 -3
- package/dist/src/stringUtils.js.map +1 -1
- package/dist/src/waterfallDialog.d.ts +11 -4
- package/dist/src/waterfallDialog.js +11 -4
- package/dist/src/waterfallDialog.js.map +1 -1
- package/package.json +2 -2
- package/src/agentStateSet.ts +30 -27
- package/src/choices/findValues.ts +21 -12
- package/src/componentDialog.ts +127 -97
- package/src/dialog.ts +15 -10
- package/src/dialogContainer.ts +5 -2
- package/src/dialogContext.ts +41 -15
- package/src/dialogInstance.ts +11 -11
- package/src/dialogReason.ts +13 -13
- package/src/dialogSet.ts +12 -7
- package/src/dialogTurnResult.ts +1 -0
- package/src/dialogTurnStateConstants.ts +1 -0
- package/src/dialogTurnStatus.ts +1 -0
- package/src/index.ts +3 -0
- package/src/memory/dialogPath.ts +8 -8
- package/src/memory/dialogStateManager.ts +9 -4
- package/src/memory/turnPath.ts +12 -12
- package/src/prompts/activityPrompt.ts +4 -0
- package/src/prompts/attachmentPrompt.ts +1 -0
- package/src/prompts/choicePrompt.ts +4 -0
- package/src/prompts/confirmPrompt.ts +4 -1
- package/src/prompts/datetimePrompt.ts +1 -0
- package/src/prompts/numberPrompt.ts +1 -0
- package/src/prompts/prompt.ts +24 -8
- package/src/prompts/promptCultureModels.ts +16 -1
- package/src/prompts/textPrompt.ts +3 -0
- package/src/recognizer.ts +3 -0
- package/src/recognizerResult.ts +5 -4
- package/src/stringUtils.ts +4 -3
- package/src/waterfallDialog.ts +11 -4
|
@@ -10,28 +10,31 @@ const PERSISTED_DIALOG_STATE = 'dialogs';
|
|
|
10
10
|
/**
|
|
11
11
|
* Base class for a dialog that contains other child dialogs.
|
|
12
12
|
*
|
|
13
|
+
* @param O (Optional) options that can be passed into the `DialogContext.beginDialog()` method.
|
|
14
|
+
*
|
|
13
15
|
* @remarks
|
|
14
16
|
* Component dialogs let you break your agent's logic up into components that can themselves be added
|
|
15
17
|
* as a dialog to another `ComponentDialog` or `DialogSet`. Components can also be exported as part
|
|
16
18
|
* of a node package and used within other agents.
|
|
17
19
|
*
|
|
18
|
-
* @param O (Optional) options that can be passed into the `DialogContext.beginDialog()` method.
|
|
19
20
|
*/
|
|
20
21
|
class ComponentDialog extends dialogContainer_1.DialogContainer {
|
|
21
22
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
* Called when the dialog is started and pushed onto the parent's dialog stack.
|
|
24
|
+
*
|
|
25
|
+
* @param outerDialogContext The parent DialogContext for the current turn of conversation.
|
|
26
|
+
* @param options Optional, initial information to pass to the dialog.
|
|
27
|
+
* @returns A Promise representing the asynchronous operation.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* If the task is successful, the result indicates whether the dialog is still
|
|
31
|
+
* active after the turn has been processed by the dialog.
|
|
32
|
+
* By default, this calls the
|
|
33
|
+
* Dialog.BeginDialogAsync(DialogContext, object, CancellationToken) method
|
|
34
|
+
* of the component dialog's initial dialog, as defined by InitialDialogId.
|
|
35
|
+
* Override this method in a derived class to implement interrupt logic.
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
35
38
|
async beginDialog(outerDialogContext, options) {
|
|
36
39
|
await this.checkForVersionChange(outerDialogContext);
|
|
37
40
|
// Start the inner dialog.
|
|
@@ -56,14 +59,16 @@ class ComponentDialog extends dialogContainer_1.DialogContainer {
|
|
|
56
59
|
/**
|
|
57
60
|
* Called when the dialog is _continued_, where it is the active dialog and the
|
|
58
61
|
* user replies with a new Activity.
|
|
59
|
-
* If this method is *not* overridden, the dialog automatically ends when the user replies.
|
|
60
62
|
*
|
|
61
63
|
* @param outerDialogContext The parent DialogContext for the current turn of conversation.
|
|
62
64
|
* @returns A Promise representing the asynchronous operation.
|
|
65
|
+
*
|
|
63
66
|
* @remarks
|
|
67
|
+
* If this method is *not* overridden, the dialog automatically ends when the user replies.
|
|
64
68
|
* If the task is successful, the result indicates whether the dialog is still
|
|
65
69
|
* active after the turn has been processed by the dialog. The result may also contain a
|
|
66
70
|
* return value.
|
|
71
|
+
*
|
|
67
72
|
*/
|
|
68
73
|
async continueDialog(outerDialogContext) {
|
|
69
74
|
await this.checkForVersionChange(outerDialogContext);
|
|
@@ -87,6 +92,7 @@ class ComponentDialog extends dialogContainer_1.DialogContainer {
|
|
|
87
92
|
* @param _result Optional, value returned from the dialog that was called. The type
|
|
88
93
|
* of the value returned is dependent on the child dialog.
|
|
89
94
|
* @returns A Promise representing the asynchronous operation.
|
|
95
|
+
*
|
|
90
96
|
* @remarks
|
|
91
97
|
* If the task is successful, the result indicates whether this dialog is still
|
|
92
98
|
* active after this dialog turn has been processed.
|
|
@@ -108,12 +114,12 @@ class ComponentDialog extends dialogContainer_1.DialogContainer {
|
|
|
108
114
|
return dialog_1.Dialog.EndOfTurn;
|
|
109
115
|
}
|
|
110
116
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
* Called when the dialog should re-prompt the user for input.
|
|
118
|
+
*
|
|
119
|
+
* @param context The TurnContext object for this turn.
|
|
120
|
+
* @param instance State information for this dialog.
|
|
121
|
+
* @returns A Promise representing the asynchronous operation.
|
|
122
|
+
*/
|
|
117
123
|
async repromptDialog(context, instance) {
|
|
118
124
|
// Forward to inner dialogs
|
|
119
125
|
const innerDC = this.createInnerDC(context, instance);
|
|
@@ -122,15 +128,18 @@ class ComponentDialog extends dialogContainer_1.DialogContainer {
|
|
|
122
128
|
await this.onRepromptDialog(context, instance);
|
|
123
129
|
}
|
|
124
130
|
/**
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
* Called when the Dialog is ending.
|
|
132
|
+
*
|
|
133
|
+
* @param context The TurnContext object for this turn.
|
|
134
|
+
* @param instance State information associated with the instance of this component Dialog on its parent's dialog stack.
|
|
135
|
+
* @param reason Reason why the Dialog ended.
|
|
136
|
+
* @returns A Promise representing the asynchronous operation.
|
|
137
|
+
*
|
|
138
|
+
* @remarks
|
|
139
|
+
* When this method is called from the parent dialog's context, the component Dialog
|
|
140
|
+
* cancels all of the dialogs on its inner dialog stack before ending.
|
|
141
|
+
*
|
|
142
|
+
*/
|
|
134
143
|
async endDialog(context, instance, reason) {
|
|
135
144
|
// Forward cancel to inner dialogs
|
|
136
145
|
if (reason === dialogReason_1.DialogReason.cancelCalled) {
|
|
@@ -141,13 +150,14 @@ class ComponentDialog extends dialogContainer_1.DialogContainer {
|
|
|
141
150
|
await this.onEndDialog(context, instance, reason);
|
|
142
151
|
}
|
|
143
152
|
/**
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
153
|
+
* Adds a child Dialog or prompt to the components internal DialogSet.
|
|
154
|
+
*
|
|
155
|
+
* @param dialog The child Dialog or prompt to add.
|
|
156
|
+
* @returns The ComponentDialog after the operation is complete.
|
|
157
|
+
*
|
|
158
|
+
* @remarks
|
|
159
|
+
* The Dialog.id of the first child added to the component will be assigned to the initialDialogId property.
|
|
160
|
+
*/
|
|
151
161
|
addDialog(dialog) {
|
|
152
162
|
this.dialogs.add(dialog);
|
|
153
163
|
if (this.initialDialogId === undefined) {
|
|
@@ -165,78 +175,90 @@ class ComponentDialog extends dialogContainer_1.DialogContainer {
|
|
|
165
175
|
return this.createInnerDC(outerDialogContext, outerDialogContext.activeDialog);
|
|
166
176
|
}
|
|
167
177
|
/**
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
* Called anytime an instance of the component has been started.
|
|
179
|
+
*
|
|
180
|
+
* @param innerDialogContext Dialog context for the components internal `DialogSet`.
|
|
181
|
+
* @param options (Optional) options that were passed to the component by its parent.
|
|
182
|
+
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
183
|
+
*
|
|
184
|
+
* @remarks
|
|
185
|
+
* SHOULD be overridden by components that wish to perform custom interruption logic. The
|
|
186
|
+
* default implementation calls `innerDC.beginDialog()` with the dialog assigned to
|
|
187
|
+
* `initialDialogId`.
|
|
188
|
+
*
|
|
189
|
+
*/
|
|
178
190
|
onBeginDialog(innerDialogContext, options) {
|
|
179
191
|
return innerDialogContext.beginDialog(this.initialDialogId, options);
|
|
180
192
|
}
|
|
181
193
|
/**
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
194
|
+
* Called anytime a multi-turn component receives additional activities.
|
|
195
|
+
*
|
|
196
|
+
* @param innerDC Dialog context for the components internal `DialogSet`.
|
|
197
|
+
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
198
|
+
*
|
|
199
|
+
* @remarks
|
|
200
|
+
* SHOULD be overridden by components that wish to perform custom interruption logic. The
|
|
201
|
+
* default implementation calls `innerDC.continueDialog()`.
|
|
202
|
+
*/
|
|
190
203
|
onContinueDialog(innerDC) {
|
|
191
204
|
return innerDC.continueDialog();
|
|
192
205
|
}
|
|
193
206
|
/**
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
207
|
+
* Called when the component is ending.
|
|
208
|
+
*
|
|
209
|
+
* @param _context Context for the current turn of conversation.
|
|
210
|
+
* @param _instance The components instance data within its parents dialog stack.
|
|
211
|
+
* @param _reason The reason the component is ending.
|
|
212
|
+
* @returns A promise representing the asynchronous operation.
|
|
213
|
+
*
|
|
214
|
+
* @remarks
|
|
215
|
+
* If the `reason` code is equal to `DialogReason.cancelCalled`, then any active child dialogs
|
|
216
|
+
* will be cancelled before this method is called.
|
|
217
|
+
*
|
|
218
|
+
*/
|
|
204
219
|
onEndDialog(_context, _instance, _reason) {
|
|
205
220
|
return Promise.resolve();
|
|
206
221
|
}
|
|
207
222
|
/**
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
223
|
+
* Called when the component has been requested to re-prompt the user for input.
|
|
224
|
+
*
|
|
225
|
+
* @param _context Context for the current turn of conversation.
|
|
226
|
+
* @param _instance The instance of the current dialog.
|
|
227
|
+
* @returns A promise representing the asynchronous operation.
|
|
228
|
+
*
|
|
229
|
+
* @remarks
|
|
230
|
+
* The active child dialog will have already been asked to reprompt before this method is called.
|
|
231
|
+
*
|
|
232
|
+
*/
|
|
216
233
|
onRepromptDialog(_context, _instance) {
|
|
217
234
|
return Promise.resolve();
|
|
218
235
|
}
|
|
219
236
|
/**
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
237
|
+
* Called when the components last active child dialog ends and the component is ending.
|
|
238
|
+
*
|
|
239
|
+
* @param outerDC Dialog context for the parents `DialogSet`.
|
|
240
|
+
* @param result Result returned by the last active child dialog. Can be a value of `undefined`.
|
|
241
|
+
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
242
|
+
*
|
|
243
|
+
* @remarks
|
|
244
|
+
* SHOULD be overridden by components that wish to perform custom logic before the component
|
|
245
|
+
* ends. The default implementation calls `outerDC.endDialog()` with the `result` returned
|
|
246
|
+
* from the last active child dialog.
|
|
247
|
+
*/
|
|
230
248
|
endComponent(outerDC, result) {
|
|
231
249
|
return outerDC.endDialog(result);
|
|
232
250
|
}
|
|
233
251
|
/**
|
|
234
|
-
*
|
|
252
|
+
* Creates a new DialogContext instance for the current turn of conversation.
|
|
253
|
+
*
|
|
235
254
|
* @param context TurnContext or DialogContext for the current turn of conversation with the user.
|
|
236
255
|
* @param instance DialogInstance which contains the current state information for this dialog.
|
|
237
256
|
* @returns A new DialogContext instance.
|
|
257
|
+
*
|
|
238
258
|
* @remarks
|
|
239
259
|
* You should only call this if you don't have a dc to work with (such as OnResume())
|
|
260
|
+
*
|
|
261
|
+
* @private
|
|
240
262
|
*/
|
|
241
263
|
createInnerDC(context, instance) {
|
|
242
264
|
if (!instance) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentDialog.js","sourceRoot":"","sources":["../../src/componentDialog.ts"],"names":[],"mappings":";;;AAKA,qCAAiC;AACjC,mDAA+C;AAC/C,uDAAmD;AAEnD,iDAA6C;AAE7C,yDAAqD;AAErD,MAAM,sBAAsB,GAAG,SAAS,CAAA;AAExC
|
|
1
|
+
{"version":3,"file":"componentDialog.js","sourceRoot":"","sources":["../../src/componentDialog.ts"],"names":[],"mappings":";;;AAKA,qCAAiC;AACjC,mDAA+C;AAC/C,uDAAmD;AAEnD,iDAA6C;AAE7C,yDAAqD;AAErD,MAAM,sBAAsB,GAAG,SAAS,CAAA;AAExC;;;;;;;;;;GAUG;AACH,MAAa,eAAuC,SAAQ,iCAAkB;IAS5E;;;;;;;;;;;;;;;QAeI;IACJ,KAAK,CAAC,WAAW,CAAE,kBAAiC,EAAE,OAAW;QAC/D,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAA;QAEpD,0BAA0B;QAC1B,MAAM,OAAO,GAAkB,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAA;QAC1E,MAAM,UAAU,GAA0B,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAEpF,gCAAgC;QAChC,IAAI,UAAU,CAAC,MAAM,KAAK,mCAAgB,CAAC,OAAO,EAAE,CAAC;YACnD,IAAI,UAAU,CAAC,MAAM,KAAK,mCAAgB,CAAC,SAAS,EAAE,CAAC;gBACrD,MAAM,IAAI,CAAC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EAAE,OAAW;QACrE,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAA;IACtE,CAAC;IAED;;;;;;;;;QASI;IACM,gBAAgB,CAAE,OAAsB;QAChD,OAAO,OAAO,CAAC,cAAc,EAAE,CAAA;IACjC,CAAC;IAED;;;;;;;;;;;;QAYI;IACM,WAAW,CAAE,QAAqB,EAAE,SAAyB,EAAE,OAAqB;QAC5F,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;IAED;;;;;;;;;;QAUI;IACM,gBAAgB,CAAE,QAAqB,EAAE,SAAyB;QAC1E,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;IAED;;;;;;;;;;;QAWI;IACM,YAAY,CAAE,OAAsB,EAAE,MAAW;QACzD,OAAO,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;IA4BD;;;;;;;;;;;SAWK;IACG,aAAa,CAAE,OAAoC,EAAE,QAAwB;QACnF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,cAAc,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;YACpC,QAAQ,GAAG,cAAgC,CAAA;QAC7C,CAAC;QAED,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,sBAAsB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,CAAA;QACjF,QAAQ,CAAC,KAAK,CAAC,sBAAsB,CAAC,GAAG,WAAW,CAAA;QAEpD,OAAO,IAAI,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAsB,EAAE,WAAW,CAAC,CAAA;IAC7E,CAAC;CACF;AArTD,0CAqTC"}
|
package/dist/src/dialog.d.ts
CHANGED
|
@@ -31,9 +31,10 @@ export declare abstract class Dialog<O extends object = {}> extends Configurable
|
|
|
31
31
|
/**
|
|
32
32
|
* Unique ID of the dialog.
|
|
33
33
|
*
|
|
34
|
+
* @returns The Id for the dialog.
|
|
35
|
+
*
|
|
34
36
|
* @remarks
|
|
35
37
|
* This will be automatically generated if not specified.
|
|
36
|
-
* @returns The Id for the dialog.
|
|
37
38
|
*/
|
|
38
39
|
get id(): string;
|
|
39
40
|
/**
|
|
@@ -43,6 +44,8 @@ export declare abstract class Dialog<O extends object = {}> extends Configurable
|
|
|
43
44
|
/**
|
|
44
45
|
* An encoded string used to aid in the detection of agent changes on re-deployment.
|
|
45
46
|
*
|
|
47
|
+
* @returns Unique string which should only change when dialog has changed in a way that should restart the dialog.
|
|
48
|
+
*
|
|
46
49
|
* @remarks
|
|
47
50
|
* This defaults to returning the dialog's `id` but can be overridden to provide more
|
|
48
51
|
* precise change detection logic. Any dialog on the stack that has its version change will
|
|
@@ -50,7 +53,7 @@ export declare abstract class Dialog<O extends object = {}> extends Configurable
|
|
|
50
53
|
* an error will be thrown resulting in the agent error handler logic being run.
|
|
51
54
|
*
|
|
52
55
|
* Returning an empty string will disable version tracking for the component all together.
|
|
53
|
-
*
|
|
56
|
+
*
|
|
54
57
|
*/
|
|
55
58
|
getVersion(): string;
|
|
56
59
|
/**
|
|
@@ -75,6 +78,7 @@ export declare abstract class Dialog<O extends object = {}> extends Configurable
|
|
|
75
78
|
* When overridden in a derived class, continues the dialog.
|
|
76
79
|
*
|
|
77
80
|
* @param dc The context for the current dialog turn.
|
|
81
|
+
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
78
82
|
*
|
|
79
83
|
* @remarks
|
|
80
84
|
* Derived dialogs that support multiple-turn conversations should override this method.
|
|
@@ -86,7 +90,6 @@ export declare abstract class Dialog<O extends object = {}> extends Configurable
|
|
|
86
90
|
* To signal to the dialog context that this dialog has completed, await
|
|
87
91
|
* {@link DialogContext.endDialog} before exiting this method.
|
|
88
92
|
*
|
|
89
|
-
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
90
93
|
*/
|
|
91
94
|
continueDialog(dc: DialogContext): Promise<DialogTurnResult>;
|
|
92
95
|
/**
|
|
@@ -95,6 +98,7 @@ export declare abstract class Dialog<O extends object = {}> extends Configurable
|
|
|
95
98
|
* @param dc The context for the current dialog turn.
|
|
96
99
|
* @param reason The reason the dialog is resuming. This will typically be DialogReason.endCalled
|
|
97
100
|
* @param result Optional. The return value, if any, from the dialog that ended.
|
|
101
|
+
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
98
102
|
*
|
|
99
103
|
* @remarks
|
|
100
104
|
* Derived dialogs that support multiple-turn conversations should override this method.
|
|
@@ -108,7 +112,6 @@ export declare abstract class Dialog<O extends object = {}> extends Configurable
|
|
|
108
112
|
* necessarily be the one that started the child dialog.
|
|
109
113
|
* To signal to the dialog context that this dialog has completed, await {@link DialogContext.endDialog} before exiting this method.
|
|
110
114
|
*
|
|
111
|
-
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
112
115
|
*/
|
|
113
116
|
resumeDialog(dc: DialogContext, reason: DialogReason, result?: any): Promise<DialogTurnResult>;
|
|
114
117
|
/**
|
|
@@ -154,24 +157,26 @@ export declare abstract class Dialog<O extends object = {}> extends Configurable
|
|
|
154
157
|
/**
|
|
155
158
|
* Called before an event is bubbled to its parent.
|
|
156
159
|
*
|
|
160
|
+
* @param _dc The dialog context for the current turn of conversation.
|
|
161
|
+
* @param _e The event being raised.
|
|
162
|
+
* @returns Whether the event is handled by the current dialog and further processing should stop.
|
|
163
|
+
*
|
|
157
164
|
* @remarks
|
|
158
165
|
* This is a good place to perform interception of an event as returning `true` will prevent
|
|
159
166
|
* any further bubbling of the event to the dialogs parents and will also prevent any child
|
|
160
167
|
* dialogs from performing their default processing.
|
|
161
|
-
* @param _dc The dialog context for the current turn of conversation.
|
|
162
|
-
* @param _e The event being raised.
|
|
163
|
-
* @returns Whether the event is handled by the current dialog and further processing should stop.
|
|
164
168
|
*/
|
|
165
169
|
protected onPreBubbleEvent(_dc: DialogContext, _e: DialogEvent): Promise<boolean>;
|
|
166
170
|
/**
|
|
167
171
|
* Called after an event was bubbled to all parents and wasn't handled.
|
|
168
172
|
*
|
|
169
|
-
* @remarks
|
|
170
|
-
* This is a good place to perform default processing logic for an event. Returning `true` will
|
|
171
|
-
* prevent any processing of the event by child dialogs.
|
|
172
173
|
* @param _dc The dialog context for the current turn of conversation.
|
|
173
174
|
* @param _e The event being raised.
|
|
174
175
|
* @returns Whether the event is handled by the current dialog and further processing should stop.
|
|
176
|
+
*
|
|
177
|
+
* @remarks
|
|
178
|
+
* This is a good place to perform default processing logic for an event. Returning `true` will
|
|
179
|
+
* prevent any processing of the event by child dialogs.
|
|
175
180
|
*/
|
|
176
181
|
protected onPostBubbleEvent(_dc: DialogContext, _e: DialogEvent): Promise<boolean>;
|
|
177
182
|
/**
|
package/dist/src/dialog.js
CHANGED
|
@@ -19,9 +19,10 @@ class Dialog extends configurable_1.Configurable {
|
|
|
19
19
|
/**
|
|
20
20
|
* Unique ID of the dialog.
|
|
21
21
|
*
|
|
22
|
+
* @returns The Id for the dialog.
|
|
23
|
+
*
|
|
22
24
|
* @remarks
|
|
23
25
|
* This will be automatically generated if not specified.
|
|
24
|
-
* @returns The Id for the dialog.
|
|
25
26
|
*/
|
|
26
27
|
get id() {
|
|
27
28
|
if (this._id === undefined) {
|
|
@@ -38,6 +39,8 @@ class Dialog extends configurable_1.Configurable {
|
|
|
38
39
|
/**
|
|
39
40
|
* An encoded string used to aid in the detection of agent changes on re-deployment.
|
|
40
41
|
*
|
|
42
|
+
* @returns Unique string which should only change when dialog has changed in a way that should restart the dialog.
|
|
43
|
+
*
|
|
41
44
|
* @remarks
|
|
42
45
|
* This defaults to returning the dialog's `id` but can be overridden to provide more
|
|
43
46
|
* precise change detection logic. Any dialog on the stack that has its version change will
|
|
@@ -45,7 +48,7 @@ class Dialog extends configurable_1.Configurable {
|
|
|
45
48
|
* an error will be thrown resulting in the agent error handler logic being run.
|
|
46
49
|
*
|
|
47
50
|
* Returning an empty string will disable version tracking for the component all together.
|
|
48
|
-
*
|
|
51
|
+
*
|
|
49
52
|
*/
|
|
50
53
|
getVersion() {
|
|
51
54
|
return this.id;
|
|
@@ -54,6 +57,7 @@ class Dialog extends configurable_1.Configurable {
|
|
|
54
57
|
* When overridden in a derived class, continues the dialog.
|
|
55
58
|
*
|
|
56
59
|
* @param dc The context for the current dialog turn.
|
|
60
|
+
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
57
61
|
*
|
|
58
62
|
* @remarks
|
|
59
63
|
* Derived dialogs that support multiple-turn conversations should override this method.
|
|
@@ -65,7 +69,6 @@ class Dialog extends configurable_1.Configurable {
|
|
|
65
69
|
* To signal to the dialog context that this dialog has completed, await
|
|
66
70
|
* {@link DialogContext.endDialog} before exiting this method.
|
|
67
71
|
*
|
|
68
|
-
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
69
72
|
*/
|
|
70
73
|
async continueDialog(dc) {
|
|
71
74
|
// By default just end the current dialog.
|
|
@@ -77,6 +80,7 @@ class Dialog extends configurable_1.Configurable {
|
|
|
77
80
|
* @param dc The context for the current dialog turn.
|
|
78
81
|
* @param reason The reason the dialog is resuming. This will typically be DialogReason.endCalled
|
|
79
82
|
* @param result Optional. The return value, if any, from the dialog that ended.
|
|
83
|
+
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
80
84
|
*
|
|
81
85
|
* @remarks
|
|
82
86
|
* Derived dialogs that support multiple-turn conversations should override this method.
|
|
@@ -90,7 +94,6 @@ class Dialog extends configurable_1.Configurable {
|
|
|
90
94
|
* necessarily be the one that started the child dialog.
|
|
91
95
|
* To signal to the dialog context that this dialog has completed, await {@link DialogContext.endDialog} before exiting this method.
|
|
92
96
|
*
|
|
93
|
-
* @returns {Promise<DialogTurnResult>} A promise resolving to the dialog turn result.
|
|
94
97
|
*/
|
|
95
98
|
async resumeDialog(dc, reason, result) {
|
|
96
99
|
// By default just end the current dialog and return result to parent.
|
|
@@ -155,13 +158,14 @@ class Dialog extends configurable_1.Configurable {
|
|
|
155
158
|
/**
|
|
156
159
|
* Called before an event is bubbled to its parent.
|
|
157
160
|
*
|
|
161
|
+
* @param _dc The dialog context for the current turn of conversation.
|
|
162
|
+
* @param _e The event being raised.
|
|
163
|
+
* @returns Whether the event is handled by the current dialog and further processing should stop.
|
|
164
|
+
*
|
|
158
165
|
* @remarks
|
|
159
166
|
* This is a good place to perform interception of an event as returning `true` will prevent
|
|
160
167
|
* any further bubbling of the event to the dialogs parents and will also prevent any child
|
|
161
168
|
* dialogs from performing their default processing.
|
|
162
|
-
* @param _dc The dialog context for the current turn of conversation.
|
|
163
|
-
* @param _e The event being raised.
|
|
164
|
-
* @returns Whether the event is handled by the current dialog and further processing should stop.
|
|
165
169
|
*/
|
|
166
170
|
async onPreBubbleEvent(_dc, _e) {
|
|
167
171
|
return false;
|
|
@@ -169,12 +173,13 @@ class Dialog extends configurable_1.Configurable {
|
|
|
169
173
|
/**
|
|
170
174
|
* Called after an event was bubbled to all parents and wasn't handled.
|
|
171
175
|
*
|
|
172
|
-
* @remarks
|
|
173
|
-
* This is a good place to perform default processing logic for an event. Returning `true` will
|
|
174
|
-
* prevent any processing of the event by child dialogs.
|
|
175
176
|
* @param _dc The dialog context for the current turn of conversation.
|
|
176
177
|
* @param _e The event being raised.
|
|
177
178
|
* @returns Whether the event is handled by the current dialog and further processing should stop.
|
|
179
|
+
*
|
|
180
|
+
* @remarks
|
|
181
|
+
* This is a good place to perform default processing logic for an event. Returning `true` will
|
|
182
|
+
* prevent any processing of the event by child dialogs.
|
|
178
183
|
*/
|
|
179
184
|
async onPostBubbleEvent(_dc, _e) {
|
|
180
185
|
return false;
|
package/dist/src/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/dialog.ts"],"names":[],"mappings":";;;AAMA,iDAA6C;AAK7C,yDAAqD;AAErD;;GAEG;AACH,MAAsB,MAA8B,SAAQ,2BAAY;IA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C,SAAS,CAAE,QAAqB,EAAE,SAAyB,EAAE,OAAqB;QACtF,mBAAmB;IACrB,CAAC;IAED;;;;;;;SAOK;IACL,KAAK,CAAC,aAAa,CAAE,aAA4B,EAAE,KAAkB;QACnE,gBAAgB;QAChB,IAAI,OAAO,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;QAE/D,mBAAmB;QACnB,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACnE,OAAO,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;QACtF,CAAC;QAED,cAAc;QACd,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;QAC9D,CAAC;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;IAED;;;;;;;;;;;SAWK;IACK,KAAK,CAAC,gBAAgB,CAAE,GAAkB,EAAE,EAAe;QACnE,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;;;;;;;SAUK;IACK,KAAK,CAAC,iBAAiB,CAAE,GAAkB,EAAE,EAAe;QACpE,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;;;SAMK;IACK,WAAW;QACnB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;IAC3D,CAAC;;AAvOH,wBAwOC;AArOC;;;;;;KAMK;AACE,gBAAS,GAAqB,EAAE,MAAM,EAAE,mCAAgB,CAAC,OAAO,EAAE,CAAA"}
|
|
@@ -40,22 +40,25 @@ export declare abstract class DialogContainer<O extends object = {}> extends Dia
|
|
|
40
40
|
/**
|
|
41
41
|
* Returns internal version identifier for this container.
|
|
42
42
|
*
|
|
43
|
+
* @returns Version which represents the change of the internals of this container.
|
|
44
|
+
*
|
|
43
45
|
* @remarks
|
|
44
46
|
* DialogContainers detect changes of all sub-components in the container and map that to a `versionChanged` event.
|
|
45
47
|
* Because they do this, DialogContainers "hide" the internal changes and just have the .id. This isolates changes
|
|
46
48
|
* to the container level unless a container doesn't handle it. To support this DialogContainers define a
|
|
47
49
|
* protected method getInternalVersion() which computes if this dialog or child dialogs have changed
|
|
48
50
|
* which is then examined via calls to checkForVersionChange().
|
|
49
|
-
* @returns Version which represents the change of the internals of this container.
|
|
50
51
|
*/
|
|
51
52
|
protected getInternalVersion(): string;
|
|
52
53
|
/**
|
|
53
54
|
* Checks to see if a containers child dialogs have changed since the current dialog instance
|
|
54
55
|
* was started.
|
|
55
56
|
*
|
|
57
|
+
* @param dialogContext Current dialog context.
|
|
58
|
+
*
|
|
56
59
|
* @remarks
|
|
57
60
|
* This should be called at the start of `beginDialog()`, `continueDialog()`, and `resumeDialog()`.
|
|
58
|
-
*
|
|
61
|
+
*
|
|
59
62
|
*/
|
|
60
63
|
protected checkForVersionChange(dialogContext: DialogContext): Promise<void>;
|
|
61
64
|
}
|
|
@@ -47,13 +47,14 @@ class DialogContainer extends dialog_1.Dialog {
|
|
|
47
47
|
/**
|
|
48
48
|
* Returns internal version identifier for this container.
|
|
49
49
|
*
|
|
50
|
+
* @returns Version which represents the change of the internals of this container.
|
|
51
|
+
*
|
|
50
52
|
* @remarks
|
|
51
53
|
* DialogContainers detect changes of all sub-components in the container and map that to a `versionChanged` event.
|
|
52
54
|
* Because they do this, DialogContainers "hide" the internal changes and just have the .id. This isolates changes
|
|
53
55
|
* to the container level unless a container doesn't handle it. To support this DialogContainers define a
|
|
54
56
|
* protected method getInternalVersion() which computes if this dialog or child dialogs have changed
|
|
55
57
|
* which is then examined via calls to checkForVersionChange().
|
|
56
|
-
* @returns Version which represents the change of the internals of this container.
|
|
57
58
|
*/
|
|
58
59
|
getInternalVersion() {
|
|
59
60
|
return this.dialogs.getVersion();
|
|
@@ -62,9 +63,11 @@ class DialogContainer extends dialog_1.Dialog {
|
|
|
62
63
|
* Checks to see if a containers child dialogs have changed since the current dialog instance
|
|
63
64
|
* was started.
|
|
64
65
|
*
|
|
66
|
+
* @param dialogContext Current dialog context.
|
|
67
|
+
*
|
|
65
68
|
* @remarks
|
|
66
69
|
* This should be called at the start of `beginDialog()`, `continueDialog()`, and `resumeDialog()`.
|
|
67
|
-
*
|
|
70
|
+
*
|
|
68
71
|
*/
|
|
69
72
|
async checkForVersionChange(dialogContext) {
|
|
70
73
|
const current = dialogContext.activeDialog.version;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogContainer.js","sourceRoot":"","sources":["../../src/dialogContainer.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,qCAAiC;AACjC,2CAAuC;AAEvC,iDAA6C;AAG7C;;GAEG;AACH,MAAsB,eAAuC,SAAQ,eAAS;IAA9E;;QACE;;aAEK;QACI,YAAO,GAAG,IAAI,qBAAS,CAAC,SAAS,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"dialogContainer.js","sourceRoot":"","sources":["../../src/dialogContainer.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,qCAAiC;AACjC,2CAAuC;AAEvC,iDAA6C;AAG7C;;GAEG;AACH,MAAsB,eAAuC,SAAQ,eAAS;IAA9E;;QACE;;aAEK;QACI,YAAO,GAAG,IAAI,qBAAS,CAAC,SAAS,CAAC,CAAA;IA2E7C,CAAC;IAjEC;;;;;SAKK;IACL,UAAU,CAAE,QAAgB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACpC,CAAC;IAED;;;;;;;SAOK;IACL,KAAK,CAAC,aAAa,CAAE,aAA4B,EAAE,KAAkB;QACnE,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;QAC/D,IAAI,CAAC,OAAO,IAAI,KAAK,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