@alxxsck/ai-assistant 3.0.0 → 3.1.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 +20 -2
- package/dist/{Avatar-Bsv7Y3ZQ.js → Avatar-B9TOQAF_.js} +1 -1
- package/dist/ChatWidgetContent-BuhVlKYA.js +5376 -0
- package/dist/api/messages.api.types.d.ts +2 -1
- package/dist/bridge-ai-chat-widget.es.js +1 -1
- package/dist/context/ChatWidgetContext.d.ts +3 -0
- package/dist/domain/command/CommandRuntime.d.ts +9 -2
- package/dist/domain/command/UiCommandService.d.ts +4 -2
- package/dist/domain/command/command.types.d.ts +8 -0
- package/dist/domain/message/cable/CableContext.d.ts +1 -0
- package/dist/domain/message/message.store.d.ts +4 -0
- package/dist/domain/scenario-interaction/scenario-interaction.types.d.ts +3 -0
- package/dist/domain/voice/voice-input-spectrum.d.ts +17 -0
- package/dist/i18n/messages.d.ts +1 -0
- package/dist/{index-DY_Y_QHI.js → index-DCsPGgIk.js} +590 -524
- package/dist/index.d.ts +1 -1
- package/dist/index.types.d.ts +4 -2
- package/dist/{mount-RA3wsImP.js → mount-BpvW4tbc.js} +9137 -5559
- package/dist/ui/components/ChatInlineProgressStatus.d.ts +5 -0
- package/dist/ui/components/ChatUiActionProgress.d.ts +1 -0
- package/dist/ui/components/ChatWidgetFrame.d.ts +3 -1
- package/dist/ui/components/VoiceComposer.d.ts +6 -1
- package/dist/ui/components/voice-waveform.d.ts +10 -5
- package/dist/ui/error-messages.d.ts +1 -0
- package/package.json +1 -1
- package/dist/ChatWidgetContent-Cq2Y5IHt.js +0 -8304
package/README.md
CHANGED
|
@@ -241,13 +241,18 @@ attachments: {
|
|
|
241
241
|
|
|
242
242
|
## Host handlers
|
|
243
243
|
|
|
244
|
-
`handlers` is optional and is the only command
|
|
244
|
+
`handlers` is optional and is the only command execution surface. Use it when a
|
|
245
245
|
backend command must navigate the product, open a product modal, or customize an
|
|
246
|
-
element highlight
|
|
246
|
+
element highlight. `uiActionPolicies` separately controls trusted presentation
|
|
247
|
+
behavior:
|
|
247
248
|
|
|
248
249
|
```ts
|
|
249
250
|
const widget = new ChatWidgetInstance({
|
|
250
251
|
customerInteractionSession: session,
|
|
252
|
+
uiActionPolicies: {
|
|
253
|
+
account_page: { mobileDisposition: "collapseOnSuccess" },
|
|
254
|
+
featured_game_page: { mobileDisposition: "immersive" },
|
|
255
|
+
},
|
|
251
256
|
handlers: {
|
|
252
257
|
openPage: ({ route }) => productRouter.push(route),
|
|
253
258
|
openModal: ({ modalName }) => productModals.open(modalName),
|
|
@@ -267,6 +272,19 @@ const widget = new ChatWidgetInstance({
|
|
|
267
272
|
});
|
|
268
273
|
```
|
|
269
274
|
|
|
275
|
+
`uiActionPolicies` is trusted host configuration keyed by canonical action
|
|
276
|
+
code. `keep` leaves the mobile chat open; `collapseOnSuccess` and `immersive`
|
|
277
|
+
collapse only the chat surface after the handler resolves. A
|
|
278
|
+
`mobileDisposition` value in command payload is ignored. Unregistered page and
|
|
279
|
+
modal actions default to `collapseOnSuccess`.
|
|
280
|
+
|
|
281
|
+
Navigation and modal handlers should resolve only after the destination is
|
|
282
|
+
ready to own focus, or reject on failure. A mobile handoff never returns focus
|
|
283
|
+
to Lola's launcher; it preserves host focus while manual collapse still returns
|
|
284
|
+
focus to the launcher. `immersive` currently shares the safe surface-collapse
|
|
285
|
+
semantics of `collapseOnSuccess`; hiding all assistant chrome is reserved until
|
|
286
|
+
the host exposes an explicit destination-exit lifecycle.
|
|
287
|
+
|
|
270
288
|
`reportActivation()` is the authoritative signal that the product accepted the
|
|
271
289
|
user activation. Call it synchronously from the product-owned action handler,
|
|
272
290
|
before navigation can unmount the widget. It records the activation, not the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as qs } from "./index-
|
|
1
|
+
import { l as qs } from "./index-DCsPGgIk.js";
|
|
2
2
|
var Dr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
3
|
const Lc = "182", Nd = 0, Tl = 1, Fd = 2, Ks = 1, Zu = 2, Wr = 3, ti = 0, qt = 1, Ln = 2, $n = 0, lr = 1, Al = 2, El = 3, wl = 4, Ud = 5, Ii = 100, Od = 101, kd = 102, Bd = 103, zd = 104, Hd = 200, Gd = 201, Vd = 202, Wd = 203, yo = 204, Mo = 205, Xd = 206, jd = 207, qd = 208, Kd = 209, Yd = 210, Jd = 211, Zd = 212, Qd = 213, $d = 214, To = 0, Ao = 1, Eo = 2, pr = 3, wo = 4, Ro = 5, Co = 6, Po = 7, Dc = 0, ef = 1, tf = 2, Un = 0, Qu = 1, $u = 2, eh = 3, th = 4, nh = 5, ih = 6, Nc = 7, Rl = "attached", nf = "detached", rh = 300, Bi = 301, mr = 302, Io = 303, Lo = 304, ga = 306, Ft = 1e3, Nn = 1001, ra = 1002, Tt = 1003, sh = 1004, Xr = 1005, At = 1006, Ys = 1007, Zn = 1008, en = 1009, ah = 1010, oh = 1011, ns = 1012, Fc = 1013, kn = 1014, un = 1015, ni = 1016, Uc = 1017, Oc = 1018, is = 1020, ch = 35902, lh = 35899, uh = 1021, hh = 1022, hn = 1023, ii = 1026, Di = 1027, kc = 1028, Bc = 1029, _r = 1030, zc = 1031, Hc = 1033, Js = 33776, Zs = 33777, Qs = 33778, $s = 33779, Do = 35840, No = 35841, Fo = 35842, Uo = 35843, Oo = 36196, ko = 37492, Bo = 37496, zo = 37488, Ho = 37489, Go = 37490, Vo = 37491, Wo = 37808, Xo = 37809, jo = 37810, qo = 37811, Ko = 37812, Yo = 37813, Jo = 37814, Zo = 37815, Qo = 37816, $o = 37817, ec = 37818, tc = 37819, nc = 37820, ic = 37821, rc = 36492, sc = 36494, ac = 36495, oc = 36283, cc = 36284, lc = 36285, uc = 36286, dh = 2200, rf = 2201, sf = 2202, rs = 2300, ss = 2301, Ca = 2302, ar = 2400, or = 2401, sa = 2402, Gc = 2500, af = 2501, of = 0, fh = 1, hc = 2, cf = 3200, Vc = 0, lf = 1, pi = "", nt = "srgb", Wt = "srgb-linear", aa = "linear", $e = "srgb", Wi = 7680, Cl = 519, uf = 512, hf = 513, df = 514, Wc = 515, ff = 516, pf = 517, Xc = 518, mf = 519, dc = 35044, Pl = "300 es", Fn = 2e3, oa = 2001;
|
|
4
4
|
function ph(s) {
|