@epam/ai-dial-conversation-input 1.2.0-dev.38 → 1.2.0-dev.42

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAGL,KAAK,EAAE,EAOR,MAAM,OAAO,CAAC;AAYf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AASrD,wIAAwI;AACxI,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAuzBhC,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAGL,KAAK,EAAE,EAOR,MAAM,OAAO,CAAC;AAYf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AASrD,wIAAwI;AACxI,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CA6zBhC,CAAC"}
@@ -7,15 +7,31 @@ interface UseTextInsertionParams {
7
7
  /** Ref attached to the `<textarea>` receiving the text. */
8
8
  textareaRef: RefObject<HTMLTextAreaElement | null>;
9
9
  }
10
+ /** Return value of the {@link useTextInsertion} hook. */
11
+ export interface UseTextInsertionResult {
12
+ /**
13
+ * Call from the textarea's `keydown`. Returns `true` when it has handled an
14
+ * undo the browser could not, in which case the caller must stop processing
15
+ * the event; `false` leaves the browser's own undo untouched.
16
+ */
17
+ handleUndoKeyDown: (event: {
18
+ key: string;
19
+ ctrlKey: boolean;
20
+ metaKey: boolean;
21
+ shiftKey: boolean;
22
+ altKey: boolean;
23
+ preventDefault: () => void;
24
+ }) => boolean;
25
+ }
10
26
  /**
11
27
  * Inserts host-supplied text at the caret whenever `insertion.revision` changes,
12
- * leaving the rest of the draft intact.
28
+ * leaving the rest of the draft intact and undoable with `Ctrl`/`Cmd`+`Z`.
13
29
  *
14
30
  * The insert goes through `execCommand('insertText')` rather than a React state
15
31
  * write, because only an edit made through the browser's editing pipeline lands on
16
32
  * the textarea's native undo stack. Writing the value from React instead is what let
17
33
  * a picked prompt discard an unrecoverable draft (issue #8754).
18
34
  */
19
- export declare const useTextInsertion: ({ insertion, textareaRef, }: UseTextInsertionParams) => void;
35
+ export declare const useTextInsertion: ({ insertion, textareaRef, }: UseTextInsertionParams) => UseTextInsertionResult;
20
36
  export {};
21
37
  //# sourceMappingURL=useTextInsertion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTextInsertion.d.ts","sourceRoot":"","sources":["../../src/hooks/useTextInsertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,wDAAwD;AACxD,UAAU,sBAAsB;IAC9B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,2DAA2D;IAC3D,WAAW,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;CACpD;AA8BD;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,6BAG9B,sBAAsB,KAAG,IAoC3B,CAAC"}
1
+ {"version":3,"file":"useTextInsertion.d.ts","sourceRoot":"","sources":["../../src/hooks/useTextInsertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,wDAAwD;AACxD,UAAU,sBAAsB;IAC9B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,2DAA2D;IAC3D,WAAW,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;CACpD;AA0DD,yDAAyD;AACzD,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,KAAK,EAAE;QACzB,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE,OAAO,CAAC;QAClB,MAAM,EAAE,OAAO,CAAC;QAChB,cAAc,EAAE,MAAM,IAAI,CAAC;KAC5B,KAAK,OAAO,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,6BAG9B,sBAAsB,KAAG,sBAmG3B,CAAC"}
package/index.js CHANGED
@@ -323,30 +323,43 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
323
323
  setMessage: r,
324
324
  textareaRef: i
325
325
  };
326
- }, Pe = (e, t, n) => {
327
- let r = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set;
328
- r ? r.call(e, t) : e.value = t, e.setSelectionRange(n, n), e.dispatchEvent(new Event("input", { bubbles: !0 }));
329
- }, Fe = ({ insertion: e, textareaRef: t }) => {
326
+ }, Pe = (e, t, n, r = n) => {
327
+ let i = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set;
328
+ i ? i.call(e, t) : e.value = t, e.setSelectionRange(n, r), e.dispatchEvent(new Event("input", { bubbles: !0 }));
329
+ }, Fe = (e) => e.key.toLowerCase() === "z" && (e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey, Ie = ({ insertion: e, textareaRef: t }) => {
330
330
  let n = e?.revision, r = B(e?.text);
331
331
  r.current = e?.text;
332
- let i = B(n);
333
- R(() => {
332
+ let i = B(n), a = B(null);
333
+ return R(() => {
334
334
  if (n === i.current) return;
335
335
  i.current = n;
336
- let e = t.current, a = r.current;
337
- if (!e || !a) return;
338
- let { value: o, selectionStart: s, selectionEnd: c } = e, l = s ?? o.length, u = c ?? l;
339
- e.focus(), !(typeof document.execCommand == "function" && document.execCommand("insertText", !1, a)) && Pe(e, `${o.slice(0, l)}${a}${o.slice(u)}`, l + a.length);
340
- }, [n, t]);
341
- }, Ie = /* @__PURE__ */ function(e) {
336
+ let e = r.current;
337
+ !t.current || !e || queueMicrotask(() => {
338
+ let n = t.current;
339
+ if (!n) return;
340
+ let { value: r, selectionStart: i, selectionEnd: o } = n, s = i ?? r.length, c = o ?? s;
341
+ if (n.focus(), a.current = null, typeof document.execCommand == "function" && document.execCommand("insertText", !1, e)) return;
342
+ let l = `${r.slice(0, s)}${e}${r.slice(c)}`;
343
+ Pe(n, l, s + e.length), a.current = {
344
+ insertedValue: l,
345
+ previousValue: r,
346
+ previousSelectionStart: s,
347
+ previousSelectionEnd: c
348
+ };
349
+ });
350
+ }, [n, t]), { handleUndoKeyDown: (e) => {
351
+ let n = a.current, r = t.current;
352
+ return n == null || r == null || !Fe(e) || (a.current = null, r.value !== n.insertedValue) ? !1 : (e.preventDefault(), Pe(r, n.previousValue, n.previousSelectionStart, n.previousSelectionEnd), !0);
353
+ } };
354
+ }, Le = /* @__PURE__ */ function(e) {
342
355
  return e.Idle = "idle", e.Recording = "recording", e.Processing = "processing", e.Error = "error", e;
343
- }({}), Le = /* @__PURE__ */ function(e) {
356
+ }({}), Re = /* @__PURE__ */ function(e) {
344
357
  return e.Dictation = "dictation", e.Attachment = "attachment", e;
345
- }({}), Re = [
358
+ }({}), ze = [
346
359
  "audio/webm;codecs=opus",
347
360
  "audio/ogg;codecs=opus",
348
361
  "audio/webm"
349
- ], ze = 100, Be = 100, Ve = .01, He = ({ onAttachAudio: e, onTranscribeAudio: t, onTranscript: n, errorLabel: r = "Voice input failed" }) => {
362
+ ], Be = 100, Ve = 100, He = .01, Ue = ({ onAttachAudio: e, onTranscribeAudio: t, onTranscript: n, errorLabel: r = "Voice input failed" }) => {
350
363
  let [i, a] = V("idle"), [o, s] = V(null), c = B(null), l = B(null), u = B({
351
364
  onAttachAudio: e,
352
365
  onTranscribeAudio: t,
@@ -377,7 +390,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
377
390
  n.aborted || (t.controller.abort(), l.current = null, s(e instanceof Error ? e.message : u.current.errorLabel), a("error"));
378
391
  }, b = () => {
379
392
  if (!i || n.aborted) return;
380
- let e = Re.find((e) => MediaRecorder.isTypeSupported(e)), t = new MediaRecorder(i, e ? { mimeType: e } : void 0);
393
+ let e = ze.find((e) => MediaRecorder.isTypeSupported(e)), t = new MediaRecorder(i, e ? { mimeType: e } : void 0);
381
394
  d = t;
382
395
  let o = Date.now(), s = !1, l = !1, b = new Uint8Array(c.current?.fftSize ?? 256), x = async () => {
383
396
  if (!(m || n.aborted)) {
@@ -385,7 +398,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
385
398
  try {
386
399
  let i = t.mimeType || e || "audio/webm", c = new Blob(h, { type: i });
387
400
  h.length = 0, _();
388
- let d = Date.now() - o >= Be;
401
+ let d = Date.now() - o >= Ve;
389
402
  if (c.size && (!r || d && (!s || l))) {
390
403
  let e = i.split(";")[0].split("/")[1] ?? "webm", t = new File([c], "voice-" + crypto.randomUUID() + "." + e, { type: i });
391
404
  if (r) {
@@ -411,8 +424,8 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
411
424
  e.getByteTimeDomainData(b), s = !0;
412
425
  let t = 0;
413
426
  for (let e of b) t += ((e - 128) / 128) ** 2;
414
- Math.sqrt(t / b.length) >= Ve && (l = !0, g());
415
- }, ze));
427
+ Math.sqrt(t / b.length) >= He && (l = !0, g());
428
+ }, Be));
416
429
  };
417
430
  t.stop = () => {
418
431
  p || n.aborted || (p = !0, g(), a("processing"), d?.state === "recording" && d.stop());
@@ -443,12 +456,12 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
443
456
  stopRecording: f,
444
457
  discardRecording: p
445
458
  };
446
- }, Ue = /* @__PURE__ */ function(e) {
459
+ }, We = /* @__PURE__ */ function(e) {
447
460
  return e.Enter = "enter", e.MetaEnter = "meta-enter", e;
448
- }({}), We = {
461
+ }({}), Ge = {
449
462
  item: "_item_1sr2n_1",
450
463
  itemIcon: "_itemIcon_1sr2n_11"
451
- }, Ge = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: o, titleClassName: l = "dial-body-semi-text", itemLabelClassName: u = "dial-small-text", btnTextClassName: f = "", colors: p }) => {
464
+ }, Ke = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: o, titleClassName: l = "dial-body-semi-text", itemLabelClassName: u = "dial-small-text", btnTextClassName: f = "", colors: p }) => {
452
465
  let m = (e) => {
453
466
  e(), r();
454
467
  }, h = s({
@@ -472,9 +485,9 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
472
485
  style: h,
473
486
  children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ W("li", { children: /* @__PURE__ */ W(d, {
474
487
  type: "button",
475
- className: c(We.item, "w-full gap-3 px-4 py-[10px] text-start"),
488
+ className: c(Ge.item, "w-full gap-3 px-4 py-[10px] text-start"),
476
489
  iconBefore: /* @__PURE__ */ W("span", {
477
- className: We.itemIcon,
490
+ className: Ge.itemIcon,
478
491
  children: n
479
492
  }),
480
493
  iconAfter: r ? /* @__PURE__ */ W("span", {
@@ -490,7 +503,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
490
503
  }) }, e))
491
504
  })
492
505
  });
