@appilots/web-sdk 0.2.0 → 0.3.0
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/README.md +19 -0
- package/dist/{chunk-T5TUFZ6T.js → chunk-H4ITA2QP.js} +255 -16
- package/dist/{chunk-VHRE4RUO.mjs → chunk-RR3T5CPP.mjs} +250 -17
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +70 -58
- package/dist/index.mjs +1 -1
- package/dist/react/index.d.mts +19 -5
- package/dist/react/index.d.ts +19 -5
- package/dist/react/index.js +516 -101
- package/dist/react/index.mjs +505 -98
- package/dist/{AppilotsWebRuntime-DZF26UyU.d.mts → webSpeechHost-CrTKADeb.d.mts} +127 -1
- package/dist/{AppilotsWebRuntime-DZF26UyU.d.ts → webSpeechHost-CrTKADeb.d.ts} +127 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,234 +1,246 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkH4ITA2QP_js = require('./chunk-H4ITA2QP.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "APPILOTS_CHAT_ATTR", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkH4ITA2QP_js.APPILOTS_CHAT_ATTR; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "APPILOTS_ID_ATTR", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkH4ITA2QP_js.APPILOTS_ID_ATTR; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "APPILOTS_ITEM_COUNT_ATTR", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkH4ITA2QP_js.APPILOTS_ITEM_COUNT_ATTR; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "APPILOTS_ITEM_INDEX_ATTR", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkH4ITA2QP_js.APPILOTS_ITEM_INDEX_ATTR; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "APPILOTS_ITEM_KEY_ATTR", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkH4ITA2QP_js.APPILOTS_ITEM_KEY_ATTR; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "APPILOTS_LIST_ID_ATTR", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkH4ITA2QP_js.APPILOTS_LIST_ID_ATTR; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "APPILOTS_LIST_ITEM_ATTR", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkH4ITA2QP_js.APPILOTS_LIST_ITEM_ATTR; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "APPILOTS_SENSITIVE_ATTR", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkH4ITA2QP_js.APPILOTS_SENSITIVE_ATTR; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "APPILOTS_SKIP_ATTR", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkH4ITA2QP_js.APPILOTS_SKIP_ATTR; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "ActionQueueMachine", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkH4ITA2QP_js.ActionQueueMachine; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "AppilotsClient", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkH4ITA2QP_js.AppilotsClient; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "AppilotsWebRuntime", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkH4ITA2QP_js.AppilotsWebRuntime; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "ChatSessionMachine", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkH4ITA2QP_js.ChatSessionMachine; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "RateLimitedError", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkH4ITA2QP_js.RateLimitedError; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "SDK_VERSION", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkH4ITA2QP_js.SDK_VERSION; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "WebNavigationAdapter", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkH4ITA2QP_js.WebNavigationAdapter; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "accessibleName", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkH4ITA2QP_js.accessibleName; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "bestId", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkH4ITA2QP_js.bestId; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "buildPath", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkH4ITA2QP_js.buildPath; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "candidateIds", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkH4ITA2QP_js.candidateIds; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "captureSnapshot", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkH4ITA2QP_js.captureSnapshot; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "clickElement", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkH4ITA2QP_js.clickElement; }
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(exports, "createWebSpeechHost", {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: function () { return chunkH4ITA2QP_js.createWebSpeechHost; }
|
|
94
98
|
});
|
|
95
99
|
Object.defineProperty(exports, "describeAction", {
|
|
96
100
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkH4ITA2QP_js.describeAction; }
|
|
98
102
|
});
|
|
99
103
|
Object.defineProperty(exports, "elementRole", {
|
|
100
104
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkH4ITA2QP_js.elementRole; }
|
|
102
106
|
});
|
|
103
107
|
Object.defineProperty(exports, "executeAction", {
|
|
104
108
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkH4ITA2QP_js.executeAction; }
|
|
106
110
|
});
|
|
107
111
|
Object.defineProperty(exports, "findListItemElements", {
|
|
108
112
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunkH4ITA2QP_js.findListItemElements; }
|
|
110
114
|
});
|
|
111
115
|
Object.defineProperty(exports, "findScrollContainer", {
|
|
112
116
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkH4ITA2QP_js.findScrollContainer; }
|
|
114
118
|
});
|
|
115
119
|
Object.defineProperty(exports, "focusElement", {
|
|
116
120
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkH4ITA2QP_js.focusElement; }
|
|
118
122
|
});
|
|
119
123
|
Object.defineProperty(exports, "getRegisteredElement", {
|
|
120
124
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkH4ITA2QP_js.getRegisteredElement; }
|
|
122
126
|
});
|
|
123
127
|
Object.defineProperty(exports, "hidesSubtree", {
|
|
124
128
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkH4ITA2QP_js.hidesSubtree; }
|
|
126
130
|
});
|
|
127
131
|
Object.defineProperty(exports, "humanizeError", {
|
|
128
132
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkH4ITA2QP_js.humanizeError; }
|
|
130
134
|
});
|
|
131
135
|
Object.defineProperty(exports, "isOccludedByModal", {
|
|
132
136
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkH4ITA2QP_js.isOccludedByModal; }
|
|
138
|
+
});
|
|
139
|
+
Object.defineProperty(exports, "isSpeechHost", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function () { return chunkH4ITA2QP_js.isSpeechHost; }
|
|
134
142
|
});
|
|
135
143
|
Object.defineProperty(exports, "isVisible", {
|
|
136
144
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkH4ITA2QP_js.isVisible; }
|
|
146
|
+
});
|
|
147
|
+
Object.defineProperty(exports, "isWebSpeechSupported", {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
get: function () { return chunkH4ITA2QP_js.isWebSpeechSupported; }
|
|
138
150
|
});
|
|
139
151
|
Object.defineProperty(exports, "longPressElement", {
|
|
140
152
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkH4ITA2QP_js.longPressElement; }
|
|
142
154
|
});
|
|
143
155
|
Object.defineProperty(exports, "matchRoute", {
|
|
144
156
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkH4ITA2QP_js.matchRoute; }
|
|
146
158
|
});
|
|
147
159
|
Object.defineProperty(exports, "modalCandidateLabels", {
|
|
148
160
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkH4ITA2QP_js.modalCandidateLabels; }
|
|
150
162
|
});
|
|
151
163
|
Object.defineProperty(exports, "normalizeLabelToId", {
|
|
152
164
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunkH4ITA2QP_js.normalizeLabelToId; }
|
|
154
166
|
});
|
|
155
167
|
Object.defineProperty(exports, "parseSyntheticListItemId", {
|
|
156
168
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
169
|
+
get: function () { return chunkH4ITA2QP_js.parseSyntheticListItemId; }
|
|
158
170
|
});
|
|
159
171
|
Object.defineProperty(exports, "primaryControlOf", {
|
|
160
172
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunkH4ITA2QP_js.primaryControlOf; }
|
|
162
174
|
});
|
|
163
175
|
Object.defineProperty(exports, "probeLoadingState", {
|
|
164
176
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
177
|
+
get: function () { return chunkH4ITA2QP_js.probeLoadingState; }
|
|
166
178
|
});
|
|
167
179
|
Object.defineProperty(exports, "readControlValue", {
|
|
168
180
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
181
|
+
get: function () { return chunkH4ITA2QP_js.readControlValue; }
|
|
170
182
|
});
|
|
171
183
|
Object.defineProperty(exports, "readOwnText", {
|
|
172
184
|
enumerable: true,
|
|
173
|
-
get: function () { return
|
|
185
|
+
get: function () { return chunkH4ITA2QP_js.readOwnText; }
|
|
174
186
|
});
|
|
175
187
|
Object.defineProperty(exports, "readScrollMetrics", {
|
|
176
188
|
enumerable: true,
|
|
177
|
-
get: function () { return
|
|
189
|
+
get: function () { return chunkH4ITA2QP_js.readScrollMetrics; }
|
|
178
190
|
});
|
|
179
191
|
Object.defineProperty(exports, "readToggleValue", {
|
|
180
192
|
enumerable: true,
|
|
181
|
-
get: function () { return
|
|
193
|
+
get: function () { return chunkH4ITA2QP_js.readToggleValue; }
|
|
182
194
|
});
|
|
183
195
|
Object.defineProperty(exports, "registeredElements", {
|
|
184
196
|
enumerable: true,
|
|
185
|
-
get: function () { return
|
|
197
|
+
get: function () { return chunkH4ITA2QP_js.registeredElements; }
|
|
186
198
|
});
|
|
187
199
|
Object.defineProperty(exports, "resolveListItem", {
|
|
188
200
|
enumerable: true,
|
|
189
|
-
get: function () { return
|
|
201
|
+
get: function () { return chunkH4ITA2QP_js.resolveListItem; }
|
|
190
202
|
});
|
|
191
203
|
Object.defineProperty(exports, "resolveTargetElement", {
|
|
192
204
|
enumerable: true,
|
|
193
|
-
get: function () { return
|
|
205
|
+
get: function () { return chunkH4ITA2QP_js.resolveTargetElement; }
|
|
194
206
|
});
|
|
195
207
|
Object.defineProperty(exports, "routesBelongToSameFeature", {
|
|
196
208
|
enumerable: true,
|
|
197
|
-
get: function () { return
|
|
209
|
+
get: function () { return chunkH4ITA2QP_js.routesBelongToSameFeature; }
|
|
198
210
|
});
|
|
199
211
|
Object.defineProperty(exports, "screenDepartedBaseline", {
|
|
200
212
|
enumerable: true,
|
|
201
|
-
get: function () { return
|
|
213
|
+
get: function () { return chunkH4ITA2QP_js.screenDepartedBaseline; }
|
|
202
214
|
});
|
|
203
215
|
Object.defineProperty(exports, "scrollIntoView", {
|
|
204
216
|
enumerable: true,
|
|
205
|
-
get: function () { return
|
|
217
|
+
get: function () { return chunkH4ITA2QP_js.scrollIntoView; }
|
|
206
218
|
});
|
|
207
219
|
Object.defineProperty(exports, "scrollToOffset", {
|
|
208
220
|
enumerable: true,
|
|
209
|
-
get: function () { return
|
|
221
|
+
get: function () { return chunkH4ITA2QP_js.scrollToOffset; }
|
|
210
222
|
});
|
|
211
223
|
Object.defineProperty(exports, "setControlValue", {
|
|
212
224
|
enumerable: true,
|
|
213
|
-
get: function () { return
|
|
225
|
+
get: function () { return chunkH4ITA2QP_js.setControlValue; }
|
|
214
226
|
});
|
|
215
227
|
Object.defineProperty(exports, "setToggleValue", {
|
|
216
228
|
enumerable: true,
|
|
217
|
-
get: function () { return
|
|
229
|
+
get: function () { return chunkH4ITA2QP_js.setToggleValue; }
|
|
218
230
|
});
|
|
219
231
|
Object.defineProperty(exports, "stripComponentPrefix", {
|
|
220
232
|
enumerable: true,
|
|
221
|
-
get: function () { return
|
|
233
|
+
get: function () { return chunkH4ITA2QP_js.stripComponentPrefix; }
|
|
222
234
|
});
|
|
223
235
|
Object.defineProperty(exports, "waitForLoadingSettle", {
|
|
224
236
|
enumerable: true,
|
|
225
|
-
get: function () { return
|
|
237
|
+
get: function () { return chunkH4ITA2QP_js.waitForLoadingSettle; }
|
|
226
238
|
});
|
|
227
239
|
Object.defineProperty(exports, "waitForScreenSettle", {
|
|
228
240
|
enumerable: true,
|
|
229
|
-
get: function () { return
|
|
241
|
+
get: function () { return chunkH4ITA2QP_js.waitForScreenSettle; }
|
|
230
242
|
});
|
|
231
243
|
Object.defineProperty(exports, "walkDom", {
|
|
232
244
|
enumerable: true,
|
|
233
|
-
get: function () { return
|
|
245
|
+
get: function () { return chunkH4ITA2QP_js.walkDom; }
|
|
234
246
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { APPILOTS_CHAT_ATTR, APPILOTS_ID_ATTR, APPILOTS_ITEM_COUNT_ATTR, APPILOTS_ITEM_INDEX_ATTR, APPILOTS_ITEM_KEY_ATTR, APPILOTS_LIST_ID_ATTR, APPILOTS_LIST_ITEM_ATTR, APPILOTS_SENSITIVE_ATTR, APPILOTS_SKIP_ATTR, ActionQueueMachine, AppilotsClient, AppilotsWebRuntime, ChatSessionMachine, RateLimitedError, SDK_VERSION, WebNavigationAdapter, accessibleName, bestId, buildPath, candidateIds, captureSnapshot, clickElement, describeAction, elementRole, executeAction, findListItemElements, findScrollContainer, focusElement, getRegisteredElement, hidesSubtree, humanizeError, isOccludedByModal, isVisible, longPressElement, matchRoute, modalCandidateLabels, normalizeLabelToId, parseSyntheticListItemId, primaryControlOf, probeLoadingState, readControlValue, readOwnText, readScrollMetrics, readToggleValue, registeredElements, resolveListItem, resolveTargetElement, routesBelongToSameFeature, screenDepartedBaseline, scrollIntoView, scrollToOffset, setControlValue, setToggleValue, stripComponentPrefix, waitForLoadingSettle, waitForScreenSettle, walkDom } from './chunk-
|
|
1
|
+
export { APPILOTS_CHAT_ATTR, APPILOTS_ID_ATTR, APPILOTS_ITEM_COUNT_ATTR, APPILOTS_ITEM_INDEX_ATTR, APPILOTS_ITEM_KEY_ATTR, APPILOTS_LIST_ID_ATTR, APPILOTS_LIST_ITEM_ATTR, APPILOTS_SENSITIVE_ATTR, APPILOTS_SKIP_ATTR, ActionQueueMachine, AppilotsClient, AppilotsWebRuntime, ChatSessionMachine, RateLimitedError, SDK_VERSION, WebNavigationAdapter, accessibleName, bestId, buildPath, candidateIds, captureSnapshot, clickElement, createWebSpeechHost, describeAction, elementRole, executeAction, findListItemElements, findScrollContainer, focusElement, getRegisteredElement, hidesSubtree, humanizeError, isOccludedByModal, isSpeechHost, isVisible, isWebSpeechSupported, longPressElement, matchRoute, modalCandidateLabels, normalizeLabelToId, parseSyntheticListItemId, primaryControlOf, probeLoadingState, readControlValue, readOwnText, readScrollMetrics, readToggleValue, registeredElements, resolveListItem, resolveTargetElement, routesBelongToSameFeature, screenDepartedBaseline, scrollIntoView, scrollToOffset, setControlValue, setToggleValue, stripComponentPrefix, waitForLoadingSettle, waitForScreenSettle, walkDom } from './chunk-RR3T5CPP.mjs';
|
package/dist/react/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, CSSProperties } from 'react';
|
|
4
|
-
import { k as AppilotsWebRuntimeOptions, j as AppilotsWebRuntime, A as AgentAction, l as ChatMessage, E as EscalationState, n as ChatSessionOptions } from '../
|
|
5
|
-
export {
|
|
4
|
+
import { k as AppilotsWebRuntimeOptions, j as AppilotsWebRuntime, A as AgentAction, l as ChatMessage, E as EscalationState, M as MissionView, n as ChatSessionOptions, q as SpeechHost } from '../webSpeechHost-CrTKADeb.mjs';
|
|
5
|
+
export { r as SpeechStartOptions, w as WebScreenMetadata, y as createWebSpeechHost, B as isWebSpeechSupported } from '../webSpeechHost-CrTKADeb.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Either build the runtime from config, or hand in one you already
|
|
@@ -33,6 +33,11 @@ interface UseAppilotsChatReturn {
|
|
|
33
33
|
error: string | null;
|
|
34
34
|
pendingActions: AgentAction[];
|
|
35
35
|
escalation: EscalationState | null;
|
|
36
|
+
/** Active multi-step task. While it is not completed/cancelled, `sendMessage` only accepts resume. */
|
|
37
|
+
mission: MissionView | null;
|
|
38
|
+
pauseMission: () => Promise<void>;
|
|
39
|
+
resumeMission: () => Promise<void>;
|
|
40
|
+
cancelMission: () => Promise<void>;
|
|
36
41
|
requestHuman: (reason?: 'user_requested' | 'agent_gave_up') => Promise<void>;
|
|
37
42
|
sendMessage: (content: string) => Promise<void>;
|
|
38
43
|
cancelMessage: () => void;
|
|
@@ -67,11 +72,20 @@ interface AppilotsChatProps {
|
|
|
67
72
|
style?: CSSProperties;
|
|
68
73
|
/** Optional close control for a host-provided panel. */
|
|
69
74
|
onClose?: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Voice dictation, off by default. `'browser'` uses the Web Speech API
|
|
77
|
+
* and hides the mic where the browser has none — in Chrome/Edge the
|
|
78
|
+
* audio is sent to the vendor's servers. Pass a `SpeechHost` to use
|
|
79
|
+
* your own engine instead. Dictation fills the draft; it never sends.
|
|
80
|
+
*/
|
|
81
|
+
speech?: 'browser' | SpeechHost;
|
|
82
|
+
/** The host hid the chat without unmounting it. Releases the microphone. */
|
|
83
|
+
hidden?: boolean;
|
|
70
84
|
}
|
|
71
85
|
/** Chat controls use the same session and human-support channel as the mobile SDK. */
|
|
72
|
-
declare function AppilotsChat({ title, placeholder, locale, suggestedPrompts, style, onClose, }: AppilotsChatProps): react_jsx_runtime.JSX.Element;
|
|
86
|
+
declare function AppilotsChat({ title, placeholder, locale, suggestedPrompts, style, onClose, speech, hidden, }: AppilotsChatProps): react_jsx_runtime.JSX.Element;
|
|
73
87
|
|
|
74
|
-
interface AppilotsChatFabProps extends Omit<AppilotsChatProps, 'onClose'> {
|
|
88
|
+
interface AppilotsChatFabProps extends Omit<AppilotsChatProps, 'onClose' | 'hidden'> {
|
|
75
89
|
position?: 'bottom-right' | 'bottom-left';
|
|
76
90
|
defaultOpen?: boolean;
|
|
77
91
|
accentColor?: string;
|
|
@@ -81,4 +95,4 @@ interface AppilotsChatFabProps extends Omit<AppilotsChatProps, 'onClose'> {
|
|
|
81
95
|
/** Floating launcher and chat panel. Closing only hides the UI; the session stays alive. */
|
|
82
96
|
declare function AppilotsChatFab({ position, defaultOpen, accentColor, zIndex, locale, style, ...chatProps }: AppilotsChatFabProps): react.ReactPortal | null;
|
|
83
97
|
|
|
84
|
-
export { AppilotsChat, AppilotsChatFab, type AppilotsChatFabProps, type AppilotsChatProps, AppilotsWebProvider, type AppilotsWebProviderProps, AppilotsWebRuntime, AppilotsWebRuntimeOptions, type UseAppilotsActionsReturn, type UseAppilotsChatReturn, useAppilotsActions, useAppilotsChat, useAppilotsRuntime };
|
|
98
|
+
export { AppilotsChat, AppilotsChatFab, type AppilotsChatFabProps, type AppilotsChatProps, AppilotsWebProvider, type AppilotsWebProviderProps, AppilotsWebRuntime, AppilotsWebRuntimeOptions, SpeechHost, type UseAppilotsActionsReturn, type UseAppilotsChatReturn, useAppilotsActions, useAppilotsChat, useAppilotsRuntime };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, CSSProperties } from 'react';
|
|
4
|
-
import { k as AppilotsWebRuntimeOptions, j as AppilotsWebRuntime, A as AgentAction, l as ChatMessage, E as EscalationState, n as ChatSessionOptions } from '../
|
|
5
|
-
export {
|
|
4
|
+
import { k as AppilotsWebRuntimeOptions, j as AppilotsWebRuntime, A as AgentAction, l as ChatMessage, E as EscalationState, M as MissionView, n as ChatSessionOptions, q as SpeechHost } from '../webSpeechHost-CrTKADeb.js';
|
|
5
|
+
export { r as SpeechStartOptions, w as WebScreenMetadata, y as createWebSpeechHost, B as isWebSpeechSupported } from '../webSpeechHost-CrTKADeb.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Either build the runtime from config, or hand in one you already
|
|
@@ -33,6 +33,11 @@ interface UseAppilotsChatReturn {
|
|
|
33
33
|
error: string | null;
|
|
34
34
|
pendingActions: AgentAction[];
|
|
35
35
|
escalation: EscalationState | null;
|
|
36
|
+
/** Active multi-step task. While it is not completed/cancelled, `sendMessage` only accepts resume. */
|
|
37
|
+
mission: MissionView | null;
|
|
38
|
+
pauseMission: () => Promise<void>;
|
|
39
|
+
resumeMission: () => Promise<void>;
|
|
40
|
+
cancelMission: () => Promise<void>;
|
|
36
41
|
requestHuman: (reason?: 'user_requested' | 'agent_gave_up') => Promise<void>;
|
|
37
42
|
sendMessage: (content: string) => Promise<void>;
|
|
38
43
|
cancelMessage: () => void;
|
|
@@ -67,11 +72,20 @@ interface AppilotsChatProps {
|
|
|
67
72
|
style?: CSSProperties;
|
|
68
73
|
/** Optional close control for a host-provided panel. */
|
|
69
74
|
onClose?: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Voice dictation, off by default. `'browser'` uses the Web Speech API
|
|
77
|
+
* and hides the mic where the browser has none — in Chrome/Edge the
|
|
78
|
+
* audio is sent to the vendor's servers. Pass a `SpeechHost` to use
|
|
79
|
+
* your own engine instead. Dictation fills the draft; it never sends.
|
|
80
|
+
*/
|
|
81
|
+
speech?: 'browser' | SpeechHost;
|
|
82
|
+
/** The host hid the chat without unmounting it. Releases the microphone. */
|
|
83
|
+
hidden?: boolean;
|
|
70
84
|
}
|
|
71
85
|
/** Chat controls use the same session and human-support channel as the mobile SDK. */
|
|
72
|
-
declare function AppilotsChat({ title, placeholder, locale, suggestedPrompts, style, onClose, }: AppilotsChatProps): react_jsx_runtime.JSX.Element;
|
|
86
|
+
declare function AppilotsChat({ title, placeholder, locale, suggestedPrompts, style, onClose, speech, hidden, }: AppilotsChatProps): react_jsx_runtime.JSX.Element;
|
|
73
87
|
|
|
74
|
-
interface AppilotsChatFabProps extends Omit<AppilotsChatProps, 'onClose'> {
|
|
88
|
+
interface AppilotsChatFabProps extends Omit<AppilotsChatProps, 'onClose' | 'hidden'> {
|
|
75
89
|
position?: 'bottom-right' | 'bottom-left';
|
|
76
90
|
defaultOpen?: boolean;
|
|
77
91
|
accentColor?: string;
|
|
@@ -81,4 +95,4 @@ interface AppilotsChatFabProps extends Omit<AppilotsChatProps, 'onClose'> {
|
|
|
81
95
|
/** Floating launcher and chat panel. Closing only hides the UI; the session stays alive. */
|
|
82
96
|
declare function AppilotsChatFab({ position, defaultOpen, accentColor, zIndex, locale, style, ...chatProps }: AppilotsChatFabProps): react.ReactPortal | null;
|
|
83
97
|
|
|
84
|
-
export { AppilotsChat, AppilotsChatFab, type AppilotsChatFabProps, type AppilotsChatProps, AppilotsWebProvider, type AppilotsWebProviderProps, AppilotsWebRuntime, AppilotsWebRuntimeOptions, type UseAppilotsActionsReturn, type UseAppilotsChatReturn, useAppilotsActions, useAppilotsChat, useAppilotsRuntime };
|
|
98
|
+
export { AppilotsChat, AppilotsChatFab, type AppilotsChatFabProps, type AppilotsChatProps, AppilotsWebProvider, type AppilotsWebProviderProps, AppilotsWebRuntime, AppilotsWebRuntimeOptions, SpeechHost, type UseAppilotsActionsReturn, type UseAppilotsChatReturn, useAppilotsActions, useAppilotsChat, useAppilotsRuntime };
|