@microsoft/agents-hosting-dialogs 0.2.10-g3ac88ff25e → 0.3.5
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/agentComponent.d.ts +18 -4
- package/dist/src/agentComponent.js +12 -4
- package/dist/src/agentComponent.js.map +1 -1
- package/dist/src/agentStateSet.d.ts +2 -2
- package/dist/src/agentStateSet.js +2 -2
- package/dist/src/choices/choice.d.ts +9 -0
- package/dist/src/choices/findChoices.d.ts +12 -0
- package/dist/src/choices/findChoices.js.map +1 -1
- package/dist/src/choices/findValues.d.ts +27 -0
- package/dist/src/choices/findValues.js.map +1 -1
- package/dist/src/choices/modelResult.d.ts +20 -0
- package/dist/src/choices/modelResult.js +4 -0
- package/dist/src/choices/modelResult.js.map +1 -1
- package/dist/src/choices/tokenizer.d.ts +15 -0
- package/dist/src/choices/tokenizer.js +4 -0
- package/dist/src/choices/tokenizer.js.map +1 -1
- package/dist/src/configurable.d.ts +1 -0
- package/dist/src/configurable.js +1 -0
- package/dist/src/configurable.js.map +1 -1
- package/dist/src/converter.d.ts +10 -1
- package/dist/src/dialog.d.ts +14 -13
- package/dist/src/dialog.js +11 -10
- package/dist/src/dialog.js.map +1 -1
- package/dist/src/dialogContext.d.ts +31 -32
- package/dist/src/dialogContext.js +22 -23
- package/dist/src/dialogContext.js.map +1 -1
- package/dist/src/dialogEvent.d.ts +3 -0
- package/dist/src/dialogEvents.d.ts +20 -0
- package/dist/src/dialogEvents.js +20 -0
- package/dist/src/dialogEvents.js.map +1 -1
- package/dist/src/dialogHelper.js +14 -0
- package/dist/src/dialogHelper.js.map +1 -1
- package/dist/src/dialogManager.d.ts +0 -1
- package/dist/src/dialogManager.js +0 -1
- package/dist/src/dialogManager.js.map +1 -1
- package/dist/src/dialogSet.d.ts +4 -8
- package/dist/src/dialogSet.js +4 -8
- package/dist/src/dialogSet.js.map +1 -1
- package/dist/src/dialogTurnStateConstants.d.ts +13 -1
- package/dist/src/dialogTurnStateConstants.js +13 -1
- package/dist/src/dialogTurnStateConstants.js.map +1 -1
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/intentScore.d.ts +6 -0
- package/dist/src/memory/dialogPath.d.ts +40 -8
- package/dist/src/memory/dialogPath.js +32 -8
- package/dist/src/memory/dialogPath.js.map +1 -1
- package/dist/src/memory/dialogStateManager.d.ts +2 -2
- package/dist/src/memory/dialogStateManager.js +2 -2
- package/dist/src/memory/pathResolvers/aliasPathResolver.d.ts +4 -0
- package/dist/src/memory/pathResolvers/aliasPathResolver.js +4 -0
- package/dist/src/memory/pathResolvers/aliasPathResolver.js.map +1 -1
- package/dist/src/memory/pathResolvers/atAtPathResolver.d.ts +6 -2
- package/dist/src/memory/pathResolvers/atAtPathResolver.js +6 -2
- package/dist/src/memory/pathResolvers/atAtPathResolver.js.map +1 -1
- package/dist/src/memory/pathResolvers/atPathResolver.d.ts +13 -7
- package/dist/src/memory/pathResolvers/atPathResolver.js +13 -7
- package/dist/src/memory/pathResolvers/atPathResolver.js.map +1 -1
- package/dist/src/memory/pathResolvers/dollarPathResolver.d.ts +7 -2
- package/dist/src/memory/pathResolvers/dollarPathResolver.js +7 -2
- package/dist/src/memory/pathResolvers/dollarPathResolver.js.map +1 -1
- package/dist/src/memory/pathResolvers/hashPathResolver.d.ts +7 -2
- package/dist/src/memory/pathResolvers/hashPathResolver.js +7 -2
- package/dist/src/memory/pathResolvers/hashPathResolver.js.map +1 -1
- package/dist/src/memory/pathResolvers/pathResolver.d.ts +10 -5
- package/dist/src/memory/pathResolvers/percentPathResolver.d.ts +7 -2
- package/dist/src/memory/pathResolvers/percentPathResolver.js +7 -2
- package/dist/src/memory/pathResolvers/percentPathResolver.js.map +1 -1
- package/dist/src/memory/scopePath.d.ts +27 -0
- package/dist/src/memory/scopePath.js +27 -0
- package/dist/src/memory/scopePath.js.map +1 -1
- package/dist/src/memory/scopes/classMemoryScope.d.ts +18 -14
- package/dist/src/memory/scopes/classMemoryScope.js +18 -14
- package/dist/src/memory/scopes/classMemoryScope.js.map +1 -1
- package/dist/src/memory/scopes/dialogClassMemoryScope.d.ts +12 -6
- package/dist/src/memory/scopes/dialogClassMemoryScope.js +12 -6
- package/dist/src/memory/scopes/dialogClassMemoryScope.js.map +1 -1
- package/dist/src/memory/scopes/dialogContextMemoryScope.d.ts +11 -7
- package/dist/src/memory/scopes/dialogContextMemoryScope.js +11 -7
- package/dist/src/memory/scopes/dialogContextMemoryScope.js.map +1 -1
- package/dist/src/memory/scopes/dialogMemoryScope.d.ts +23 -16
- package/dist/src/memory/scopes/dialogMemoryScope.js +23 -16
- package/dist/src/memory/scopes/dialogMemoryScope.js.map +1 -1
- package/dist/src/memory/scopes/turnMemoryScope.d.ts +14 -13
- package/dist/src/memory/scopes/turnMemoryScope.js +14 -13
- package/dist/src/memory/scopes/turnMemoryScope.js.map +1 -1
- package/dist/src/memory/turnPath.d.ts +61 -13
- package/dist/src/memory/turnPath.js +49 -13
- package/dist/src/memory/turnPath.js.map +1 -1
- package/dist/src/prompts/attachmentPrompt.d.ts +1 -1
- package/dist/src/prompts/attachmentPrompt.js +1 -1
- package/dist/src/prompts/choicePrompt.d.ts +18 -5
- package/dist/src/prompts/choicePrompt.js +1 -1
- package/dist/src/prompts/choicePrompt.js.map +1 -1
- package/dist/src/prompts/confirmPrompt.d.ts +7 -8
- package/dist/src/prompts/confirmPrompt.js +3 -3
- package/dist/src/prompts/datetimePrompt.d.ts +6 -6
- package/dist/src/prompts/datetimePrompt.js +3 -3
- package/dist/src/prompts/numberPrompt.d.ts +6 -6
- package/dist/src/prompts/numberPrompt.js +6 -6
- package/dist/src/prompts/prompt.d.ts +7 -7
- package/dist/src/prompts/prompt.js +2 -2
- package/dist/src/prompts/promptCultureModels.d.ts +38 -3
- package/dist/src/prompts/promptCultureModels.js +38 -3
- package/dist/src/prompts/promptCultureModels.js.map +1 -1
- package/dist/src/recognizer.d.ts +8 -1
- package/dist/src/recognizer.js +5 -1
- package/dist/src/recognizer.js.map +1 -1
- package/dist/src/recognizerResult.d.ts +15 -0
- package/dist/src/recognizerResult.js.map +1 -1
- package/dist/src/serviceCollection.d.ts +22 -23
- package/dist/src/serviceCollection.js +11 -11
- package/dist/src/serviceCollection.js.map +1 -1
- package/dist/src/waterfallDialog.d.ts +5 -5
- package/dist/src/waterfallDialog.js +5 -5
- package/dist/src/waterfallStepContext.d.ts +21 -0
- package/dist/src/waterfallStepContext.js.map +1 -1
- package/package.json +2 -2
- package/src/agentComponent.ts +18 -4
- package/src/agentStateSet.ts +2 -2
- package/src/choices/choice.ts +11 -0
- package/src/choices/findChoices.ts +15 -0
- package/src/choices/findValues.ts +33 -0
- package/src/choices/modelResult.ts +25 -0
- package/src/choices/tokenizer.ts +19 -0
- package/src/configurable.ts +1 -0
- package/src/converter.ts +10 -1
- package/src/dialog.ts +14 -13
- package/src/dialogContext.ts +37 -38
- package/src/dialogEvent.ts +3 -0
- package/src/dialogEvents.ts +25 -0
- package/src/dialogHelper.ts +14 -1
- package/src/dialogManager.ts +0 -1
- package/src/dialogSet.ts +4 -8
- package/src/dialogTurnStateConstants.ts +15 -1
- package/src/index.ts +5 -0
- package/src/intentScore.ts +9 -2
- package/src/memory/dialogPath.ts +47 -23
- package/src/memory/dialogStateManager.ts +2 -2
- package/src/memory/pathResolvers/aliasPathResolver.ts +4 -0
- package/src/memory/pathResolvers/atAtPathResolver.ts +6 -2
- package/src/memory/pathResolvers/atPathResolver.ts +13 -7
- package/src/memory/pathResolvers/dollarPathResolver.ts +7 -2
- package/src/memory/pathResolvers/hashPathResolver.ts +7 -2
- package/src/memory/pathResolvers/pathResolver.ts +10 -5
- package/src/memory/pathResolvers/percentPathResolver.ts +7 -2
- package/src/memory/scopePath.ts +35 -0
- package/src/memory/scopes/classMemoryScope.ts +18 -14
- package/src/memory/scopes/dialogClassMemoryScope.ts +12 -6
- package/src/memory/scopes/dialogContextMemoryScope.ts +11 -7
- package/src/memory/scopes/dialogMemoryScope.ts +23 -16
- package/src/memory/scopes/turnMemoryScope.ts +14 -13
- package/src/memory/turnPath.ts +61 -25
- package/src/prompts/attachmentPrompt.ts +1 -1
- package/src/prompts/choicePrompt.ts +19 -4
- package/src/prompts/confirmPrompt.ts +7 -7
- package/src/prompts/datetimePrompt.ts +6 -6
- package/src/prompts/numberPrompt.ts +6 -6
- package/src/prompts/prompt.ts +7 -7
- package/src/prompts/promptCultureModels.ts +38 -3
- package/src/recognizer.ts +8 -1
- package/src/recognizerResult.ts +24 -5
- package/src/serviceCollection.ts +22 -23
- package/src/waterfallDialog.ts +5 -5
- package/src/waterfallStepContext.ts +32 -6
- package/dist/index.js +0 -20
|
@@ -6,33 +6,69 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.TurnPath = void 0;
|
|
8
8
|
/**
|
|
9
|
-
* Defines path for
|
|
9
|
+
* Defines path for available turns.
|
|
10
10
|
*/
|
|
11
11
|
class TurnPath {
|
|
12
12
|
}
|
|
13
13
|
exports.TurnPath = TurnPath;
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The result from the last dialog that was called.
|
|
16
|
+
* @constant A string key representing the last result path (`'turn.lastresult'`).
|
|
17
|
+
*/
|
|
15
18
|
TurnPath.lastResult = 'turn.lastresult';
|
|
16
|
-
|
|
19
|
+
/**
|
|
20
|
+
* The current activity for the turn.
|
|
21
|
+
* @constant A string key representing the activity path (`'turn.activity'`).
|
|
22
|
+
*/
|
|
17
23
|
TurnPath.activity = 'turn.activity';
|
|
18
|
-
|
|
24
|
+
/**
|
|
25
|
+
* The recognized result for the current turn.
|
|
26
|
+
* @constant A string key representing the recognized result path (`'turn.recognized'`).
|
|
27
|
+
*/
|
|
19
28
|
TurnPath.recognized = 'turn.recognized';
|
|
20
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Path to the top intent.
|
|
31
|
+
* @constant A string key representing the top intent path (`'turn.recognized.intent'`).
|
|
32
|
+
*/
|
|
21
33
|
TurnPath.topIntent = 'turn.recognized.intent';
|
|
22
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Path to the top score.
|
|
36
|
+
* @constant A string key representing the top score path (`'turn.recognized.score'`).
|
|
37
|
+
*/
|
|
23
38
|
TurnPath.topScore = 'turn.recognized.score';
|
|
24
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Original text.
|
|
41
|
+
* @constant A string key representing the original text path (`'turn.recognized.text'`).
|
|
42
|
+
*/
|
|
25
43
|
TurnPath.text = 'turn.recognized.text';
|
|
26
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Original utterance split into unrecognized strings.
|
|
46
|
+
* @constant A string key representing the unrecognized text path (`'turn.unrecognizedText'`).
|
|
47
|
+
*/
|
|
27
48
|
TurnPath.unrecognizedText = 'turn.unrecognizedText';
|
|
28
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Entities that were recognized from text.
|
|
51
|
+
* @constant A string key representing the recognized entities path (`'turn.recognizedEntities'`).
|
|
52
|
+
*/
|
|
29
53
|
TurnPath.recognizedEntities = 'turn.recognizedEntities';
|
|
30
|
-
|
|
54
|
+
/**
|
|
55
|
+
* If true, an interruption has occurred.
|
|
56
|
+
* @constant A string key representing the interrupted path (`'turn.interrupted'`).
|
|
57
|
+
*/
|
|
31
58
|
TurnPath.interrupted = 'turn.interrupted';
|
|
32
|
-
|
|
59
|
+
/**
|
|
60
|
+
* The current dialog event (set during event processing).
|
|
61
|
+
* @constant A string key representing the dialog event path (`'turn.dialogEvent'`).
|
|
62
|
+
*/
|
|
33
63
|
TurnPath.dialogEvent = 'turn.dialogEvent';
|
|
34
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Used to track that we don't end up in an infinite loop of RepeatDialogs().
|
|
66
|
+
* @constant A string key representing the repeated IDs path (`'turn.repeatedIds'`).
|
|
67
|
+
*/
|
|
35
68
|
TurnPath.repeatedIds = 'turn.repeatedIds';
|
|
36
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Indicates whether the turncontext.activity has been consumed by some component in the system.
|
|
71
|
+
* @constant A string key representing the activity processed path (`'turn.activityProcessed'`).
|
|
72
|
+
*/
|
|
37
73
|
TurnPath.activityProcessed = 'turn.activityProcessed';
|
|
38
74
|
//# sourceMappingURL=turnPath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turnPath.js","sourceRoot":"","sources":["../../../src/memory/turnPath.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,MAAa,QAAQ;;AAArB,
|
|
1
|
+
{"version":3,"file":"turnPath.js","sourceRoot":"","sources":["../../../src/memory/turnPath.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,MAAa,QAAQ;;AAArB,4BAwEC;AAvEC;;;GAGG;AACa,mBAAU,GAAW,iBAAiB,CAAA;AAEtD;;;GAGG;AACa,iBAAQ,GAAW,eAAe,CAAA;AAElD;;;GAGG;AACa,mBAAU,GAAW,iBAAiB,CAAA;AAEtD;;;GAGG;AACa,kBAAS,GAAW,wBAAwB,CAAA;AAE5D;;;GAGG;AACa,iBAAQ,GAAW,uBAAuB,CAAA;AAE1D;;;GAGG;AACa,aAAI,GAAW,sBAAsB,CAAA;AAErD;;;GAGG;AACa,yBAAgB,GAAW,uBAAuB,CAAA;AAElE;;;GAGG;AACa,2BAAkB,GAAW,yBAAyB,CAAA;AAEtE;;;GAGG;AACa,oBAAW,GAAW,kBAAkB,CAAA;AAExD;;;GAGG;AACa,oBAAW,GAAW,kBAAkB,CAAA;AAExD;;;GAGG;AACa,oBAAW,GAAW,kBAAkB,CAAA;AAExD;;;GAGG;AACa,0BAAiB,GAAW,wBAAwB,CAAA"}
|
|
@@ -9,7 +9,7 @@ import { Attachment } from '@microsoft/agents-activity';
|
|
|
9
9
|
* Prompts a user to upload attachments like images.
|
|
10
10
|
*
|
|
11
11
|
* @remarks
|
|
12
|
-
* By default the prompt will return to the calling dialog an
|
|
12
|
+
* By default the prompt will return to the calling dialog an {@link Attachment[]}.
|
|
13
13
|
*/
|
|
14
14
|
export declare class AttachmentPrompt extends Prompt<Attachment[]> {
|
|
15
15
|
constructor(dialogId: string, validator?: PromptValidator<Attachment[]>);
|
|
@@ -7,7 +7,7 @@ const agents_activity_1 = require("@microsoft/agents-activity");
|
|
|
7
7
|
* Prompts a user to upload attachments like images.
|
|
8
8
|
*
|
|
9
9
|
* @remarks
|
|
10
|
-
* By default the prompt will return to the calling dialog an
|
|
10
|
+
* By default the prompt will return to the calling dialog an {@link Attachment[]}.
|
|
11
11
|
*/
|
|
12
12
|
class AttachmentPrompt extends prompt_1.Prompt {
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
@@ -5,19 +5,33 @@
|
|
|
5
5
|
import { TurnContext } from '@microsoft/agents-hosting';
|
|
6
6
|
import { ChoiceFactoryOptions, FindChoicesOptions, FoundChoice } from '../choices';
|
|
7
7
|
import { ListStyle, Prompt, PromptOptions, PromptRecognizerResult, PromptValidator } from './prompt';
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Represents a dictionary of default choice options for different locales.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* This interface is used to define the default options for rendering choices in prompts,
|
|
13
|
+
* such as separators, inline options, and whether to include numbers.
|
|
14
|
+
*/
|
|
15
|
+
export interface ChoiceDefaultsChoicePrompt {
|
|
16
|
+
/**
|
|
17
|
+
* A mapping of locale strings to their corresponding choice factory options.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Each locale key maps to a `ChoiceFactoryOptions` object that defines the
|
|
21
|
+
* default behavior for rendering choices in that locale.
|
|
22
|
+
*/
|
|
9
23
|
[locale: string]: ChoiceFactoryOptions;
|
|
10
24
|
}
|
|
11
25
|
/**
|
|
12
26
|
* Prompts a user to select from a list of choices.
|
|
13
27
|
*
|
|
14
28
|
* @remarks
|
|
15
|
-
* By default the prompt will return to the calling dialog a
|
|
29
|
+
* By default the prompt will return to the calling dialog a {@link FoundChoice} object containing the
|
|
16
30
|
* choice that was selected.
|
|
17
31
|
*/
|
|
18
32
|
export declare class ChoicePrompt extends Prompt<FoundChoice> {
|
|
19
33
|
/**
|
|
20
|
-
* A dictionary of Default Choices based on
|
|
34
|
+
* A dictionary of Default Choices based on {@link PromptCultureModels.getSupportedCultures | PromptCultureModels.getSupportedCultures method}.
|
|
21
35
|
* Can be replaced by user using the constructor that contains choiceDefaults.
|
|
22
36
|
*/
|
|
23
37
|
private choiceDefaults;
|
|
@@ -38,7 +52,7 @@ export declare class ChoicePrompt extends Prompt<FoundChoice> {
|
|
|
38
52
|
*/
|
|
39
53
|
choiceOptions: ChoiceFactoryOptions | undefined;
|
|
40
54
|
/**
|
|
41
|
-
* Additional options passed to the underlying
|
|
55
|
+
* Additional options passed to the underlying {@link recognizeChoices | recognizeChoices function }.
|
|
42
56
|
*/
|
|
43
57
|
recognizerOptions: FindChoicesOptions | undefined;
|
|
44
58
|
/**
|
|
@@ -80,4 +94,3 @@ export declare class ChoicePrompt extends Prompt<FoundChoice> {
|
|
|
80
94
|
*/
|
|
81
95
|
private determineCulture;
|
|
82
96
|
}
|
|
83
|
-
export {};
|
|
@@ -8,7 +8,7 @@ const promptCultureModels_1 = require("./promptCultureModels");
|
|
|
8
8
|
* Prompts a user to select from a list of choices.
|
|
9
9
|
*
|
|
10
10
|
* @remarks
|
|
11
|
-
* By default the prompt will return to the calling dialog a
|
|
11
|
+
* By default the prompt will return to the calling dialog a {@link FoundChoice} object containing the
|
|
12
12
|
* choice that was selected.
|
|
13
13
|
*/
|
|
14
14
|
class ChoicePrompt extends prompt_1.Prompt {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"choicePrompt.js","sourceRoot":"","sources":["../../../src/prompts/choicePrompt.ts"],"names":[],"mappings":";;;AAKA,wCAAmH;AACnH,qCAAoG;AACpG,+DAA2D;
|
|
1
|
+
{"version":3,"file":"choicePrompt.js","sourceR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
3
|
import { ListStyle, Prompt, PromptOptions, PromptRecognizerResult, PromptValidator } from './prompt';
|
|
4
|
-
interface ChoiceDefaultsConfirmPrompt {
|
|
4
|
+
export interface ChoiceDefaultsConfirmPrompt {
|
|
5
5
|
[locale: string]: {
|
|
6
6
|
choices: (string | Choice)[];
|
|
7
7
|
options: ChoiceFactoryOptions;
|
|
@@ -16,7 +16,7 @@ interface ChoiceDefaultsConfirmPrompt {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare class ConfirmPrompt extends Prompt<boolean> {
|
|
18
18
|
/**
|
|
19
|
-
* A dictionary of Default Choices based on
|
|
19
|
+
* A dictionary of Default Choices based on {@link PromptCultureModels.getSupportedCultures | PromptCultureModels.getSupportedCultures} method.
|
|
20
20
|
* Can be replaced by user using the constructor that contains choiceDefaults.
|
|
21
21
|
* This is initially set in the constructor.
|
|
22
22
|
*/
|
|
@@ -29,11 +29,11 @@ export declare class ConfirmPrompt extends Prompt<boolean> {
|
|
|
29
29
|
* Style of the "yes" and "no" choices rendered to the user when prompting.
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Defaults to
|
|
32
|
+
* Defaults to {@link ListStyle.auto}.
|
|
33
33
|
*/
|
|
34
34
|
style: ListStyle;
|
|
35
35
|
/**
|
|
36
|
-
* Additional options passed to the
|
|
36
|
+
* Additional options passed to the {@link ChoiceFactory } and used to tweak the style of choices
|
|
37
37
|
* rendered to the user.
|
|
38
38
|
*/
|
|
39
39
|
choiceOptions: ChoiceFactoryOptions | undefined;
|
|
@@ -44,10 +44,10 @@ export declare class ConfirmPrompt extends Prompt<boolean> {
|
|
|
44
44
|
/**
|
|
45
45
|
* Creates a new ConfirmPrompt instance.
|
|
46
46
|
*
|
|
47
|
-
* @param dialogId Unique ID of the dialog within its parent
|
|
47
|
+
* @param dialogId Unique ID of the dialog within its parent {@link DialogSet} or {@link ComponentDialog}.
|
|
48
48
|
* @param validator (Optional) validator that will be called each time the user responds to the prompt.
|
|
49
|
-
* @param defaultLocale (Optional) locale to use if
|
|
50
|
-
* @param choiceDefaults (Optional) Overrides the dictionary of Default Choices on
|
|
49
|
+
* @param defaultLocale (Optional) locale to use if {@link TurnContext.activity.locale} is not specified. Defaults to a value of `en-us`.
|
|
50
|
+
* @param choiceDefaults (Optional) Overrides the dictionary of Default Choices on {@link PromptCultureModels.getSupportedCultures | PromptCultureModels.getSupportedCultures} method.
|
|
51
51
|
*/
|
|
52
52
|
constructor(dialogId: string, validator?: PromptValidator<boolean>, defaultLocale?: string, choiceDefaults?: ChoiceDefaultsConfirmPrompt);
|
|
53
53
|
/**
|
|
@@ -79,4 +79,3 @@ export declare class ConfirmPrompt extends Prompt<boolean> {
|
|
|
79
79
|
*/
|
|
80
80
|
private determineCulture;
|
|
81
81
|
}
|
|
82
|
-
export {};
|
|
@@ -53,10 +53,10 @@ class ConfirmPrompt extends prompt_1.Prompt {
|
|
|
53
53
|
/**
|
|
54
54
|
* Creates a new ConfirmPrompt instance.
|
|
55
55
|
*
|
|
56
|
-
* @param dialogId Unique ID of the dialog within its parent
|
|
56
|
+
* @param dialogId Unique ID of the dialog within its parent {@link DialogSet} or {@link ComponentDialog}.
|
|
57
57
|
* @param validator (Optional) validator that will be called each time the user responds to the prompt.
|
|
58
|
-
* @param defaultLocale (Optional) locale to use if
|
|
59
|
-
* @param choiceDefaults (Optional) Overrides the dictionary of Default Choices on
|
|
58
|
+
* @param defaultLocale (Optional) locale to use if {@link TurnContext.activity.locale} is not specified. Defaults to a value of `en-us`.
|
|
59
|
+
* @param choiceDefaults (Optional) Overrides the dictionary of Default Choices on {@link PromptCultureModels.getSupportedCultures | PromptCultureModels.getSupportedCultures} method.
|
|
60
60
|
*/
|
|
61
61
|
constructor(dialogId, validator, defaultLocale, choiceDefaults) {
|
|
62
62
|
super(dialogId, validator);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TurnContext } from '@microsoft/agents-hosting';
|
|
2
2
|
import { Prompt, PromptOptions, PromptRecognizerResult, PromptValidator } from './prompt';
|
|
3
3
|
/**
|
|
4
|
-
* Result returned by the
|
|
4
|
+
* Result returned by the {@link DateTimePrompt}.
|
|
5
5
|
*/
|
|
6
6
|
export interface DateTimeResolution {
|
|
7
7
|
/**
|
|
@@ -14,8 +14,8 @@ export interface DateTimeResolution {
|
|
|
14
14
|
*/
|
|
15
15
|
type: string;
|
|
16
16
|
/**
|
|
17
|
-
* Value of the specified
|
|
18
|
-
* of the
|
|
17
|
+
* Value of the specified `type` that's a reasonable approximation given the ambiguity
|
|
18
|
+
* of the `timex`.
|
|
19
19
|
*/
|
|
20
20
|
value: string;
|
|
21
21
|
}
|
|
@@ -23,7 +23,7 @@ export interface DateTimeResolution {
|
|
|
23
23
|
* Prompts a user to enter a datetime expression.
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
|
-
* By default the prompt will return to the calling dialog a
|
|
26
|
+
* By default the prompt will return to the calling dialog a {@link DateTimeResolution | DateTimeResolution[] }.
|
|
27
27
|
*/
|
|
28
28
|
export declare class DateTimePrompt extends Prompt<DateTimeResolution[]> {
|
|
29
29
|
/**
|
|
@@ -33,9 +33,9 @@ export declare class DateTimePrompt extends Prompt<DateTimeResolution[]> {
|
|
|
33
33
|
/**
|
|
34
34
|
* Creates a new DateTimePrompt instance.
|
|
35
35
|
*
|
|
36
|
-
* @param dialogId Unique ID of the dialog within its parent
|
|
36
|
+
* @param dialogId Unique ID of the dialog within its parent {@link DialogSet} or {@link ComponentDialog}.
|
|
37
37
|
* @param validator (Optional) validator that will be called each time the user responds to the prompt.
|
|
38
|
-
* @param defaultLocale (Optional) locale to use if
|
|
38
|
+
* @param defaultLocale (Optional) locale to use if {@link TurnContext.activity.locale} is not specified. Defaults to a value of `en-us`.
|
|
39
39
|
*/
|
|
40
40
|
constructor(dialogId: string, validator?: PromptValidator<DateTimeResolution[]>, defaultLocale?: string);
|
|
41
41
|
/**
|
|
@@ -45,15 +45,15 @@ const agents_activity_1 = require("@microsoft/agents-activity");
|
|
|
45
45
|
* Prompts a user to enter a datetime expression.
|
|
46
46
|
*
|
|
47
47
|
* @remarks
|
|
48
|
-
* By default the prompt will return to the calling dialog a
|
|
48
|
+
* By default the prompt will return to the calling dialog a {@link DateTimeResolution | DateTimeResolution[] }.
|
|
49
49
|
*/
|
|
50
50
|
class DateTimePrompt extends prompt_1.Prompt {
|
|
51
51
|
/**
|
|
52
52
|
* Creates a new DateTimePrompt instance.
|
|
53
53
|
*
|
|
54
|
-
* @param dialogId Unique ID of the dialog within its parent
|
|
54
|
+
* @param dialogId Unique ID of the dialog within its parent {@link DialogSet} or {@link ComponentDialog}.
|
|
55
55
|
* @param validator (Optional) validator that will be called each time the user responds to the prompt.
|
|
56
|
-
* @param defaultLocale (Optional) locale to use if
|
|
56
|
+
* @param defaultLocale (Optional) locale to use if {@link TurnContext.activity.locale} is not specified. Defaults to a value of `en-us`.
|
|
57
57
|
*/
|
|
58
58
|
constructor(dialogId, validator, defaultLocale) {
|
|
59
59
|
super(dialogId, validator);
|
|
@@ -18,18 +18,18 @@ export declare class NumberPrompt extends Prompt<number> {
|
|
|
18
18
|
/**
|
|
19
19
|
* Creates a new NumberPrompt instance.
|
|
20
20
|
*
|
|
21
|
-
* @param dialogId Unique ID of the dialog within its parent
|
|
21
|
+
* @param dialogId Unique ID of the dialog within its parent {@link DialogSet} or {@link ComponentDialog}.
|
|
22
22
|
* @param validator (Optional) validator that will be called each time the user responds to the prompt.
|
|
23
|
-
* @param defaultLocale (Optional) locale to use if
|
|
23
|
+
* @param defaultLocale (Optional) locale to use if {@link TurnContext.activity.locale} is not specified. Defaults to a value of `en-us`.
|
|
24
24
|
*/
|
|
25
25
|
constructor(dialogId: string, validator?: PromptValidator<number>, defaultLocale?: string);
|
|
26
26
|
/**
|
|
27
27
|
* Prompts the user for input.
|
|
28
28
|
*
|
|
29
|
-
* @param context
|
|
29
|
+
* @param context {@link TurnContext} context for the current
|
|
30
30
|
* turn of conversation with the user.
|
|
31
31
|
* @param state Contains state for the current instance of the prompt on the dialog stack.
|
|
32
|
-
* @param options A
|
|
32
|
+
* @param options A {@link PromptOptions} object constructed
|
|
33
33
|
* from the options initially provided in the call to Prompt.
|
|
34
34
|
* @param isRetry `true` if this is the first time this prompt dialog instance
|
|
35
35
|
* on the stack is prompting the user for input; otherwise, false.
|
|
@@ -39,10 +39,10 @@ export declare class NumberPrompt extends Prompt<number> {
|
|
|
39
39
|
/**
|
|
40
40
|
* Attempts to recognize the user's input.
|
|
41
41
|
*
|
|
42
|
-
* @param context
|
|
42
|
+
* @param context {@link TurnContext}, context for the current
|
|
43
43
|
* turn of conversation with the user.
|
|
44
44
|
* @param _state Contains state for the current instance of the prompt on the dialog stack.
|
|
45
|
-
* @param _options A
|
|
45
|
+
* @param _options A {@link PromptOptions} object constructed
|
|
46
46
|
* from the options initially provided in the call to Prompt.
|
|
47
47
|
* @returns A `Promise` representing the asynchronous operation.
|
|
48
48
|
*/
|
|
@@ -58,9 +58,9 @@ class NumberPrompt extends prompt_1.Prompt {
|
|
|
58
58
|
/**
|
|
59
59
|
* Creates a new NumberPrompt instance.
|
|
60
60
|
*
|
|
61
|
-
* @param dialogId Unique ID of the dialog within its parent
|
|
61
|
+
* @param dialogId Unique ID of the dialog within its parent {@link DialogSet} or {@link ComponentDialog}.
|
|
62
62
|
* @param validator (Optional) validator that will be called each time the user responds to the prompt.
|
|
63
|
-
* @param defaultLocale (Optional) locale to use if
|
|
63
|
+
* @param defaultLocale (Optional) locale to use if {@link TurnContext.activity.locale} is not specified. Defaults to a value of `en-us`.
|
|
64
64
|
*/
|
|
65
65
|
constructor(dialogId, validator, defaultLocale) {
|
|
66
66
|
super(dialogId, validator);
|
|
@@ -69,10 +69,10 @@ class NumberPrompt extends prompt_1.Prompt {
|
|
|
69
69
|
/**
|
|
70
70
|
* Prompts the user for input.
|
|
71
71
|
*
|
|
72
|
-
* @param context
|
|
72
|
+
* @param context {@link TurnContext} context for the current
|
|
73
73
|
* turn of conversation with the user.
|
|
74
74
|
* @param state Contains state for the current instance of the prompt on the dialog stack.
|
|
75
|
-
* @param options A
|
|
75
|
+
* @param options A {@link PromptOptions} object constructed
|
|
76
76
|
* from the options initially provided in the call to Prompt.
|
|
77
77
|
* @param isRetry `true` if this is the first time this prompt dialog instance
|
|
78
78
|
* on the stack is prompting the user for input; otherwise, false.
|
|
@@ -89,10 +89,10 @@ class NumberPrompt extends prompt_1.Prompt {
|
|
|
89
89
|
/**
|
|
90
90
|
* Attempts to recognize the user's input.
|
|
91
91
|
*
|
|
92
|
-
* @param context
|
|
92
|
+
* @param context {@link TurnContext}, context for the current
|
|
93
93
|
* turn of conversation with the user.
|
|
94
94
|
* @param _state Contains state for the current instance of the prompt on the dialog stack.
|
|
95
|
-
* @param _options A
|
|
95
|
+
* @param _options A {@link PromptOptions} object constructed
|
|
96
96
|
* from the options initially provided in the call to Prompt.
|
|
97
97
|
* @returns A `Promise` representing the asynchronous operation.
|
|
98
98
|
*/
|
|
@@ -12,7 +12,7 @@ import { DialogReason } from '../dialogReason';
|
|
|
12
12
|
import { DialogEvent } from '../dialogEvent';
|
|
13
13
|
import { Activity } from '@microsoft/agents-activity';
|
|
14
14
|
/**
|
|
15
|
-
* Controls the way that choices for a
|
|
15
|
+
* Controls the way that choices for a {@link ChoicePrompt} or yes/no options for a {@link ConfirmPrompt} are
|
|
16
16
|
* presented to a user.
|
|
17
17
|
*/
|
|
18
18
|
export declare enum ListStyle {
|
|
@@ -78,12 +78,12 @@ export interface PromptOptions {
|
|
|
78
78
|
*/
|
|
79
79
|
export interface PromptRecognizerResult<T> {
|
|
80
80
|
/**
|
|
81
|
-
* If `true` the
|
|
81
|
+
* If `true` the user's utterance was successfully recognized and `value` contains the
|
|
82
82
|
* recognized result.
|
|
83
83
|
*/
|
|
84
84
|
succeeded: boolean;
|
|
85
85
|
/**
|
|
86
|
-
* Value that was recognized if
|
|
86
|
+
* Value that was recognized if `succeeded` is `true`.
|
|
87
87
|
*/
|
|
88
88
|
value?: T;
|
|
89
89
|
}
|
|
@@ -101,7 +101,7 @@ export interface PromptRecognizerResult<T> {
|
|
|
101
101
|
* > [!NOTE]
|
|
102
102
|
* > If the validator returns `false` the prompts default re-prompt logic will be run unless the
|
|
103
103
|
* > validator sends a custom re-prompt to the user using `prompt.context.sendActivity()`. In that
|
|
104
|
-
* > case the prompts default re-
|
|
104
|
+
* > case the prompts default re-prompt logic will not be run.
|
|
105
105
|
* @param T Type of recognizer result being validated.
|
|
106
106
|
* @param prompt Contextual information containing the recognizer result and original options passed to the prompt.
|
|
107
107
|
*/
|
|
@@ -123,8 +123,8 @@ export interface PromptValidatorContext<T> {
|
|
|
123
123
|
* Result returned from the prompts recognizer function.
|
|
124
124
|
*
|
|
125
125
|
* @remarks
|
|
126
|
-
* The
|
|
127
|
-
* anything and then the value can be retrieved from
|
|
126
|
+
* The {@link prompt.recognized.succeeded} field can be checked to determine of the recognizer found
|
|
127
|
+
* anything and then the value can be retrieved from {@link prompt.recognized.value}.
|
|
128
128
|
*/
|
|
129
129
|
readonly recognized: PromptRecognizerResult<T>;
|
|
130
130
|
/**
|
|
@@ -158,7 +158,7 @@ export declare abstract class Prompt<T> extends Dialog {
|
|
|
158
158
|
/**
|
|
159
159
|
* Creates a new Prompt instance.
|
|
160
160
|
*
|
|
161
|
-
* @param dialogId Unique ID of the prompt within its parent
|
|
161
|
+
* @param dialogId Unique ID of the prompt within its parent {@link DialogSet} or {@link ComponentDialog}.
|
|
162
162
|
* @param validator (Optional) custom validator used to provide additional validation and re-prompting logic for the prompt.
|
|
163
163
|
*/
|
|
164
164
|
protected constructor(dialogId: string, validator?: PromptValidator<T>);
|
|
@@ -10,7 +10,7 @@ const choices_1 = require("../choices");
|
|
|
10
10
|
const dialog_1 = require("../dialog");
|
|
11
11
|
const agents_activity_1 = require("@microsoft/agents-activity");
|
|
12
12
|
/**
|
|
13
|
-
* Controls the way that choices for a
|
|
13
|
+
* Controls the way that choices for a {@link ChoicePrompt} or yes/no options for a {@link ConfirmPrompt} are
|
|
14
14
|
* presented to a user.
|
|
15
15
|
*/
|
|
16
16
|
var ListStyle;
|
|
@@ -49,7 +49,7 @@ class Prompt extends dialog_1.Dialog {
|
|
|
49
49
|
/**
|
|
50
50
|
* Creates a new Prompt instance.
|
|
51
51
|
*
|
|
52
|
-
* @param dialogId Unique ID of the prompt within its parent
|
|
52
|
+
* @param dialogId Unique ID of the prompt within its parent {@link DialogSet} or {@link ComponentDialog}.
|
|
53
53
|
* @param validator (Optional) custom validator used to provide additional validation and re-prompting logic for the prompt.
|
|
54
54
|
*/
|
|
55
55
|
constructor(dialogId, validator) {
|
|
@@ -46,27 +46,62 @@ export interface PromptCultureModel {
|
|
|
46
46
|
* Class container for currently-supported Culture Models in Confirm and Choice Prompt.
|
|
47
47
|
*/
|
|
48
48
|
export declare class PromptCultureModels {
|
|
49
|
+
/**
|
|
50
|
+
* Represents the Chinese culture model with locale and language-specific settings.
|
|
51
|
+
*/
|
|
49
52
|
static Chinese: PromptCultureModel;
|
|
53
|
+
/**
|
|
54
|
+
* Represents the Dutch culture model with locale and language-specific settings.
|
|
55
|
+
*/
|
|
50
56
|
static Dutch: PromptCultureModel;
|
|
57
|
+
/**
|
|
58
|
+
* Represents the English culture model with locale and language-specific settings.
|
|
59
|
+
*/
|
|
51
60
|
static English: PromptCultureModel;
|
|
61
|
+
/**
|
|
62
|
+
* Represents the French culture model with locale and language-specific settings.
|
|
63
|
+
*/
|
|
52
64
|
static French: PromptCultureModel;
|
|
65
|
+
/**
|
|
66
|
+
* Represents the German culture model with locale and language-specific settings.
|
|
67
|
+
*/
|
|
53
68
|
static German: PromptCultureModel;
|
|
69
|
+
/**
|
|
70
|
+
* Represents the Italian culture model with locale and language-specific settings.
|
|
71
|
+
*/
|
|
54
72
|
static Italian: PromptCultureModel;
|
|
73
|
+
/**
|
|
74
|
+
* Represents the Japanese culture model with locale and language-specific settings.
|
|
75
|
+
*/
|
|
55
76
|
static Japanese: PromptCultureModel;
|
|
77
|
+
/**
|
|
78
|
+
* Represents the Portuguese culture model with locale and language-specific settings.
|
|
79
|
+
*/
|
|
56
80
|
static Portuguese: PromptCultureModel;
|
|
81
|
+
/**
|
|
82
|
+
* Represents the Spanish culture model with locale and language-specific settings.
|
|
83
|
+
*/
|
|
57
84
|
static Spanish: PromptCultureModel;
|
|
58
85
|
/**
|
|
86
|
+
* Retrieves a list of supported culture codes.
|
|
87
|
+
*
|
|
88
|
+
* @returns An array of supported locale strings.
|
|
59
89
|
* @private
|
|
60
90
|
*/
|
|
61
91
|
private static getSupportedCultureCodes;
|
|
62
92
|
/**
|
|
63
|
-
*
|
|
93
|
+
* Normalizes a given locale string to the nearest supported language.
|
|
64
94
|
*
|
|
95
|
+
* @param cultureCode The locale string to normalize (e.g., "en-US").
|
|
96
|
+
* @returns The normalized locale string.
|
|
65
97
|
* @remarks This is mostly a copy/paste from https://github.com/microsoft/Recognizers-Text/blob/master/JavaScript/packages/recognizers-text/src/culture.ts#L39
|
|
66
98
|
* This doesn't directly use Recognizers-Text's MapToNearestLanguage because if they add language support before we do, it will break our prompts.
|
|
67
|
-
* @param cultureCode Represents locale. Examples: "en-US, en-us, EN".
|
|
68
|
-
* @returns Normalized locale.
|
|
69
99
|
*/
|
|
70
100
|
static mapToNearestLanguage(cultureCode: string): string;
|
|
101
|
+
/**
|
|
102
|
+
* Retrieves a list of supported culture models.
|
|
103
|
+
*
|
|
104
|
+
* @returns An array of `PromptCultureModel` objects representing supported cultures.
|
|
105
|
+
*/
|
|
71
106
|
static getSupportedCultures: () => PromptCultureModel[];
|
|
72
107
|
}
|