@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.
Files changed (109) hide show
  1. package/dist/src/agentStateSet.d.ts +30 -27
  2. package/dist/src/agentStateSet.js +30 -27
  3. package/dist/src/agentStateSet.js.map +1 -1
  4. package/dist/src/choices/findValues.d.ts +21 -12
  5. package/dist/src/choices/findValues.js +8 -5
  6. package/dist/src/choices/findValues.js.map +1 -1
  7. package/dist/src/componentDialog.d.ts +117 -95
  8. package/dist/src/componentDialog.js +106 -84
  9. package/dist/src/componentDialog.js.map +1 -1
  10. package/dist/src/dialog.d.ts +15 -10
  11. package/dist/src/dialog.js +15 -10
  12. package/dist/src/dialog.js.map +1 -1
  13. package/dist/src/dialogContainer.d.ts +5 -2
  14. package/dist/src/dialogContainer.js +5 -2
  15. package/dist/src/dialogContainer.js.map +1 -1
  16. package/dist/src/dialogContext.d.ts +33 -12
  17. package/dist/src/dialogContext.js +33 -13
  18. package/dist/src/dialogContext.js.map +1 -1
  19. package/dist/src/dialogInstance.d.ts +11 -11
  20. package/dist/src/dialogReason.d.ts +13 -13
  21. package/dist/src/dialogReason.js +13 -13
  22. package/dist/src/dialogReason.js.map +1 -1
  23. package/dist/src/dialogSet.d.ts +12 -7
  24. package/dist/src/dialogSet.js +10 -5
  25. package/dist/src/dialogSet.js.map +1 -1
  26. package/dist/src/dialogTurnResult.d.ts +1 -0
  27. package/dist/src/dialogTurnStateConstants.d.ts +1 -0
  28. package/dist/src/dialogTurnStateConstants.js +1 -0
  29. package/dist/src/dialogTurnStateConstants.js.map +1 -1
  30. package/dist/src/dialogTurnStatus.d.ts +1 -0
  31. package/dist/src/dialogTurnStatus.js +1 -0
  32. package/dist/src/dialogTurnStatus.js.map +1 -1
  33. package/dist/src/index.d.ts +1 -0
  34. package/dist/src/memory/dialogPath.d.ts +8 -8
  35. package/dist/src/memory/dialogPath.js +8 -8
  36. package/dist/src/memory/dialogStateManager.d.ts +9 -4
  37. package/dist/src/memory/dialogStateManager.js +9 -4
  38. package/dist/src/memory/dialogStateManager.js.map +1 -1
  39. package/dist/src/memory/turnPath.d.ts +12 -12
  40. package/dist/src/memory/turnPath.js +12 -12
  41. package/dist/src/prompts/activityPrompt.d.ts +4 -0
  42. package/dist/src/prompts/activityPrompt.js +4 -0
  43. package/dist/src/prompts/activityPrompt.js.map +1 -1
  44. package/dist/src/prompts/attachmentPrompt.d.ts +1 -0
  45. package/dist/src/prompts/attachmentPrompt.js +1 -0
  46. package/dist/src/prompts/attachmentPrompt.js.map +1 -1
  47. package/dist/src/prompts/choicePrompt.d.ts +4 -0
  48. package/dist/src/prompts/choicePrompt.js +1 -0
  49. package/dist/src/prompts/choicePrompt.js.map +1 -1
  50. package/dist/src/prompts/confirmPrompt.d.ts +4 -1
  51. package/dist/src/prompts/confirmPrompt.js +1 -0
  52. package/dist/src/prompts/confirmPrompt.js.map +1 -1
  53. package/dist/src/prompts/datetimePrompt.d.ts +1 -0
  54. package/dist/src/prompts/datetimePrompt.js +1 -0
  55. package/dist/src/prompts/datetimePrompt.js.map +1 -1
  56. package/dist/src/prompts/numberPrompt.d.ts +1 -0
  57. package/dist/src/prompts/numberPrompt.js +1 -0
  58. package/dist/src/prompts/numberPrompt.js.map +1 -1
  59. package/dist/src/prompts/prompt.d.ts +24 -8
  60. package/dist/src/prompts/prompt.js +8 -0
  61. package/dist/src/prompts/prompt.js.map +1 -1
  62. package/dist/src/prompts/promptCultureModels.d.ts +16 -1
  63. package/dist/src/prompts/promptCultureModels.js +4 -1
  64. package/dist/src/prompts/promptCultureModels.js.map +1 -1
  65. package/dist/src/prompts/textPrompt.d.ts +3 -0
  66. package/dist/src/prompts/textPrompt.js +3 -0
  67. package/dist/src/prompts/textPrompt.js.map +1 -1
  68. package/dist/src/recognizer.d.ts +3 -0
  69. package/dist/src/recognizer.js +1 -0
  70. package/dist/src/recognizer.js.map +1 -1
  71. package/dist/src/recognizerResult.d.ts +5 -4
  72. package/dist/src/recognizerResult.js +5 -4
  73. package/dist/src/recognizerResult.js.map +1 -1
  74. package/dist/src/stringUtils.d.ts +4 -3
  75. package/dist/src/stringUtils.js +4 -3
  76. package/dist/src/stringUtils.js.map +1 -1
  77. package/dist/src/waterfallDialog.d.ts +11 -4
  78. package/dist/src/waterfallDialog.js +11 -4
  79. package/dist/src/waterfallDialog.js.map +1 -1
  80. package/package.json +2 -2
  81. package/src/agentStateSet.ts +30 -27
  82. package/src/choices/findValues.ts +21 -12
  83. package/src/componentDialog.ts +127 -97
  84. package/src/dialog.ts +15 -10
  85. package/src/dialogContainer.ts +5 -2
  86. package/src/dialogContext.ts +41 -15
  87. package/src/dialogInstance.ts +11 -11
  88. package/src/dialogReason.ts +13 -13
  89. package/src/dialogSet.ts +12 -7
  90. package/src/dialogTurnResult.ts +1 -0
  91. package/src/dialogTurnStateConstants.ts +1 -0
  92. package/src/dialogTurnStatus.ts +1 -0
  93. package/src/index.ts +3 -0
  94. package/src/memory/dialogPath.ts +8 -8
  95. package/src/memory/dialogStateManager.ts +9 -4
  96. package/src/memory/turnPath.ts +12 -12
  97. package/src/prompts/activityPrompt.ts +4 -0
  98. package/src/prompts/attachmentPrompt.ts +1 -0
  99. package/src/prompts/choicePrompt.ts +4 -0
  100. package/src/prompts/confirmPrompt.ts +4 -1
  101. package/src/prompts/datetimePrompt.ts +1 -0
  102. package/src/prompts/numberPrompt.ts +1 -0
  103. package/src/prompts/prompt.ts +24 -8
  104. package/src/prompts/promptCultureModels.ts +16 -1
  105. package/src/prompts/textPrompt.ts +3 -0
  106. package/src/recognizer.ts +3 -0
  107. package/src/recognizerResult.ts +5 -4
  108. package/src/stringUtils.ts +4 -3
  109. package/src/waterfallDialog.ts +11 -4