493
- }, Ke = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
506
+ }, qe = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
494
507
  let [s, c] = V(t), [l, u] = V(n), [d, f] = V(r), p = B(o);
495
508
  R(() => {
496
509
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
@@ -523,12 +536,12 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
523
536
  a
524
537
  ])
525
538
  };
526
- }, qe = { label: "_label_14i7c_1" }, Je = ({ features: e, responseFormat: t, systemPrompt: n, temperature: i, onResponseFormatChange: o, onSystemPromptChange: l, onTemperatureChange: u, responseFormatLabel: d = "Response format", responseFormatHint: f = "Applies to new and existing messages", responseFormatMarkdownLabel: p = "Markdown", responseFormatPlainTextLabel: m = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
539
+ }, Je = { label: "_label_14i7c_1" }, K = ({ features: e, responseFormat: t, systemPrompt: n, temperature: i, onResponseFormatChange: o, onSystemPromptChange: l, onTemperatureChange: u, responseFormatLabel: d = "Response format", responseFormatHint: f = "Applies to new and existing messages", responseFormatMarkdownLabel: p = "Markdown", responseFormatPlainTextLabel: m = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
527
540
  "Precise",
528
541
  "Neutral",
529
542
  "Creative"
530
543
  ], temperatureHint: y, labelClassName: b = "!dial-small-semi-text", colors: x }) => {
531
- let S = s({ "--csf-label-text": x?.labelText }), C = c(b, qe.label, "gap-1");
544
+ let S = s({ "--csf-label-text": x?.labelText }), C = c(b, Je.label, "gap-1");
532
545
  return /* @__PURE__ */ G("div", {
533
546
  className: "flex flex-col gap-4 px-6 pb-3",
534
547
  style: S,
@@ -579,8 +592,8 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
579
592
  })
580
593
  ]
581
594
  });
582
- }, K = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
583
- let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: ee, setTemperature: A, handleSubmit: te } = Ke({
595
+ }, Ye = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
596
+ let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: ee, setTemperature: A, handleSubmit: te } = qe({
584
597
  isOpen: e,
585
598
  features: o,
586
599
  initialResponseFormat: s,
@@ -597,7 +610,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
597
610
  onBack: t,
598
611
  backLabel: n,
599
612
  style: a,
600
- children: [/* @__PURE__ */ W(Je, {
613
+ children: [/* @__PURE__ */ W(K, {
601
614
  features: o,
602
615
  responseFormat: T,
603
616
  systemPrompt: E,
@@ -629,8 +642,8 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
629
642
  })
630
643
  })]
631
644
  });
632
- }, Ye = { modal: "_modal_kl0h0_1" }, Xe = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = Ye.modal }) => {
633
- let { responseFormat: b, systemPrompt: x, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: ee } = Ke({
645
+ }, Xe = { modal: "_modal_kl0h0_1" }, Ze = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = Xe.modal }) => {
646
+ let { responseFormat: b, systemPrompt: x, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: ee } = qe({
634
647
  features: e,
635
648
  initialResponseFormat: t,
636
649
  initialSystemPrompt: n,
@@ -657,7 +670,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
657
670
  })
658
671
  })
659
672
  }),
660
- children: /* @__PURE__ */ W(Je, {
673
+ children: /* @__PURE__ */ W(K, {
661
674
  features: e,
662
675
  responseFormat: b,
663
676
  systemPrompt: x,
@@ -676,10 +689,10 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
676
689
  temperatureHint: g
677
690
  })
678
691
  });
679
- }, Ze = {
692
+ }, Qe = {
680
693
  icon: "_icon_1fv6z_1",
681
694
  selectedIcon: "_selectedIcon_1fv6z_5"
682
- }, Qe = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: a, title: o = "Tools", items: l, onToolToggle: f, itemLabelClassName: p = "dial-small-text", colors: h }) => /* @__PURE__ */ W(Te, {
695
+ }, $e = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: a, title: o = "Tools", items: l, onToolToggle: f, itemLabelClassName: p = "dial-small-text", colors: h }) => /* @__PURE__ */ W(Te, {
683
696
  isOpen: e,
684
697
  title: o,
685
698
  closeLabel: i,
@@ -702,11 +715,11 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
702
715
  "aria-checked": e.isSelected,
703
716
  className: "w-full gap-3 px-4 py-[10px] text-start",
704
717
  iconBefore: /* @__PURE__ */ W("span", {
705
- className: c("flex items-center", Ze.icon),
718
+ className: c("flex items-center", Qe.icon),
706
719
  children: e.icon
707
720
  }),
708
721
  iconAfter: e.isSelected ? /* @__PURE__ */ W("span", {
709
- className: c("ms-auto", Ze.selectedIcon),
722
+ className: c("ms-auto", Qe.selectedIcon),
710
723
  children: /* @__PURE__ */ W(P, {
711
724
  size: u,
712
725
  "aria-hidden": !0,
@@ -721,10 +734,10 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
721
734
  })
722
735
  }, e.id))
723
736
  })
724
- }), $e = {
737
+ }), et = {
725
738
  toolIcon: "_toolIcon_ma5s5_1",
726
739
  chevronIcon: "_chevronIcon_ma5s5_5"
727
- }, et = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: o, menuCloseLabel: d, style: f, listClassName: _ = "w-[240px]", isDisabled: y = !1, chatSettings: x, extraMenuItems: S, toolsMenuItems: C = [], onToolToggle: w, toolsMenuTitle: T = "Tools", toolsBackLabel: E = "Back", menuOverlays: D, colors: O }) => {
740
+ }, tt = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: o, menuCloseLabel: d, style: f, listClassName: _ = "w-[240px]", isDisabled: y = !1, chatSettings: x, extraMenuItems: S, toolsMenuItems: C = [], onToolToggle: w, toolsMenuTitle: T = "Tools", toolsBackLabel: E = "Back", menuOverlays: D, colors: O }) => {
728
741
  let k = l(), [ee, A] = V(!1), [te, j] = V(!1), [ne, M] = V(!1), [N, re] = V(null), [ie, P] = V(!1), F = z(() => s({
729
742
  "--aab-tool-icon": O?.toolIcon,
730
743
  "--aab-chevron-icon": O?.chevronIcon
@@ -733,7 +746,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
733
746
  label: e.label,
734
747
  icon: /* @__PURE__ */ W("span", {
735
748
  style: F,
736
- className: c("flex items-center", $e.toolIcon),
749
+ className: c("flex items-center", et.toolIcon),
737
750
  children: e.icon
738
751
  }),
739
752
  selectable: !0,
@@ -771,7 +784,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
771
784
  size: u,
772
785
  stroke: m,
773
786
  style: F,
774
- className: c("rtl:scale-x-[-1]", $e.chevronIcon),
787
+ className: c("rtl:scale-x-[-1]", et.chevronIcon),
775
788
  "aria-hidden": !0
776
789
  }) } : { children: le }
777
790
  }] : [],