@@ -19,10 +19,12 @@ export declare class WaterfallDialog<O extends object = {}> extends Dialog<O> {
19
19
  /**
20
20
  * Creates a new waterfall dialog containing the given array of steps.
21
21
  *
22
- * @remarks
23
- * See the {@link WaterfallDialog.addStep | addStep function} for details on creating a valid step function.
24
22
  * @param dialogId Unique ID of the dialog within the component or set its being added to.
25
23
  * @param steps (Optional) array of asynchronous waterfall step functions.
24
+ *
25
+ * @remarks
26
+ * See the {@link WaterfallDialog.addStep | addStep function} for details on creating a valid step function.
27
+
26
28
  */
27
29
  constructor(dialogId: string, steps?: WaterfallStep<O>[]);
28
30
  /**
@@ -44,9 +46,11 @@ export declare class WaterfallDialog<O extends object = {}> extends Dialog<O> {
44
46
  * @param dialogContext The {@link DialogContext} for the current turn of conversation.
45
47
  * @param options Optional, initial information to pass to the Dialog.
46
48
  * @returns A Promise representing the asynchronous operation.
49
+ *
47
50
  * @remarks
48
51
  * If the task is successful, the result indicates whether the Dialog is still
49
52
  * active after the turn has been processed by the dialog.
53
+ *
50
54
  */
51
55
  beginDialog(dialogContext: DialogContext, options?: O): Promise<DialogTurnResult>;
52
56
  /**
@@ -55,10 +59,12 @@ export declare class WaterfallDialog<O extends object = {}> extends Dialog<O> {
55
59
  *
56
60
  * @param dialogContext The {@link DialogContext} for the current turn of conversation.
57
61
  * @returns A Promise representing the asynchronous operation.
62
+ *
58
63
  * @remarks
59
64
  * If the task is successful, the result indicates whether the dialog is still
60
65
  * active after the turn has been processed by the dialog. The result may also contain a
61
66
  * return value.
67
+ *
62
68
  */
63
69
  continueDialog(dialogContext: DialogContext): Promise<DialogTurnResult>;
64
70
  /**
@@ -74,11 +80,12 @@ export declare class WaterfallDialog<O extends object = {}> extends Dialog<O> {
74
80
  /**
75
81
  * Called when an individual waterfall step is being executed.
76
82
  *
83
+ * @param step Context object for the waterfall step to execute.
84
+ * @returns A promise with the DialogTurnResult.
85
+ *
77
86
  * @remarks
78
87
  * SHOULD be overridden by derived class that want to add custom logging semantics.
79
88
  *
80
- * @param step Context object for the waterfall step to execute.
81
- * @returns A promise with the DialogTurnResult.
82
89
  */
83
90
  protected onStep(step: WaterfallStepContext<O>): Promise<DialogTurnResult>;
84
91
  /**
@@ -18,10 +18,12 @@ class WaterfallDialog extends dialog_1.Dialog {
18
18
  /**
19
19
  * Creates a new waterfall dialog containing the given array of steps.
20
20
  *
21
- * @remarks
22
- * See the {@link WaterfallDialog.addStep | addStep function} for details on creating a valid step function.
23
21
  * @param dialogId Unique ID of the dialog within the component or set its being added to.
24
22
  * @param steps (Optional) array of asynchronous waterfall step functions.
23
+ *
24
+ * @remarks
25
+ * See the {@link WaterfallDialog.addStep | addStep function} for details on creating a valid step function.
26
+
25
27
  */
26
28
  constructor(dialogId, steps) {
27
29
  super(dialogId);
@@ -56,9 +58,11 @@ class WaterfallDialog extends dialog_1.Dialog {
56
58
  * @param dialogContext The {@link DialogContext} for the current turn of conversation.
57
59
  * @param options Optional, initial information to pass to the Dialog.
58
60
  * @returns A Promise representing the asynchronous operation.
61
+ *
59
62
  * @remarks
60
63
  * If the task is successful, the result indicates whether the Dialog is still
61
64
  * active after the turn has been processed by the dialog.
65
+ *
62
66
  */
63
67
  async beginDialog(dialogContext, options) {
64
68
  const state = dialogContext.activeDialog.state;
@@ -75,10 +79,12 @@ class WaterfallDialog extends dialog_1.Dialog {
75
79
  *
76
80
  * @param dialogContext The {@link DialogContext} for the current turn of conversation.
77
81
  * @returns A Promise representing the asynchronous operation.
82
+ *
78
83
  * @remarks
79
84
  * If the task is successful, the result indicates whether the dialog is still
80
85
  * active after the turn has been processed by the dialog. The result may also contain a
81
86
  * return value.
87
+ *
82
88
  */
83
89
  async continueDialog(dialogContext) {
84
90
  // Don't do anything for non-message activities
@@ -105,11 +111,12 @@ class WaterfallDialog extends dialog_1.Dialog {
105
111
  /**
106
112
  * Called when an individual waterfall step is being executed.
107
113
  *
114
+ * @param step Context object for the waterfall step to execute.
115
+ * @returns A promise with the DialogTurnResult.
116
+ *
108
117
  * @remarks
109
118
  * SHOULD be overridden by derived class that want to add custom logging semantics.
110
119
  *
111
- * @param step Context object for the waterfall step to execute.
112
- * @returns A promise with the DialogTurnResult.
113
120
  */
114
121
  async onStep(step) {
115
122
  return await this.steps[step.index](step);
@@ -1 +1 @@
1
- {"version":3,"file":"waterfallDialog.js","sourceRoot":"","sources":["../../src/waterfallDialog.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,+BAAmC;AACnC,gEAA0D;AAC1D,qCAAiC;AAEjC,iEAA6D;AAE7D,iDAA6C;AAU7C;;;GAGG;AACH,MAAa,eAAuC,SAAQ,eAAS;IAGnE;;;;;;;SAOK;IACL,YAAa,QAAgB,EAAE,KAA0B;QACvD,KAAK,CAAC,QAAQ,CAAC,CAAA;QACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;QACf,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QAC7B,CAAC;IACH,CAAC;IAED;;;;SAIK;IACL,UAAU;QACR,4EAA4E;QAC5E,mCAAmC;QACnC,OAAO,GAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA;IAC1C,CAAC;IAED;;;;;SAKK;IACL,OAAO,CAAE,IAAsB;QAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAErB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;;;;;SASK;IACL,KAAK,CAAC,WAAW,CAAE,aAA4B,EAAE,OAAW;QAC1D,MAAM,KAAK,GAAyB,aAAa,CAAC,YAAY,CAAC,KAA6B,CAAA;QAC5F,KAAK,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;QAC7B,KAAK,CAAC,MAAM,GAAG;YACb,UAAU,EAAE,IAAA,SAAM,GAAE;SACrB,CAAA;QAED,qBAAqB;QACrB,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,EAAE,2BAAY,CAAC,WAAW,CAAC,CAAA;IACvE,CAAC;IAED;;;;;;;;;;SAUK;IACL,KAAK,CAAC,cAAc,CAAE,aAA4B;Q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MAAM,IAAI,KAAK,CACC,2EAA2E,IAAI,CAAC,EAAE,IAAI,KAAK,KAAK,CAC/G,CAAA;oBACH,CAAC;oBACD,UAAU,GAAG,IAAI,CAAA;oBACjB,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,2BAAY,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;gBACzE,CAAC;aACF,CAAC,CAAA;YAEF,eAAe;YACf,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAChC,CAAC;aAAM,CAAC;YACN,4CAA4C;YAC5C,OAAO,MAAM,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;QACnC,CAAC;IACH,CAAC;IAED;;;;;SAKK;IACG,iBAAiB,CAAE,KAAa;QACtC,sEAAsE;QACtE,sCAAsC;QACtC,IAAI,QAAQ,GAAG,EAAE,CAAA;QACjB,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YACtB,IAAI,CAAC;gBACH,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAA;YACnC,CAAC;oBAAS,CAAC;gBACT,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;oBAC9C,QAAQ,GAAG,MAAM,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAA;gBAC5D,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AA5LD,0CA4LC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@microsoft/agents-hosting-dialogs",
4
- "version": "1.0.0",
4
+ "version": "1.0.7-g73d3d58001",
5
5
  "homepage": "https://github.com/microsoft/Agents-for-js",
6
6
  "repository": {
7
7
  "type": "git",
@@ -16,7 +16,7 @@
16
16
  "main": "dist/index.js",
17
17
  "types": "dist/src/index.d.ts",
18
18
  "dependencies": {
19
- "@microsoft/agents-hosting": "1.0.0",
19
+ "@microsoft/agents-hosting": "1.0.7-g73d3d58001",
20
20
  "@types/lodash": "^4.17.16",
21
21
  "dependency-graph": "^1.0.0",
22
22
  "@microsoft/recognizers-text-suite": "^1.3.1",
@@ -6,29 +6,31 @@ import { AgentState, TurnContext } from '@microsoft/agents-hosting'
6
6
 
7
7
  /**
8
8
  * A collection of `AgentState` plugins that should be loaded or saved in parallel as a single unit.
9
+ *
10
+ * @remarks
9
11
  * See `AutoSaveStateMiddleware` for an implementation of this class.
10
12
  */
11
13
  export class AgentStateSet {
12
14
  /**
13
- * Array of the sets `AgentState` plugins.
14
- */
15
+ * Array of the sets `AgentState` plugins.
16
+ */
15
17
  readonly agentStates: AgentState[] = []
16
18
 
17
19
  /**
18
- * Creates a new AgentStateSet instance.
19
- *
20
- * @param agentStates One or more AgentState plugins to register.
21
- */
20
+ * Creates a new AgentStateSet instance.
21
+ *
22
+ * @param agentStates One or more AgentState plugins to register.
23
+ */
22
24
  constructor (...agentStates: AgentState[]) {
23
25
  AgentStateSet.prototype.add.apply(this, agentStates)
24
26
  }
25
27
 
26
28
  /**
27
- * Registers one or more `AgentState` plugins with the set.
28
- *
29
- * @param agentStates One or more AgentState plugins to register.
30
- * @returns The updated AgentStateSet.
31
- */
29
+ * Registers one or more `AgentState` plugins with the set.
30
+ *
31
+ * @param agentStates One or more AgentState plugins to register.
32
+ * @returns The updated AgentStateSet.
33
+ */
32
34
  add (...agentStates: AgentState[]): this {
33
35
  agentStates.forEach((agentstate: AgentState) => {
34
36
  if (typeof agentstate.load === 'function' && typeof agentstate.saveChanges === 'function') {
@@ -42,14 +44,15 @@ export class AgentStateSet {
42
44
  }
43
45
 
44
46
  /**
45
- * Calls the {@link AgentState.load | AgentState.load method} on all of the AgentState plugins in the set.
46
- *
47
- * @remarks
48
- * This will trigger all of the plugins to read in their state in parallel.
49
- *
50
- * @param context Context for current turn of conversation with the user.
51
- * @param force (Optional) If `true` the cache will be bypassed and the state will always be read in directly from storage. Defaults to `false`.
52
- */
47
+ * Calls the {@link AgentState.load | AgentState.load method} on all of the AgentState plugins in the set.
48
+ *
49
+ * @param context Context for current turn of conversation with the user.
50
+ * @param force (Optional) If `true` the cache will be bypassed and the state will always be read in directly from storage. Defaults to `false`.
51
+ *
52
+ * @remarks
53
+ * This will trigger all of the plugins to read in their state in parallel.
54
+ *
55
+ */
53
56
  async loadAll (context: TurnContext, force = false): Promise<void> {
54
57
  const promises: Promise<any>[] = this.agentStates.map((agentstate: AgentState) => agentstate.load(context, force))
55
58
 
@@ -57,14 +60,14 @@ export class AgentStateSet {
57
60
  }
58
61
 
59
62
  /**
60
- * Calls {@link AgentState.saveChanges | AgentState.saveChanges method} on all of the AgentState plugins in the set.
61
- *
62
- * @remarks
63
- * This will trigger all of the plugins to write out their state in parallel.
64
- *
65
- * @param context Context for current turn of conversation with the user.
66
- * @param force (Optional) if `true` the state will always be written out regardless of its change state. Defaults to `false`.
67
- */
63
+ * Calls {@link AgentState.saveChanges | AgentState.saveChanges method} on all of the AgentState plugins in the set.
64
+ *
65
+ * @param context Context for current turn of conversation with the user.
66
+ * @param force (Optional) if `true` the state will always be written out regardless of its change state. Defaults to `false`.
67
+ *
68
+ * @remarks
69
+ * This will trigger all of the plugins to write out their state in parallel.
70
+ */
68
71
  async saveAllChanges (context: TurnContext, force = false): Promise<void> {
69
72
  const promises: Promise<void>[] = this.agentStates.map((agentstate: AgentState) =>
70
73
  agentstate.saveChanges(context, force)
@@ -31,7 +31,7 @@ export interface FindValuesOptions {
31
31
  }
32
32
 
33
33
  /**
34
- * @summary Represents a value that was successfully found and matched during a search operation.
34
+ * Represents a value that was successfully found and matched during a search operation.
35
35
  *
36
36
  * @remarks
37
37
  * This interface contains the matched value along with metadata about the match quality
@@ -49,7 +49,8 @@ export interface FindValuesOptions {
49
49
  */
50
50
  export interface FoundValue {
51
51
  /**
52
- * @summary The exact value that was matched from the original search list.
52
+ * The exact value that was matched from the original search list.
53
+ *
53
54
  * @remarks
54
55
  * This is the original string value, not the user's input that matched it.
55
56
  *
@@ -58,7 +59,8 @@ export interface FoundValue {
58
59
  value: string;
59
60
 
60
61
  /**
61
- * @summary The zero-based index position of this value in the original list that was searched.
62
+ * The zero-based index position of this value in the original list that was searched.
63
+ *
62
64
  * @remarks
63
65
  * This allows you to correlate the found value back to its position in the source array.
64
66
  *
@@ -67,7 +69,8 @@ export interface FoundValue {
67
69
  index: number;
68
70
 
69
71
  /**
70
- * @summary A confidence score between 0 and 1 indicating the quality of the match.
72
+ * A confidence score between 0 and 1 indicating the quality of the match.
73
+ *
71
74
  * @remarks
72
75
  * - 1.0 indicates a perfect exact match
73
76
  * - Lower values indicate partial or fuzzy matches
@@ -79,7 +82,8 @@ export interface FoundValue {
79
82
  }
80
83
 
81
84
  /**
82
- * @summary Represents a value with its original position that can be used in search operations.
85
+ * Represents a value with its original position that can be used in search operations.
86
+ *
83
87
  * @remarks
84
88
  * This interface is used internally by the search algorithm to maintain the relationship
85
89
  * between search values and their original positions in the source array.
@@ -102,7 +106,8 @@ export interface FoundValue {
102
106
  */
103
107
  export interface SortedValue {
104
108
  /**
105
- * @summary The string value to be searched for during matching operations.
109
+ * The string value to be searched for during matching operations.
110
+ *
106
111
  * @remarks
107
112
  * This is the actual text content that will be compared against user input.
108
113
  *
@@ -111,7 +116,8 @@ export interface SortedValue {
111
116
  value: string;
112
117
 
113
118
  /**
114
- * @summary The zero-based index position of this value in the original source array.
119
+ * The zero-based index position of this value in the original source array.
120
+ *
115
121
  * @remarks
116
122
  * This allows the search algorithm to correlate found matches back to their
117
123
  * original positions, which is essential for maintaining proper choice selection.
@@ -122,17 +128,20 @@ export interface SortedValue {
122
128
  }
123
129
 
124
130
  /**
125
- * @summary Low-level function that searches for a set of values within an utterance.
131
+ * Low-level function that searches for a set of values within an utterance.
132
+ *
133
+ * @param utterance The text or user utterance to search over.
134
+ * @param values List of values to search over.
135
+ * @param options (Optional) options used to tweak the search that's performed.
136
+ * @returns A list of found values.
137
+ *
126
138
  * @remarks
127
139
  * Higher level functions like `findChoices()` and `recognizeChoices()` are layered above this function. In most
128
140
  * cases its easier to just call one of the higher level functions instead but this function contains
129
141
  * the fuzzy search algorithm that drives choice recognition.
130
142
  *
131
143
  * @internal
132
- * @param utterance The text or user utterance to search over.
133
- * @param values List of values to search over.
134
- * @param options (Optional) options used to tweak the search that's performed.
135
- * @returns A list of found values.
144
+
136
145
  */
137
146
  export function findValues (
138
147
  utterance: string,