@@ -786,7 +799,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
786
799
  size: u,
787
800
  stroke: m,
788
801
  style: F,
789
- className: c("rtl:scale-x-[-1]", $e.chevronIcon),
802
+ className: c("rtl:scale-x-[-1]", et.chevronIcon),
790
803
  "aria-hidden": !0
791
804
  }) } : {
792
805
  children: [{
@@ -820,7 +833,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
820
833
  size: u,
821
834
  stroke: m,
822
835
  style: F,
823
- className: c("rtl:scale-x-[-1]", $e.chevronIcon),
836
+ className: c("rtl:scale-x-[-1]", et.chevronIcon),
824
837
  "aria-hidden": !0
825
838
  }) : null,
826
839
  onClick: () => j(!0)
@@ -871,7 +884,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
871
884
  disabled: y,
872
885
  onClick: () => A(!0)
873
886
  }),
874
- /* @__PURE__ */ W(Ge, {
887
+ /* @__PURE__ */ W(Ke, {
875
888
  isOpen: ee,
876
889
  title: o,
877
890
  closeLabel: d,
@@ -881,7 +894,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
881
894
  className: "pb-4",
882
895
  btnTextClassName: "flex-1"
883
896
  }),
884
- oe && /* @__PURE__ */ W(Qe, {
897
+ oe && /* @__PURE__ */ W($e, {
885
898
  isOpen: ne,
886
899
  onBack: () => {
887
900
  M(!1), A(!0);
@@ -906,7 +919,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
906
919
  style: f,
907
920
  children: e.renderOverlay(() => re(null))
908
921
  }, e.key)),
909
- x != null && /* @__PURE__ */ W(K, {
922
+ x != null && /* @__PURE__ */ W(Ye, {
910
923
  isOpen: te,
911
924
  onBack: () => {
912
925
  j(!1), A(!0);
@@ -933,7 +946,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
933
946
  saveLabel: x.saveLabel,
934
947
  saveDisabledTooltip: x.saveDisabledTooltip
935
948
  })
936
- ] }) : /* @__PURE__ */ G(U, { children: [me, x != null && te && /* @__PURE__ */ W(Xe, {
949
+ ] }) : /* @__PURE__ */ G(U, { children: [me, x != null && te && /* @__PURE__ */ W(Ze, {
937
950
  features: x.features,
938
951
  initialResponseFormat: x.responseFormat ?? a.Markdown,
939
952
  initialSystemPrompt: x.systemPrompt,
@@ -953,13 +966,13 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
953
966
  saveLabel: x.saveLabel,
954
967
  saveDisabledTooltip: x.saveDisabledTooltip
955
968
  })] }) });
956
- }, tt = {
969
+ }, nt = {
957
970
  chip: "_chip_ydmd8_1",
958
971
  chipSelected: "_chipSelected_ydmd8_9",
959
972
  chipIcon: "_chipIcon_ydmd8_16",
960
973
  chipText: "_chipText_ydmd8_19",
961
974
  chipClose: "_chipClose_ydmd8_22"
962
- }, nt = (e) => `Remove ${e}`, rt = ({ items: e, onToolToggle: t, onToolDismiss: n, canRemove: r = !0, removeLabel: i = nt, typography: a, colors: o }) => e.length === 0 ? null : /* @__PURE__ */ W("div", {
975
+ }, rt = (e) => `Remove ${e}`, it = ({ items: e, onToolToggle: t, onToolDismiss: n, canRemove: r = !0, removeLabel: i = rt, typography: a, colors: o }) => e.length === 0 ? null : /* @__PURE__ */ W("div", {
963
976
  className: "flex flex-wrap items-center gap-2",
964
977
  style: s({
965
978
  "--ci-chip-bg": o?.chipBg,
@@ -975,25 +988,25 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
975
988
  "--ci-chip-close-hover": o?.chipCloseHover
976
989
  }),
977
990
  children: e.map((e) => /* @__PURE__ */ G("div", {
978
- className: c(tt.chip, e.isSelected && tt.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 transition-colors", r ? "pe-1 ps-2" : "px-2"),
991
+ className: c(nt.chip, e.isSelected && nt.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 transition-colors", r ? "pe-1 ps-2" : "px-2"),
979
992
  children: [/* @__PURE__ */ G("button", {
980
993
  type: "button",
981
994
  onClick: () => t(e.id),
982
995
  "aria-pressed": e.isSelected,
983
996
  className: "flex min-w-0 items-center gap-1.5",
984
997
  children: [/* @__PURE__ */ W("span", {
985
- className: c(tt.chipIcon, "shrink-0"),
998
+ className: c(nt.chipIcon, "shrink-0"),
986
999
  "aria-hidden": !0,
987
1000
  children: e.icon
988
1001
  }), /* @__PURE__ */ W("span", {
989
- className: c(tt.chipText, a?.fontClassName || "dial-small-paragraph-text", "truncate"),
1002
+ className: c(nt.chipText, a?.fontClassName || "dial-small-paragraph-text", "truncate"),
990
1003
  children: e.label
991
1004
  })]
992
1005
  }), r && /* @__PURE__ */ W("button", {
993
1006
  type: "button",
994
1007
  onClick: () => n(e.id),
995
1008
  "aria-label": i(e.label),
996
- className: c(tt.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
1009
+ className: c(nt.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
997
1010
  children: /* @__PURE__ */ W(pe, {
998
1011
  size: 12,
999
1012
  "aria-hidden": !0,
@@ -1012,23 +1025,23 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1012
1025
  modelSelectorName: "_modelSelectorName_q1jcl_50",
1013
1026
  modelSelectorVersion: "_modelSelectorVersion_q1jcl_53",
1014
1027
  modelSelectorButtonDisabled: "_modelSelectorButtonDisabled_q1jcl_62"
1015
- }, it = {
1028
+ }, at = {
1016
1029
  wrapperError: "_wrapperError_129ri_1",
1017
1030
  waveformCanvas: "_waveformCanvas_129ri_5",
1018
1031
  recordingDot: "_recordingDot_129ri_19",
1019
1032
  "recording-pulse": "_recording-pulse_129ri_1"
1020
- }, at = 3, ot = 4, st = 200, ct = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, attachButton: a, stopLabel: o = "Stop recording", discardLabel: s = "Discard recording", processingLabel: l = "Transcribing audio…", style: u, className: d, embedded: f = !1 }) => {
1021
- let h = B(null), g = B(new Float32Array(st)), y = B(0), b = B(0), x = e === Ie.Recording, S = e === Ie.Error, C = e === Ie.Processing, w = L((e) => {
1033
+ }, ot = 3, st = 4, ct = 200, lt = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, attachButton: a, stopLabel: o = "Stop recording", discardLabel: s = "Discard recording", processingLabel: l = "Transcribing audio…", style: u, className: d, embedded: f = !1 }) => {
1034
+ let h = B(null), g = B(new Float32Array(ct)), y = B(0), b = B(0), x = e === Le.Recording, S = e === Le.Error, C = e === Le.Processing, w = L((e) => {
1022
1035
  let t = e.getContext("2d");
1023
1036
  if (!t) return;
1024
1037
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
1025
1038
  let { width: n, height: r } = e;
1026
1039
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
1027
- let i = Math.min(Math.max(1, Math.floor(n / ot)), st - 1), a = y.current, o = b.current;
1040
+ let i = Math.min(Math.max(1, Math.floor(n / st)), ct - 1), a = y.current, o = b.current;
1028
1041
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
1029
1042
  for (let e = 0; e <= i; e++) {
1030
- let n = ((a - i + e) % st + st) % st, o = g.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
1031
- t.fillRect(e * ot, (r - c) / 2, at, c);
1043
+ let n = ((a - i + e) % ct + ct) % ct, o = g.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
1044
+ t.fillRect(e * st, (r - c) / 2, ot, c);
1032
1045
  }
1033
1046
  t.restore();
1034
1047
  }, []);
@@ -1038,8 +1051,8 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1038
1051
  if (!e) return;
1039
1052
  g.current.fill(0), y.current = 0, b.current = 0;
1040
1053
  let n, r = () => {
1041
- if (b.current += 1, b.current >= ot) {
1042
- b.current -= ot;
1054
+ if (b.current += 1, b.current >= st) {
1055
+ b.current -= st;
1043
1056
  let e = t.current;
1044
1057
  if (e) {
1045
1058
  let t = new Uint8Array(e.frequencyBinCount);
@@ -1049,7 +1062,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1049
1062
  let r = (t[e] - 128) / 128;
1050
1063
  n += r * r;
1051
1064
  }
1052
- g.current[y.current % st] = Math.sqrt(n / t.length), y.current++;
1065
+ g.current[y.current % ct] = Math.sqrt(n / t.length), y.current++;
1053
1066
  }
1054
1067
  }
1055
1068
  w(e), n = requestAnimationFrame(r);
@@ -1105,17 +1118,17 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1105
1118
  className: d,
1106
1119
  children: [/* @__PURE__ */ G("div", {
1107
1120
  style: u,
1108
- className: c("flex w-full min-w-0 flex-col justify-center gap-2", !f && q.wrapper, !f && "min-h-[64px] max-w-[748px] rounded-xl border px-3 shadow-md", S && it.wrapperError),
1121
+ className: c("flex w-full min-w-0 flex-col justify-center gap-2", !f && q.wrapper, !f && "min-h-[64px] max-w-[748px] rounded-xl border px-3 shadow-md", S && at.wrapperError),
1109
1122
  children: [/* @__PURE__ */ G("div", {
1110
1123
  className: "flex min-w-0 flex-1 items-center gap-3",
1111
1124
  children: [x && /* @__PURE__ */ W("span", {
1112
- className: c(it.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1125
+ className: c(at.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1113
1126
  "aria-hidden": !0
1114
1127
  }), /* @__PURE__ */ W("canvas", {
1115
1128
  ref: h,
1116
1129
  height: 26,
1117
1130
  "aria-hidden": !0,
1118
- className: c(it.waveformCanvas, "h-[26px] min-w-0 flex-1")
1131
+ className: c(at.waveformCanvas, "h-[26px] min-w-0 flex-1")
1119
1132
  })]
1120
1133
  }), /* @__PURE__ */ G("div", {
1121
1134
  className: "flex items-center justify-between gap-2",
@@ -1129,7 +1142,7 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1129
1142
  })
1130
1143
  })]
1131
1144
  });
1132
- }, lt = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ W(T, {
1145
+ }, ut = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ W(T, {
1133
1146
  "aria-label": n,
1134
1147
  onClick: () => e?.(),
1135
1148
  disabled: t,
@@ -1139,19 +1152,19 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1139
1152
  className: "rtl:scale-x-[-1]",
1140
1153
  stroke: m
1141
1154
  })
1142
- }), ut = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ W(j, {
1155
+ }), dt = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ W(j, {
1143
1156
  icon: /* @__PURE__ */ W(le, {
1144
1157
  size: p.LG,
1145
1158
  stroke: m
1146
1159
  }),
1147
1160
  onClick: () => e?.(),
1148
1161
  "aria-label": t
1149
- }), dt = ({ size: e = 20 }) => /* @__PURE__ */ W(k, {
1162
+ }), ft = ({ size: e = 20 }) => /* @__PURE__ */ W(k, {
1150
1163
  variant: ee.Circular,
1151
1164
  width: e,
1152
1165
  height: e,
1153
1166
  active: !0
1154
- }), ft = ({ loadingLabel: e }) => /* @__PURE__ */ G("span", {
1167
+ }), pt = ({ loadingLabel: e }) => /* @__PURE__ */ G("span", {
1155
1168
  className: "flex min-w-0 flex-1 items-center",
1156
1169
  children: [/* @__PURE__ */ W(k, {
1157
1170
  variant: ee.Text,
@@ -1162,24 +1175,24 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1162
1175
  className: "sr-only",
1163
1176
  children: e
1164
1177
  })]
1165
- }), pt = ({ loadingLabel: e }) => /* @__PURE__ */ W("div", {
1178
+ }), mt = ({ loadingLabel: e }) => /* @__PURE__ */ W("div", {
1166
1179
  role: "status",
1167
1180
  "aria-label": e,
1168
1181
  children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ G("div", {
1169
1182
  className: "flex h-11 items-center gap-3 px-4",
1170
1183
  "aria-hidden": "true",
1171
- children: [/* @__PURE__ */ W(dt, {}), /* @__PURE__ */ W(ft, {})]
1184
+ children: [/* @__PURE__ */ W(ft, {}), /* @__PURE__ */ W(pt, {})]
1172
1185
  }, t))
1173
- }), mt = (e) => e.displayName ?? e.id, ht = (e, t) => {
1186
+ }), ht = (e) => e.displayName ?? e.id, J = (e, t) => {
1174
1187
  let n = t.trim().toLowerCase();
1175
- return n ? e.filter((e) => mt(e).toLowerCase().includes(n)) : e;
1176
- }, J = (e, t, r, i = 18, a) => /* @__PURE__ */ W(n, {
1188
+ return n ? e.filter((e) => ht(e).toLowerCase().includes(n)) : e;
1189
+ }, Y = (e, t, r, i = 18, a) => /* @__PURE__ */ W(n, {
1177
1190
  src: e,
1178
1191
  size: i,
1179
1192
  labels: { tooltip: a },
1180
1193
  initialsName: r
1181
- }), Y = { searchHeader: "_searchHeader_1728o_1" }, gt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = Y.searchHeader, colors: a }) => {
1182
- let [o, l] = V(""), u = z(() => e?.find((e) => e.id === t), [e, t]), d = r?.loading !== void 0, f = !d && !u && !!t, m = z(() => d ? /* @__PURE__ */ W(dt, { size: p.LG }) : J(u?.iconUrl, u?.type, u?.displayName ?? u?.id ?? "", p.LG, f ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1194
+ }), gt = { searchHeader: "_searchHeader_1728o_1" }, _t = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = gt.searchHeader, colors: a }) => {
1195
+ let [o, l] = V(""), u = z(() => e?.find((e) => e.id === t), [e, t]), d = r?.loading !== void 0, f = !d && !u && !!t, m = z(() => d ? /* @__PURE__ */ W(ft, { size: p.LG }) : Y(u?.iconUrl, u?.type, u?.displayName ?? u?.id ?? "", p.LG, f ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1183
1196
  d,
1184
1197
  u,
1185
1198
  f,
@@ -1193,8 +1206,8 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1193
1206
  menuItems: z(() => {
1194
1207
  if (d) return Array.from({ length: 7 }, (e, t) => ({
1195
1208
  key: `__loading-${t}`,
1196
- icon: /* @__PURE__ */ W(dt, {}),
1197
- label: /* @__PURE__ */ W(ft, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1209
+ icon: /* @__PURE__ */ W(ft, {}),
1210
+ label: /* @__PURE__ */ W(pt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1198
1211
  disabled: !0
1199
1212
  }));
1200
1213
  if (!e || e.length === 0) {
@@ -1205,14 +1218,14 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1205
1218
  disabled: !0
1206
1219
  }] : [];
1207
1220
  }
1208
- return ht(e, o).map((e) => ({
1221
+ return J(e, o).map((e) => ({
1209
1222
  key: e.id,
1210
1223
  label: /* @__PURE__ */ W(y, {
1211
- text: mt(e),
1224
+ text: ht(e),
1212
1225
  query: o,
1213
1226
  maxLines: 1
1214
1227
  }),
1215
- icon: J(e.iconUrl, e.type, e.displayName ?? e.id),
1228
+ icon: Y(e.iconUrl, e.type, e.displayName ?? e.id),
1216
1229
  mark: b.Check,
1217
1230
  checked: e.id === t,
1218
1231
  onClick: () => n?.(e.id)
@@ -1247,8 +1260,8 @@ var Se = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1247
1260
  e || l("");
1248
1261
  }
1249
1262
  };
1250
- }, _t = typeof window < "u" ? _e : R;
1251
- function vt(e) {
1263
+ }, vt = typeof window < "u" ? _e : R;
1264
+ function yt(e) {
1252
1265
  if (e !== void 0) switch (typeof e) {
1253
1266
  case "number": return e;
1254
1267
  case "string":
@@ -1256,15 +1269,15 @@ function vt(e) {
1256
1269
  break;
1257
1270
  }
1258
1271
  }
1259
- function yt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1272
+ function bt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1260
1273
  let { styleHeight: s, styleWidth: c } = z(() => ({
1261
- styleHeight: vt(o?.height),
1262
- styleWidth: vt(o?.width)
1274
+ styleHeight: yt(o?.height),
1275
+ styleWidth: yt(o?.width)
1263
1276
  }), [o?.height, o?.width]), [l, u] = V({
1264
1277
  height: t,
1265
1278
  width: n
1266
1279
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
1267
- return _t(() => {
1280
+ return vt(() => {
1268
1281
  if (i === null || d) return;
1269
1282
  let t = new ResizeObserver((e) => {
1270
1283
  for (let t of e) {
@@ -1293,26 +1306,26 @@ function yt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1293
1306
  c
1294
1307
  ]);
1295
1308
  }
1296
- function bt(e) {
1309
+ function xt(e) {
1297
1310
  let t = B(() => {
1298
1311
  throw Error("Cannot call during render.");
1299
1312
  });
1300
- return _t(() => {
1313
+ return vt(() => {
1301
1314
  t.current = e;
1302
1315
  }, [e]), L((e) => t.current?.(e), [t]);
1303
1316
  }
1304
- var xt = null;
1305
- function X(e = !1) {
1306
- if (xt === null || e) {
1317
+ var X = null;
1318
+ function Z(e = !1) {
1319
+ if (X === null || e) {
1307
1320
  let e = document.createElement("div"), t = e.style;
1308
1321
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
1309
1322
  let n = document.createElement("div"), r = n.style;
1310
- return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? xt = "positive-descending" : (e.scrollLeft = 1, xt = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), xt;
1323
+ return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? X = "positive-descending" : (e.scrollLeft = 1, X = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), X;
1311
1324
  }
1312
- return xt;
1325
+ return X;
1313
1326
  }
1314
- function Z({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1315
- if (t === "horizontal" && n) switch (X()) {
1327
+ function Q({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1328
+ if (t === "horizontal" && n) switch (Z()) {
1316
1329
  case "negative": return -r;
1317
1330
  case "positive-descending":
1318
1331
  if (e) {
@@ -1323,12 +1336,12 @@ function Z({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1323
1336
  }
1324
1337
  return r;
1325
1338
  }
1326
- function Q(e, t = "Assertion error") {
1339
+ function $(e, t = "Assertion error") {
1327
1340
  if (!e) throw console.error(t), Error(t);
1328
1341
  }
1329
1342
  function St(e, t) {
1330
1343
  if (e === t) return !0;
1331
- if (!!e != !!t || (Q(e !== void 0), Q(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1344
+ if (!!e != !!t || ($(e !== void 0), $(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1332
1345
  for (let n in e) if (!Object.is(t[n], e[n])) return !1;
1333
1346
  return !0;
1334
1347
  }
@@ -1337,7 +1350,7 @@ function Ct({ cachedBounds: e, itemCount: t, itemSize: n }) {
1337
1350
  if (typeof n == "number") return t * n;
1338
1351
  {
1339
1352
  let n = e.get(e.size === 0 ? 0 : e.size - 1);
1340
- return Q(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1353
+ return $(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1341
1354
  }
1342
1355
  }
1343
1356
  function wt({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
@@ -1377,7 +1390,7 @@ function Et({ itemCount: e, itemProps: t, itemSize: n }) {
1377
1390
  let r = /* @__PURE__ */ new Map();
1378
1391
  return {
1379
1392
  get(i) {
1380
- for (Q(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1393
+ for ($(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1381
1394
  let e = r.size, a;
1382
1395
  switch (typeof n) {
1383
1396
  case "function":
@@ -1393,14 +1406,14 @@ function Et({ itemCount: e, itemProps: t, itemSize: n }) {
1393
1406
  });
1394
1407
  else {
1395
1408
  let t = r.get(e - 1);
1396
- Q(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1409
+ $(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1397
1410
  scrollOffset: t.scrollOffset + t.size,
1398
1411
  size: a
1399
1412
  });
1400
1413
  }
1401
1414
  }
1402
1415
  let a = r.get(i);
1403
- return Q(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1416
+ return $(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1404
1417
  },
1405
1418
  set(e, t) {
1406
1419
  r.set(e, t);
@@ -1425,7 +1438,7 @@ function Ot({ containerSize: e, itemSize: t }) {
1425
1438
  let n;
1426
1439
  switch (typeof t) {
1427
1440
  case "string":
1428
- Q(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), Q(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
1441
+ $(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), $(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
1429
1442
  break;
1430
1443
  default:
1431
1444
  n = t;
@@ -1434,7 +1447,7 @@ function Ot({ containerSize: e, itemSize: t }) {
1434
1447
  return n;
1435
1448
  }
1436
1449
  function kt({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1437
- let { height: u = n, width: d = n } = yt({
1450
+ let { height: u = n, width: d = n } = bt({
1438
1451
  defaultHeight: r === "vertical" ? n : void 0,
1439
1452
  defaultWidth: r === "horizontal" ? n : void 0,
1440
1453
  element: e,
@@ -1485,7 +1498,7 @@ function kt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1485
1498
  m
1486
1499
  ]), w = L((t) => Tt({
1487
1500
  cachedBounds: h,
1488
- containerScrollOffset: Z({
1501
+ containerScrollOffset: Q({
1489
1502
  containerElement: e,
1490
1503
  direction: r,
1491
1504
  isRtl: i,
@@ -1503,19 +1516,19 @@ function kt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1503
1516
  a,
1504
1517
  l
1505
1518
  ]);
1506
- return _t(() => {
1519
+ return vt(() => {
1507
1520
  v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
1508
1521
  }, [
1509
1522
  e,
1510
1523
  r,
1511
1524
  w
1512
- ]), _t(() => {
1525
+ ]), vt(() => {
1513
1526
  if (!e) return;
1514
1527
  let t = () => {
1515
1528
  v((t) => {
1516
1529
  let { scrollLeft: n, scrollTop: o } = e, s = Tt({
1517
1530
  cachedBounds: h,
1518
- containerScrollOffset: Z({
1531
+ containerScrollOffset: Q({
1519
1532
  containerElement: e,
1520
1533
  direction: r,
1521
1534
  isRtl: i,
@@ -1541,7 +1554,7 @@ function kt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1541
1554
  ]), {
1542
1555
  getCellBounds: g,
1543
1556
  getEstimatedSize: C,
1544
- scrollToIndex: bt(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1557
+ scrollToIndex: xt(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1545
1558
  let s = wt({
1546
1559
  align: t,
1547
1560
  cachedBounds: h,
@@ -1552,7 +1565,7 @@ function kt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1552
1565
  itemSize: m
1553
1566
  });
1554
1567
  if (e) {
1555
- if (s = Z({
1568
+ if (s = Q({
1556
1569
  containerElement: e,
1557
1570
  direction: r,
1558
1571
  isRtl: i,
@@ -1608,7 +1621,7 @@ function Pt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1608
1621
  top: r
1609
1622
  });
1610
1623
  }
1611
- }), [g, x]), _t(() => {
1624
+ }), [g, x]), vt(() => {
1612
1625
  if (!g) return;
1613
1626
  let e = Array.from(g.children).filter((e, t) => {
1614
1627
  if (e.hasAttribute("aria-hidden")) return !1;
@@ -1697,7 +1710,7 @@ var Ft = {
1697
1710
  checkIcon: "_checkIcon_1tiyp_19",
1698
1711
  stateLabel: "_stateLabel_1tiyp_23"
1699
1712
  }, It = 44, Lt = 8, Rt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: o, onSelect: s }) => {
1700
- let l = r[e], u = J(l.iconUrl, l.type, l.displayName ?? l.id, p.SM), f = l.id === i;
1713
+ let l = r[e], u = Y(l.iconUrl, l.type, l.displayName ?? l.id, p.SM), f = l.id === i;
1701
1714
  return /* @__PURE__ */ W("div", {
1702
1715
  style: t,
1703
1716
  ...n,
@@ -1731,7 +1744,7 @@ var Ft = {
1731
1744
  R(() => {
1732
1745
  e || y("");
1733
1746
  }, [e]);
1734
- let b = a && a.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? ht(a, v) : [], w = (e) => {
1747
+ let b = a && a.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? J(a, v) : [], w = (e) => {
1735
1748
  l(e), i();
1736
1749
  }, T = s({
1737
1750
  "--ci-sheet-divider": _?.divider,
@@ -1761,7 +1774,7 @@ var Ft = {
1761
1774
  size: g.Standard,
1762
1775
  onChange: (e) => y(e ?? "")
1763
1776
  })
1764
- }), /* @__PURE__ */ W("div", { className: c(Ft.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ W(pt, { loadingLabel: u }) : S ? /* @__PURE__ */ W("div", {
1777
+ }), /* @__PURE__ */ W("div", { className: c(Ft.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ W(mt, { loadingLabel: u }) : S ? /* @__PURE__ */ W("div", {
1765
1778
  role: "list",
1766
1779
  className: c(Ft.stateLabel, h, "px-4 py-4"),
1767
1780
  children: S
@@ -1783,7 +1796,7 @@ var Ft = {
1783
1796
  })
1784
1797
  });
1785
1798
  }, Bt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: l, modelPickerOverlay: u, isPickerOpen: d, onPickerToggle: f, onPickerOpenChange: g }) => {
1786
- let [_, y] = V(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, selectedVersion: C, menuItems: w, menuHeader: T, onOpenChange: E } = gt({
1799
+ let [_, y] = V(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, selectedVersion: C, menuItems: w, menuHeader: T, onOpenChange: E } = _t({
1787
1800
  deployments: e,
1788
1801
  selectedDeploymentId: t,
1789
1802
  onDeploymentChange: n,
@@ -1888,7 +1901,7 @@ var Ft = {
1888
1901
  })
1889
1902
  })
1890
1903
  });
1891
- }, Vt = ({ message: e = "", messageRevision: t, textInsertion: n, onSend: r, onUploadAttachment: i, onStop: a, isStreaming: o = !1, onChange: d, onAttachmentsChange: f, placeholder: g = "Type a message...", ariaLabel: y, attachLabel: b = "Attach file", fileAccept: x, addMenuTitle: S = "Add", menuTitle: C = "Menu", menuCloseLabel: w = "Close", removeLabel: T, retryLabel: E, uploadingLabel: D, sendLabel: O, sendTooltip: k, stopLabel: ee, micLabel: A = "Dictate", recordVoiceLabel: te = "Record voice", stopRecordingLabel: j, discardRecordingLabel: ne, colors: M, typography: N, className: re, pendingDropFiles: ie = [], onDropFilesConsumed: P, pendingAttachments: F = [], onPendingAttachmentsConsumed: ae, pasteTextThreshold: ce = 4e3, maxMessageLength: I = 5e4, deployments: le, selectedDeploymentId: ue, onDeploymentChange: de, modelSelectorLabels: fe, initialAttachments: pe = [], hideAddButton: me = !1, hideAttachFile: he = !1, hideActionBar: ge = !1, renderFooterActions: _e, isInputDisabled: H = !1, isModelSelectorDisabled: ye = !1, isSendDisabled: be = !1, isAudioMessageSupported: Se = !1, isVoiceRecordingSupported: Ce = Se, onTranscribeAudio: we, transcribingLabel: Te, voiceErrorLabel: Ee, sendOnEnter: Oe = Ue.Enter, prefixAttachments: Ae = [], onRemovePrefixAttachment: je, chatSettings: Pe, toolsMenuItems: Re, onToolToggle: ze, canRemoveTools: Be = !0, toolsMenuTitle: Ve, toolsBackLabel: We, toolsChipLabels: Ge, menuOverlays: Ke, inlineStartSlot: qe, onInlineStartRemove: Je, commandMenu: K, autoFocus: Ye = !1, messageHistory: Xe, onDialFileSystemClick: Ze, dialFileSystemLabel: Qe, validateAttachment: $e, onAttachmentClick: tt, modelPickerOverlay: nt, maximumAttachmentsAmount: it, onAttachmentsLimitExceeded: at, isAttachmentsEnabled: ot = !0, isTextAttachmentsAllowed: st = !0, usageLimitsSlot: dt, onMessageTooLong: ft }) => {
1904
+ }, Vt = ({ message: e = "", messageRevision: t, textInsertion: n, onSend: r, onUploadAttachment: i, onStop: a, isStreaming: o = !1, onChange: d, onAttachmentsChange: f, placeholder: g = "Type a message...", ariaLabel: y, attachLabel: b = "Attach file", fileAccept: x, addMenuTitle: S = "Add", menuTitle: C = "Menu", menuCloseLabel: w = "Close", removeLabel: T, retryLabel: E, uploadingLabel: D, sendLabel: O, sendTooltip: k, stopLabel: ee, micLabel: A = "Dictate", recordVoiceLabel: te = "Record voice", stopRecordingLabel: j, discardRecordingLabel: ne, colors: M, typography: N, className: re, pendingDropFiles: ie = [], onDropFilesConsumed: P, pendingAttachments: F = [], onPendingAttachmentsConsumed: ae, pasteTextThreshold: ce = 4e3, maxMessageLength: I = 5e4, deployments: le, selectedDeploymentId: ue, onDeploymentChange: de, modelSelectorLabels: fe, initialAttachments: pe = [], hideAddButton: me = !1, hideAttachFile: he = !1, hideActionBar: ge = !1, renderFooterActions: _e, isInputDisabled: H = !1, isModelSelectorDisabled: ye = !1, isSendDisabled: be = !1, isAudioMessageSupported: Se = !1, isVoiceRecordingSupported: Ce = Se, onTranscribeAudio: we, transcribingLabel: Te, voiceErrorLabel: Ee, sendOnEnter: Oe = We.Enter, prefixAttachments: Ae = [], onRemovePrefixAttachment: je, chatSettings: Pe, toolsMenuItems: Fe, onToolToggle: ze, canRemoveTools: Be = !0, toolsMenuTitle: Ve, toolsBackLabel: He, toolsChipLabels: Ge, menuOverlays: Ke, inlineStartSlot: qe, onInlineStartRemove: Je, commandMenu: K, autoFocus: Ye = !1, messageHistory: Xe, onDialFileSystemClick: Ze, dialFileSystemLabel: Qe, validateAttachment: $e, onAttachmentClick: et, modelPickerOverlay: nt, maximumAttachmentsAmount: rt, onAttachmentsLimitExceeded: at, isAttachmentsEnabled: ot = !0, isTextAttachmentsAllowed: st = !0, usageLimitsSlot: ct, onMessageTooLong: ft }) => {
1892
1905
  let pt = l(), [mt, ht] = V(!1), J = Me(Xe), Y = qe != null, [gt, _t] = V(null), [vt, yt] = V(0), bt = z(() => s({
1893
1906
  "--ci-bg": M?.background,
1894
1907
  "--ci-text": M?.text,
@@ -1921,12 +1934,10 @@ var Ft = {
1921
1934
  }] : [], [Ze, Qe]), { message: X, setMessage: Z, textareaRef: Q } = Ne({
1922
1935
  messageProp: e,
1923
1936
  messageRevision: t
1924
- });
1925
- Fe({
1937
+ }), { handleUndoKeyDown: $ } = Ie({
1926
1938
  insertion: n,
1927
1939
  textareaRef: Q
1928
- });
1929
- let { isMenuOpen: St, query: Ct, dismiss: wt, handleValueChange: Tt } = ke({
1940
+ }), { isMenuOpen: St, query: Ct, dismiss: wt, handleValueChange: Tt } = ke({
1930
1941
  config: K,
1931
1942
  message: X
1932
1943
  }), Et = K?.emptyQueryHint != null, Dt = Et && St && Ct === "", Ot = L((e) => {
@@ -1966,7 +1977,7 @@ var Ft = {
1966
1977
  onExpandPastedText: L((e) => {
1967
1978
  Z((t) => t ? `${t}\n${e}` : e);
1968
1979
  }, [Z]),
1969
- maximumAttachmentsAmount: it,
1980
+ maximumAttachmentsAmount: rt,
1970
1981
  baseAttachmentsAmount: Ae.length,
1971
1982
  onAttachmentsLimitExceeded: at
1972
1983
  }), Lt = L((e) => {
@@ -1976,7 +1987,7 @@ var Ft = {
1976
1987
  let [Vt, Ht] = V({
1977
1988
  text: "",
1978
1989
  revision: 0
1979
- }), { state: Ut, analyserNodeRef: Wt, errorMessage: Gt, startRecording: Kt, stopRecording: qt, discardRecording: Jt } = He({
1990
+ }), { state: Ut, analyserNodeRef: Wt, errorMessage: Gt, startRecording: Kt, stopRecording: qt, discardRecording: Jt } = Ue({
1980
1991
  onAttachAudio: Lt,
1981
1992
  onTranscribeAudio: we,
1982
1993
  onTranscript: L((e) => {
@@ -1995,36 +2006,36 @@ var Ft = {
1995
2006
  d
1996
2007
  ]),
1997
2008
  errorLabel: Ee
1998
- }), $ = Ut === Ie.Recording || Ut === Ie.Processing;
2009
+ }), Yt = Ut === Le.Recording || Ut === Le.Processing;
1999
2010
  R(() => {
2000
- (Ut === Ie.Error || Ut === Ie.Idle && Rt.current) && (Rt.current = !1, Q.current?.focus());
2011
+ (Ut === Le.Error || Ut === Le.Idle && Rt.current) && (Rt.current = !1, Q.current?.focus());
2001
2012
  }, [Ut, Q]);
2002
- let Yt = B(null), Xt = B(null), Zt = ot && st, { handlePaste: Qt } = xe(jt, Zt ? ce : Infinity), $t = L((e) => {
2003
- if (!Zt) {
2013
+ let Xt = B(null), Zt = B(null), Qt = ot && st, { handlePaste: $t } = xe(jt, Qt ? ce : Infinity), en = L((e) => {
2014
+ if (!Qt) {
2004
2015
  let t = e.clipboardData.getData("text/plain");
2005
2016
  t.length >= I && ft?.(t.length, I);
2006
2017
  }
2007
- Qt(e);
2018
+ $t(e);
2008
2019
  }, [
2009
- Zt,
2020
+ Qt,
2010
2021
  I,
2011
2022
  ft,
2012
- Qt
2013
- ]), en = (X.trim().length > 0 || kt.length > 0 || Y) && !It && !be && !$, [tn, nn] = V([]);
2023
+ $t
2024
+ ]), tn = (X.trim().length > 0 || kt.length > 0 || Y) && !It && !be && !Yt, [nn, rn] = V([]);
2014
2025
  R(() => {
2015
- nn([]);
2016
- }, [(Re ?? []).map((e) => e.id).join("|")]);
2017
- let rn = z(() => {
2018
- let e = Re ?? [];
2019
- return Be ? e.filter((e) => e.isSelected || !tn.includes(e.id)) : e;
2026
+ rn([]);
2027
+ }, [(Fe ?? []).map((e) => e.id).join("|")]);
2028
+ let an = z(() => {
2029
+ let e = Fe ?? [];
2030
+ return Be ? e.filter((e) => e.isSelected || !nn.includes(e.id)) : e;
2020
2031
  }, [
2021
- Re,
2022
- tn,
2032
+ Fe,
2033
+ nn,
2023
2034
  Be
2024
- ]), an = L((e) => {
2025
- nn((t) => t.includes(e) ? t : [...t, e]), Re?.find((t) => t.id === e)?.isSelected && ze?.(e);
2026
- }, [Re, ze]), on = le === void 0 || ue != null, sn = Se && !o, cn = async () => {
2027
- if (be || $) return;
2035
+ ]), on = L((e) => {
2036
+ rn((t) => t.includes(e) ? t : [...t, e]), Fe?.find((t) => t.id === e)?.isSelected && ze?.(e);
2037
+ }, [Fe, ze]), sn = le === void 0 || ue != null, cn = Se && !o, ln = async () => {
2038
+ if (be || Yt) return;
2028
2039
  if (X.length >= I) {
2029
2040
  ft?.(X.length, I);
2030
2041
  return;
@@ -2038,8 +2049,8 @@ var Ft = {
2038
2049
  } catch {
2039
2050
  Z(e), Mt(t);
2040
2051
  }
2041
- }, ln = (e) => {
2042
- if (!$) {
2052
+ }, un = (e) => {
2053
+ if (!Yt && !$(e)) {
2043
2054
  if (!e.nativeEvent.isComposing && !H && !o) {
2044
2055
  if (e.key === "ArrowUp" || e.key === "ArrowDown") {
2045
2056
  let t = e.currentTarget.selectionStart ?? 0, n = J.navigate(e.key === "ArrowUp" ? "up" : "down", X, t);
@@ -2053,14 +2064,14 @@ var Ft = {
2053
2064
  return;
2054
2065
  }
2055
2066
  }
2056
- e.key === "Enter" && (Oe === Ue.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !o && en && on && !H && cn());
2067
+ e.key === "Enter" && (Oe === We.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !o && tn && sn && !H && ln());
2057
2068
  }
2058
- }, un = (e) => {
2069
+ }, dn = (e) => {
2059
2070
  let t = Array.from(e.target.files ?? []);
2060
2071
  if (t.length === 0) return;
2061
2072
  let n = At(t);
2062
2073
  e.target.value = "", jt(n);
2063
- }, dn = /* @__PURE__ */ W("textarea", {
2074
+ }, fn = /* @__PURE__ */ W("textarea", {
2064
2075
  className: c(q.textarea, Y && q.textareaIndented, N?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]", "disabled:cursor-not-allowed"),
2065
2076
  ref: Q,
2066
2077
  autoFocus: Ye,
@@ -2070,14 +2081,14 @@ var Ft = {
2070
2081
  let t = e.nativeEvent instanceof InputEvent ? e.nativeEvent : void 0;
2071
2082
  Tt(e.target.value, t?.isComposing ?? !1, t?.inputType), d?.(e.target.value);
2072
2083
  },
2073
- onKeyDown: ln,
2074
- onPaste: $t,
2084
+ onKeyDown: un,
2085
+ onPaste: en,
2075
2086
  placeholder: Y ? void 0 : g,
2076
2087
  "aria-label": y,
2077
2088
  disabled: H,
2078
- readOnly: $,
2089
+ readOnly: Yt,
2079
2090
  rows: 1
2080
- }), fn = K == null ? dn : /* @__PURE__ */ W(h, {
2091
+ }), pn = K == null ? fn : /* @__PURE__ */ W(h, {
2081
2092
  className: "w-full",
2082
2093
  open: St,
2083
2094
  onOpenChange: (e) => {
@@ -2099,8 +2110,8 @@ var Ft = {
2099
2110
  children: e
2100
2111
  });
2101
2112
  },
2102
- children: dn
2103
- }), pn = Y || Et ? /* @__PURE__ */ G("div", {
2113
+ children: fn
2114
+ }), mn = Y || Et ? /* @__PURE__ */ G("div", {
2104
2115
  className: "relative w-full",
2105
2116
  children: [
2106
2117
  Y && /* @__PURE__ */ W("div", {
@@ -2116,28 +2127,28 @@ var Ft = {
2116
2127
  children: K.triggerPrefix
2117
2128
  }), K.emptyQueryHint]
2118
2129
  }),
2119
- fn
2130
+ pn
2120
2131
  ]
2121
- }) : fn, mn = me ? void 0 : /* @__PURE__ */ W(et, {
2122
- onAttachClick: he ? void 0 : () => Yt.current?.click(),
2132
+ }) : pn, hn = me ? void 0 : /* @__PURE__ */ W(tt, {
2133
+ onAttachClick: he ? void 0 : () => Xt.current?.click(),
2123
2134
  attachLabel: b,
2124
2135
  addMenuTitle: S,
2125
2136
  menuTitle: C,
2126
2137
  menuCloseLabel: w,
2127
2138
  style: bt,
2128
- isDisabled: H || $,
2139
+ isDisabled: H || Yt,
2129
2140
  chatSettings: Pe,
2130
2141
  extraMenuItems: xt,
2131
- onRecordVoice: Ce && ot && !o && !$ ? () => Kt(Le.Attachment) : void 0,
2142
+ onRecordVoice: Ce && ot && !o && !Yt ? () => Kt(Re.Attachment) : void 0,
2132
2143
  recordVoiceLabel: te,
2133
- toolsMenuItems: Be ? Re : void 0,
2144
+ toolsMenuItems: Be ? Fe : void 0,
2134
2145
  onToolToggle: ze,
2135
2146
  toolsMenuTitle: Ve,
2136
- toolsBackLabel: We,
2147
+ toolsBackLabel: He,
2137
2148
  menuOverlays: Ke
2138
2149
  });
2139
2150
  return /* @__PURE__ */ G("div", {
2140
- ref: Xt,
2151
+ ref: Zt,
2141
2152
  style: bt,
2142
2153
  className: c(q.wrapper, H && q.wrapperDisabled, H && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", kt.length > 6 ? "py-4 ps-4" : "p-4", re),
2143
2154
  children: [
@@ -2153,55 +2164,55 @@ var Ft = {
2153
2164
  retryLabel: E,
2154
2165
  uploadingLabel: D
2155
2166
  },
2156
- onAttachmentClick: tt == null ? void 0 : (e) => {
2167
+ onAttachmentClick: et == null ? void 0 : (e) => {
2157
2168
  let t = [...Ae, ...kt].find((t) => t.id === e);
2158
- t != null && tt(t);
2169
+ t != null && et(t);
2159
2170
  }
2160
2171
  }),
2161
2172
  !me && /* @__PURE__ */ W("input", {
2162
- ref: Yt,
2173
+ ref: Xt,
2163
2174
  type: "file",
2164
2175
  multiple: !0,
2165
2176
  accept: x,
2166
2177
  className: "sr-only",
2167
2178
  "aria-hidden": !0,
2168
2179
  tabIndex: -1,
2169
- onChange: un
2180
+ onChange: dn
2170
2181
  }),
2171
2182
  Gt && /* @__PURE__ */ W(_, {
2172
2183
  text: Gt,
2173
2184
  className: "min-w-0 break-words px-1"
2174
2185
  }),
2175
- $ && /* @__PURE__ */ W(ct, {
2186
+ Yt && /* @__PURE__ */ W(lt, {
2176
2187
  embedded: !0,
2177
2188
  state: Ut,
2178
2189
  analyserNodeRef: Wt,
2179
2190
  errorMessage: Gt,
2180
2191
  onStop: qt,
2181
2192
  onDiscard: Jt,
2182
- attachButton: mn,
2193
+ attachButton: hn,
2183
2194
  stopLabel: j,
2184
2195
  discardLabel: ne,
2185
2196
  processingLabel: Te
2186
2197
  }),
2187
- !$ && ge && pn,
2188
- !$ && !ge && /* @__PURE__ */ G("div", {
2198
+ !Yt && ge && mn,
2199
+ !Yt && !ge && /* @__PURE__ */ G("div", {
2189
2200
  className: "flex flex-wrap items-center gap-2",
2190
2201
  children: [
2191
2202
  /* @__PURE__ */ W("div", {
2192
2203
  className: "flex w-full min-w-0 items-center self-stretch",
2193
- children: pn
2204
+ children: mn
2194
2205
  }),
2195
- mn && /* @__PURE__ */ W("div", {
2206
+ hn && /* @__PURE__ */ W("div", {
2196
2207
  className: "flex",
2197
- children: mn
2208
+ children: hn
2198
2209
  }),
2199
- rn.length > 0 && ze != null && /* @__PURE__ */ W("div", {
2210
+ an.length > 0 && ze != null && /* @__PURE__ */ W("div", {
2200
2211
  className: "min-w-0 flex-1",
2201
- children: /* @__PURE__ */ W(rt, {
2202
- items: rn,
2212
+ children: /* @__PURE__ */ W(it, {
2213
+ items: an,
2203
2214
  onToolToggle: ze,
2204
- onToolDismiss: an,
2215
+ onToolDismiss: on,
2205
2216
  canRemove: Be,
2206
2217
  removeLabel: Ge?.removeLabel
2207
2218
  })
@@ -2209,10 +2220,10 @@ var Ft = {
2209
2220
  /* @__PURE__ */ W("div", {
2210
2221
  className: "ms-auto flex flex-shrink-0 items-center gap-2",
2211
2222
  children: _e ? _e({
2212
- canSend: en,
2213
- onSend: cn
2223
+ canSend: tn,
2224
+ onSend: ln
2214
2225
  }) : /* @__PURE__ */ G(U, { children: [
2215
- dt,
2226
+ ct,
2216
2227
  /* @__PURE__ */ W(Bt, {
2217
2228
  deployments: le,
2218
2229
  selectedDeploymentId: ue,
@@ -2227,7 +2238,7 @@ var Ft = {
2227
2238
  onPickerToggle: () => ht((e) => !e),
2228
2239
  onPickerOpenChange: ht
2229
2240
  }),
2230
- sn && /* @__PURE__ */ W(v, {
2241
+ cn && /* @__PURE__ */ W(v, {
2231
2242
  icon: /* @__PURE__ */ W(se, {
2232
2243
  size: p.LG,
2233
2244
  stroke: m,
@@ -2236,15 +2247,15 @@ var Ft = {
2236
2247
  "aria-label": A,
2237
2248
  tooltipProps: { tooltip: A },
2238
2249
  className: "size-[40px] flex-shrink-0 mobile:min-h-11 mobile:min-w-11",
2239
- onClick: () => Kt(Le.Dictation),
2250
+ onClick: () => Kt(Re.Dictation),
2240
2251
  disabled: H || o
2241
2252
  }),
2242
- o && a ? /* @__PURE__ */ W(ut, {
2253
+ o && a ? /* @__PURE__ */ W(dt, {
2243
2254
  onStop: a,
2244
2255
  ariaLabel: ee
2245
- }) : !o && /* @__PURE__ */ W(lt, {
2246
- onSend: cn,
2247
- isDisabled: !on || !en,
2256
+ }) : !o && /* @__PURE__ */ W(ut, {
2257
+ onSend: ln,
2258
+ isDisabled: !sn || !tn,
2248
2259
  ariaLabel: O,
2249
2260
  sendTooltip: k
2250
2261
  })
@@ -2368,7 +2379,7 @@ var Ft = {
2368
2379
  "aria-hidden": !0,
2369
2380
  tabIndex: -1,
2370
2381
  onChange: ye
2371
- }), /* @__PURE__ */ W(et, {
2382
+ }), /* @__PURE__ */ W(tt, {
2372
2383
  onAttachClick: () => ae.current?.click(),
2373
2384
  attachLabel: v,
2374
2385
  addMenuTitle: _,
@@ -2391,4 +2402,4 @@ var Ft = {
2391
2402
  });
2392
2403
  };
2393
2404
  //#endregion
2394
- export { Te as BottomSheetShell, Xe as ChatSettingsModal, Ut as ConversationInput, Wt as EditMessageInput, Vt as Input, Ue as SendOnEnter };
2405
+ export { Te as BottomSheetShell, Ze as ChatSettingsModal, Ut as ConversationInput, Wt as EditMessageInput, Vt as Input, We as SendOnEnter };
package/models/Input.d.ts CHANGED
@@ -129,8 +129,9 @@ export interface InputProps {
129
129
  /**
130
130
  * Text inserted at the caret each time its `revision` changes, leaving the
131
131
  * surrounding draft intact. Unlike `message`, this never replaces what the
132
- * user has written, and it is made through the browser's editing pipeline so
133
- * the native undo shortcut reverts it.
132
+ * user has written, and `Ctrl`/`Cmd`+`Z` undoes it. The insert lands one
133
+ * microtask after the render that requests it, and leaves the caret after
134
+ * the inserted text.
134
135
  */
135
136
  textInsertion?: TextInsertion;
136
137
  /** Called on every keystroke with the current textarea value. */
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/models/Input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,U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CAAC;IAC7B,+GAA+G;IAC/G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yEAAyE;IACzE,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gFAAgF;IAChF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4HAA4H;IAC5H,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-conversation-input",
3
3
  "description": "Conversation message input with model selection, attachments, voice input, and edit mode",
4
- "version": "1.2.0-dev.38",
4
+ "version": "1.2.0-dev.42",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -19,10 +19,10 @@
19
19
  "dependencies": {
20
20
  "react-window": "^2.2.7",
21
21
  "@tabler/icons-react": "^3.44.0",
22
- "@epam/ai-dial-attachment-input": "1.2.0-dev.38"
22
+ "@epam/ai-dial-attachment-input": "1.2.0-dev.42"
23
23
  },
24
24
  "peerDependencies": {
25
- "@epam/ai-dial-chat-shared": "1.2.0-dev.38",
25
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.42",
26
26
  "react": "^19.2.8",
27
27
  "react-dom": "^19.2.8",
28
28
  "@epam/ai-dial-ui-kit": "^0.14.2"