@assistant-ui/react 0.5.74 → 0.5.75

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.mjs CHANGED
@@ -605,20 +605,13 @@ var useActionBarReload = () => {
605
605
  // src/primitive-hooks/actionBar/useActionBarSpeak.tsx
606
606
  import { useCallback as useCallback6 } from "react";
607
607
  var useActionBarSpeak = () => {
608
- const messageStore = useMessageStore();
609
- const editComposerStore = useEditComposerStore();
610
608
  const messageRunime = useMessageRuntime();
611
- const messageUtilsStore = useMessageUtilsStore();
612
- const hasSpeakableContent = useCombinedStore(
613
- [messageStore, editComposerStore],
614
- (message, c) => {
615
- return !c.isEditing && (message.role !== "assistant" || message.status.type !== "running") && message.content.some((c2) => c2.type === "text" && c2.text.length > 0);
616
- }
617
- );
618
609
  const callback = useCallback6(async () => {
619
- const utt = messageRunime.speak();
620
- messageUtilsStore.getState().addUtterance(utt);
621
- }, [messageRunime, messageUtilsStore]);
610
+ messageRunime.speak();
611
+ }, [messageRunime]);
612
+ const hasSpeakableContent = useMessage((m) => {
613
+ return (m.role !== "assistant" || m.status.type !== "running") && m.content.some((c) => c.type === "text" && c.text.length > 0);
614
+ });
622
615
  if (!hasSpeakableContent) return null;
623
616
  return callback;
624
617
  };
@@ -626,11 +619,11 @@ var useActionBarSpeak = () => {
626
619
  // src/primitive-hooks/actionBar/useActionBarStopSpeaking.tsx
627
620
  import { useCallback as useCallback7 } from "react";
628
621
  var useActionBarStopSpeaking = () => {
629
- const messageUtilsStore = useMessageUtilsStore();
630
- const isSpeaking = useMessageUtils((u) => u.isSpeaking);
622
+ const messageRuntime = useMessageRuntime();
623
+ const isSpeaking = useMessage((u) => u.speech != null);
631
624
  const callback = useCallback7(async () => {
632
- messageUtilsStore.getState().stopSpeaking();
633
- }, [messageUtilsStore]);
625
+ messageRuntime.stopSpeaking();
626
+ }, [messageRuntime]);
634
627
  if (!isSpeaking) return null;
635
628
  return callback;
636
629
  };
@@ -810,7 +803,7 @@ var useMessageIf = (props) => {
810
803
  const messageUtilsStore = useMessageUtilsStore();
811
804
  return useCombinedStore(
812
805
  [messageStore, messageUtilsStore],
813
- ({ role, attachments, branchCount, isLast }, { isCopied, isHovering, isSpeaking, submittedFeedback }) => {
806
+ ({ role, attachments, branchCount, isLast, speech }, { isCopied, isHovering, submittedFeedback }) => {
814
807
  if (props.hasBranches === true && branchCount < 2) return false;
815
808
  if (props.user && role !== "user") return false;
816
809
  if (props.assistant && role !== "assistant") return false;
@@ -818,8 +811,8 @@ var useMessageIf = (props) => {
818
811
  if (props.lastOrHover === true && !isHovering && !isLast) return false;
819
812
  if (props.copied === true && !isCopied) return false;
820
813
  if (props.copied === false && isCopied) return false;
821
- if (props.speaking === true && !isSpeaking) return false;
822
- if (props.speaking === false && isSpeaking) return false;
814
+ if (props.speaking === true && speech == null) return false;
815
+ if (props.speaking === false && speech != null) return false;
823
816
  if (props.hasAttachments === true && (role !== "user" || !attachments.length))
824
817
  return false;
825
818
  if (props.hasAttachments === false && role === "user" && !!attachments.length)
@@ -1348,7 +1341,7 @@ __export(branchPicker_exports, {
1348
1341
  Count: () => BranchPickerPrimitiveCount,
1349
1342
  Next: () => BranchPickerPrimitiveNext,
1350
1343
  Number: () => BranchPickerPrimitiveNumber,
1351
- Previous: () => BranchPickerPrevious,
1344
+ Previous: () => BranchPickerPrimitivePrevious,
1352
1345
  Root: () => BranchPickerPrimitiveRoot
1353
1346
  });
1354
1347
 
@@ -1359,7 +1352,7 @@ var BranchPickerPrimitiveNext = createActionButton(
1359
1352
  );
1360
1353
 
1361
1354
  // src/primitives/branchPicker/BranchPickerPrevious.tsx
1362
- var BranchPickerPrevious = createActionButton(
1355
+ var BranchPickerPrimitivePrevious = createActionButton(
1363
1356
  "BranchPickerPrimitive.Previous",
1364
1357
  useBranchPickerPrevious
1365
1358
  );
@@ -2173,6 +2166,16 @@ var MessageRuntimeImpl = class {
2173
2166
  if (!state) throw new Error("Message is not available");
2174
2167
  return this._threadBinding.getState().speak(state.id);
2175
2168
  }
2169
+ stopSpeaking() {
2170
+ const state = this._core.getState();
2171
+ if (!state) throw new Error("Message is not available");
2172
+ const thread = this._threadBinding.getState();
2173
+ if (thread.speech?.messageId === state.id) {
2174
+ this._threadBinding.getState().stopSpeaking();
2175
+ } else {
2176
+ throw new Error("Message is not being spoken");
2177
+ }
2178
+ }
2176
2179
  submitFeedback({ type }) {
2177
2180
  const state = this._core.getState();
2178
2181
  if (!state) throw new Error("Message is not available");
@@ -2817,7 +2820,6 @@ import { create as create10 } from "zustand";
2817
2820
  // src/context/stores/MessageUtils.ts
2818
2821
  import { create as create9 } from "zustand";
2819
2822
  var makeMessageUtilsStore = () => create9((set) => {
2820
- let utterance = null;
2821
2823
  return {
2822
2824
  isCopied: false,
2823
2825
  setIsCopied: (value) => {
@@ -2827,17 +2829,6 @@ var makeMessageUtilsStore = () => create9((set) => {
2827
2829
  setIsHovering: (value) => {
2828
2830
  set({ isHovering: value });
2829
2831
  },
2830
- isSpeaking: false,
2831
- stopSpeaking: () => {
2832
- utterance?.cancel();
2833
- },
2834
- addUtterance: (utt) => {
2835
- utterance = utt;
2836
- set({ isSpeaking: true });
2837
- utt.onEnd(() => {
2838
- set({ isSpeaking: false });
2839
- });
2840
- },
2841
2832
  submittedFeedback: null,
2842
2833
  setSubmittedFeedback: (feedback) => {
2843
2834
  set({ submittedFeedback: feedback });
@@ -3571,7 +3562,8 @@ var getThreadState = (runtime) => {
3571
3562
  isRunning: lastMessage?.role !== "assistant" ? false : lastMessage.status.type === "running",
3572
3563
  messages: runtime.messages,
3573
3564
  suggestions: runtime.suggestions,
3574
- extras: runtime.extras
3565
+ extras: runtime.extras,
3566
+ speech: runtime.speech
3575
3567
  });
3576
3568
  };
3577
3569
  var ThreadRuntimeImpl = class {
@@ -3618,6 +3610,12 @@ var ThreadRuntimeImpl = class {
3618
3610
  get messages() {
3619
3611
  return this._threadBinding.getState().messages;
3620
3612
  }
3613
+ /**
3614
+ * @deprecated Use `getState().speechState` instead. This will be removed in 0.6.0.
3615
+ */
3616
+ get speech() {
3617
+ return this._threadBinding.getState().speech;
3618
+ }
3621
3619
  unstable_getCore() {
3622
3620
  return this._threadBinding.getState();
3623
3621
  }
@@ -3678,15 +3676,18 @@ var ThreadRuntimeImpl = class {
3678
3676
  switchToBranch(branchId) {
3679
3677
  return this._threadBinding.getState().switchToBranch(branchId);
3680
3678
  }
3681
- // /**
3682
- // * @deprecated Use `getMesssageById(id).speak()` instead. This will be removed in 0.6.0.
3683
- // */
3679
+ /**
3680
+ * @deprecated Use `getMesssageById(id).speak()` instead. This will be removed in 0.6.0.
3681
+ */
3684
3682
  speak(messageId) {
3685
3683
  return this._threadBinding.getState().speak(messageId);
3686
3684
  }
3687
- // /**
3688
- // * @deprecated Use `getMesssageById(id).submitFeedback({ type })` instead. This will be removed in 0.6.0.
3689
- // */
3685
+ stopSpeaking() {
3686
+ return this._threadBinding.getState().stopSpeaking();
3687
+ }
3688
+ /**
3689
+ * @deprecated Use `getMesssageById(id).submitFeedback({ type })` instead. This will be removed in 0.6.0.
3690
+ */
3690
3691
  submitFeedback(options) {
3691
3692
  return this._threadBinding.getState().submitFeedback(options);
3692
3693
  }
@@ -3713,7 +3714,7 @@ var ThreadRuntimeImpl = class {
3713
3714
  return new MessageRuntimeImpl(
3714
3715
  new ShallowMemoizeSubject({
3715
3716
  getState: () => {
3716
- const messages2 = this.getState().messages;
3717
+ const { messages: messages2, speech: speechState } = this.getState();
3717
3718
  const message = messages2[idx];
3718
3719
  if (!message) return SKIP_UPDATE;
3719
3720
  const branches = this._threadBinding.getState().getBranches(message.id);
@@ -3724,7 +3725,8 @@ var ThreadRuntimeImpl = class {
3724
3725
  parentId: messages2[idx - 1]?.id ?? null,
3725
3726
  branches,
3726
3727
  branchNumber: branches.indexOf(message.id) + 1,
3727
- branchCount: branches.length
3728
+ branchCount: branches.length,
3729
+ speech: speechState?.messageId === message.id ? speechState : null
3728
3730
  };
3729
3731
  },
3730
3732
  subscribe: (callback) => this._threadBinding.subscribe(callback)
@@ -4364,24 +4366,35 @@ var LocalThreadRuntimeCore = class {
4364
4366
  this.performRoundtrip(parentId, message);
4365
4367
  }
4366
4368
  }
4367
- // TODO lift utterance state to thread runtime
4368
- _utterance;
4369
+ // TODO speech runtime?
4370
+ _stopSpeaking;
4371
+ speech = null;
4369
4372
  speak(messageId) {
4370
4373
  const adapter = this.options.adapters?.speech;
4371
4374
  if (!adapter) throw new Error("Speech adapter not configured");
4372
4375
  const { message } = this.repository.getMessage(messageId);
4373
- if (this._utterance) {
4374
- this._utterance.cancel();
4375
- this._utterance = void 0;
4376
- }
4376
+ this._stopSpeaking?.();
4377
4377
  const utterance = adapter.speak(message);
4378
- utterance.onEnd(() => {
4379
- if (this._utterance === utterance) {
4380
- this._utterance = void 0;
4378
+ const unsub = utterance.subscribe(() => {
4379
+ if (utterance.status.type === "ended") {
4380
+ this._stopSpeaking = void 0;
4381
+ this.speech = null;
4382
+ } else {
4383
+ this.speech = { messageId, status: utterance.status };
4381
4384
  }
4385
+ this.notifySubscribers();
4382
4386
  });
4383
- this._utterance = utterance;
4384
- return this._utterance;
4387
+ this.speech = { messageId, status: utterance.status };
4388
+ this._stopSpeaking = () => {
4389
+ utterance.cancel();
4390
+ unsub();
4391
+ this.speech = null;
4392
+ this._stopSpeaking = void 0;
4393
+ };
4394
+ }
4395
+ stopSpeaking() {
4396
+ if (!this._stopSpeaking) throw new Error("No message is being spoken");
4397
+ this._stopSpeaking();
4385
4398
  }
4386
4399
  submitFeedback({ messageId, type }) {
4387
4400
  const adapter = this.options.adapters?.feedback;
@@ -4740,11 +4753,38 @@ var ExternalStoreThreadRuntimeCore = class {
4740
4753
  throw new Error("Runtime does not support tool results.");
4741
4754
  this._store.onAddToolResult(options);
4742
4755
  }
4756
+ // TODO speech runtime?
4757
+ _stopSpeaking;
4758
+ speech = null;
4743
4759
  speak(messageId) {
4744
- if (!this._store.onSpeak)
4745
- throw new Error("Runtime does not support speaking.");
4760
+ let adapter = this.store.adapters?.speech;
4761
+ if (!adapter && this.store.onSpeak) {
4762
+ adapter = { speak: this.store.onSpeak };
4763
+ }
4764
+ if (!adapter) throw new Error("Speech adapter not configured");
4746
4765
  const { message } = this.repository.getMessage(messageId);
4747
- return this._store.onSpeak(message);
4766
+ this._stopSpeaking?.();
4767
+ const utterance = adapter.speak(message);
4768
+ const unsub = utterance.subscribe(() => {
4769
+ if (utterance.status.type === "ended") {
4770
+ this._stopSpeaking = void 0;
4771
+ this.speech = null;
4772
+ } else {
4773
+ this.speech = { messageId, status: utterance.status };
4774
+ }
4775
+ this.notifySubscribers();
4776
+ });
4777
+ this.speech = { messageId, status: utterance.status };
4778
+ this._stopSpeaking = () => {
4779
+ utterance.cancel();
4780
+ unsub();
4781
+ this.speech = null;
4782
+ this._stopSpeaking = void 0;
4783
+ };
4784
+ }
4785
+ stopSpeaking() {
4786
+ if (!this._stopSpeaking) throw new Error("No message is being spoken");
4787
+ this._stopSpeaking();
4748
4788
  }
4749
4789
  submitFeedback({ messageId, type }) {
4750
4790
  const adapter = this._store.adapters?.feedback;
@@ -5011,11 +5051,11 @@ var WebSpeechSynthesisAdapter = class {
5011
5051
  speak(message) {
5012
5052
  const text = getThreadMessageText(message);
5013
5053
  const utterance = new SpeechSynthesisUtterance(text);
5014
- const endHandlers = /* @__PURE__ */ new Set();
5054
+ const subscribers = /* @__PURE__ */ new Set();
5015
5055
  const handleEnd = (reason, error) => {
5016
5056
  if (res.status.type === "ended") return;
5017
5057
  res.status = { type: "ended", reason, error };
5018
- endHandlers.forEach((handler) => handler());
5058
+ subscribers.forEach((handler) => handler());
5019
5059
  };
5020
5060
  utterance.addEventListener("end", () => handleEnd("finished"));
5021
5061
  utterance.addEventListener("error", (e) => handleEnd("error", e.error));
@@ -5026,7 +5066,7 @@ var WebSpeechSynthesisAdapter = class {
5026
5066
  window.speechSynthesis.cancel();
5027
5067
  handleEnd("cancelled");
5028
5068
  },
5029
- onEnd: (callback) => {
5069
+ subscribe: (callback) => {
5030
5070
  if (res.status.type === "ended") {
5031
5071
  let cancelled = false;
5032
5072
  queueMicrotask(() => {
@@ -5036,9 +5076,9 @@ var WebSpeechSynthesisAdapter = class {
5036
5076
  cancelled = true;
5037
5077
  };
5038
5078
  } else {
5039
- endHandlers.add(callback);
5079
+ subscribers.add(callback);
5040
5080
  return () => {
5041
- endHandlers.delete(callback);
5081
+ subscribers.delete(callback);
5042
5082
  };
5043
5083
  }
5044
5084
  }
@@ -5288,13 +5328,13 @@ var AssistantActionBarRoot = withDefaults(actionBar_exports.Root, {
5288
5328
  className: "aui-assistant-action-bar-root"
5289
5329
  });
5290
5330
  AssistantActionBarRoot.displayName = "AssistantActionBarRoot";
5291
- var AssistantActionBarCopy = forwardRef24((props, ref) => {
5331
+ var AssistantActionBarCopy = forwardRef24(({ copiedDuration, ...props }, ref) => {
5292
5332
  const {
5293
5333
  strings: {
5294
5334
  assistantMessage: { copy: { tooltip = "Copy" } = {} } = {}
5295
5335
  } = {}
5296
5336
  } = useThreadConfig();
5297
- return /* @__PURE__ */ jsx39(actionBar_exports.Copy, { asChild: true, children: /* @__PURE__ */ jsx39(TooltipIconButton, { tooltip, ...props, ref, children: props.children ?? /* @__PURE__ */ jsxs4(Fragment5, { children: [
5337
+ return /* @__PURE__ */ jsx39(actionBar_exports.Copy, { copiedDuration, asChild: true, children: /* @__PURE__ */ jsx39(TooltipIconButton, { tooltip, ...props, ref, children: props.children ?? /* @__PURE__ */ jsxs4(Fragment5, { children: [
5298
5338
  /* @__PURE__ */ jsx39(message_exports.If, { copied: true, children: /* @__PURE__ */ jsx39(CheckIcon, {}) }),
5299
5339
  /* @__PURE__ */ jsx39(message_exports.If, { copied: false, children: /* @__PURE__ */ jsx39(CopyIcon, {}) })
5300
5340
  ] }) }) });
@@ -5409,7 +5449,7 @@ var BranchPicker = () => {
5409
5449
  const allowBranchPicker = useAllowBranchPicker(true);
5410
5450
  if (!allowBranchPicker) return null;
5411
5451
  return /* @__PURE__ */ jsxs5(BranchPickerRoot, { hideWhenSingleBranch: true, children: [
5412
- /* @__PURE__ */ jsx40(BranchPickerPrevious2, {}),
5452
+ /* @__PURE__ */ jsx40(BranchPickerPrevious, {}),
5413
5453
  /* @__PURE__ */ jsx40(BranchPickerState, {}),
5414
5454
  /* @__PURE__ */ jsx40(BranchPickerNext, {})
5415
5455
  ] });
@@ -5419,7 +5459,7 @@ var BranchPickerRoot = withDefaults(branchPicker_exports.Root, {
5419
5459
  className: "aui-branch-picker-root"
5420
5460
  });
5421
5461
  BranchPickerRoot.displayName = "BranchPickerRoot";
5422
- var BranchPickerPrevious2 = forwardRef25((props, ref) => {
5462
+ var BranchPickerPrevious = forwardRef25((props, ref) => {
5423
5463
  const {
5424
5464
  strings: {
5425
5465
  branchPicker: { previous: { tooltip = "Previous" } = {} } = {}
@@ -5428,7 +5468,7 @@ var BranchPickerPrevious2 = forwardRef25((props, ref) => {
5428
5468
  const allowBranchPicker = useAllowBranchPicker();
5429
5469
  return /* @__PURE__ */ jsx40(branchPicker_exports.Previous, { disabled: !allowBranchPicker, asChild: true, children: /* @__PURE__ */ jsx40(TooltipIconButton, { tooltip, ...props, ref, children: props.children ?? /* @__PURE__ */ jsx40(ChevronLeftIcon, {}) }) });
5430
5470
  });
5431
- BranchPickerPrevious2.displayName = "BranchPickerPrevious";
5471
+ BranchPickerPrevious.displayName = "BranchPickerPrevious";
5432
5472
  var BranchPickerStateWrapper = withDefaults("span", {
5433
5473
  className: "aui-branch-picker-state"
5434
5474
  });
@@ -5450,7 +5490,7 @@ var BranchPickerNext = forwardRef25((props, ref) => {
5450
5490
  BranchPickerNext.displayName = "BranchPickerNext";
5451
5491
  var exports2 = {
5452
5492
  Root: BranchPickerRoot,
5453
- Previous: BranchPickerPrevious2,
5493
+ Previous: BranchPickerPrevious,
5454
5494
  Next: BranchPickerNext
5455
5495
  };
5456
5496
  var branch_picker_default = Object.assign(BranchPicker, exports2);
@@ -5720,23 +5760,27 @@ var ComposerSendButton = withDefaults(TooltipIconButton, {
5720
5760
  variant: "default",
5721
5761
  className: "aui-composer-send"
5722
5762
  });
5723
- var ComposerSend = forwardRef28((props, ref) => {
5724
- const {
5725
- strings: { composer: { send: { tooltip = "Send" } = {} } = {} } = {}
5726
- } = useThreadConfig();
5727
- return /* @__PURE__ */ jsx46(composer_exports.Send, { asChild: true, children: /* @__PURE__ */ jsx46(ComposerSendButton, { tooltip, ...props, ref, children: props.children ?? /* @__PURE__ */ jsx46(SendHorizontalIcon, {}) }) });
5728
- });
5763
+ var ComposerSend = forwardRef28(
5764
+ (props, ref) => {
5765
+ const {
5766
+ strings: { composer: { send: { tooltip = "Send" } = {} } = {} } = {}
5767
+ } = useThreadConfig();
5768
+ return /* @__PURE__ */ jsx46(composer_exports.Send, { asChild: true, children: /* @__PURE__ */ jsx46(ComposerSendButton, { tooltip, ...props, ref, children: props.children ?? /* @__PURE__ */ jsx46(SendHorizontalIcon, {}) }) });
5769
+ }
5770
+ );
5729
5771
  ComposerSend.displayName = "ComposerSend";
5730
5772
  var ComposerCancelButton = withDefaults(TooltipIconButton, {
5731
5773
  variant: "default",
5732
5774
  className: "aui-composer-cancel"
5733
5775
  });
5734
- var ComposerCancel = forwardRef28((props, ref) => {
5735
- const {
5736
- strings: { composer: { cancel: { tooltip = "Cancel" } = {} } = {} } = {}
5737
- } = useThreadConfig();
5738
- return /* @__PURE__ */ jsx46(composer_exports.Cancel, { asChild: true, children: /* @__PURE__ */ jsx46(ComposerCancelButton, { tooltip, ...props, ref, children: props.children ?? /* @__PURE__ */ jsx46(CircleStopIcon, {}) }) });
5739
- });
5776
+ var ComposerCancel = forwardRef28(
5777
+ (props, ref) => {
5778
+ const {
5779
+ strings: { composer: { cancel: { tooltip = "Cancel" } = {} } = {} } = {}
5780
+ } = useThreadConfig();
5781
+ return /* @__PURE__ */ jsx46(composer_exports.Cancel, { asChild: true, children: /* @__PURE__ */ jsx46(ComposerCancelButton, { tooltip, ...props, ref, children: props.children ?? /* @__PURE__ */ jsx46(CircleStopIcon, {}) }) });
5782
+ }
5783
+ );
5740
5784
  ComposerCancel.displayName = "ComposerCancel";
5741
5785
  var exports6 = {
5742
5786
  Root: ComposerRoot,
@@ -5768,11 +5812,9 @@ var ThreadWelcomeRootStyled = withDefaults("div", {
5768
5812
  var ThreadWelcomeCenter = withDefaults("div", {
5769
5813
  className: "aui-thread-welcome-center"
5770
5814
  });
5771
- var ThreadWelcomeRoot = forwardRef29(
5772
- (props, ref) => {
5773
- return /* @__PURE__ */ jsx47(thread_exports.Empty, { children: /* @__PURE__ */ jsx47(ThreadWelcomeRootStyled, { ...props, ref }) });
5774
- }
5775
- );
5815
+ var ThreadWelcomeRoot = forwardRef29((props, ref) => {
5816
+ return /* @__PURE__ */ jsx47(thread_exports.Empty, { children: /* @__PURE__ */ jsx47(ThreadWelcomeRootStyled, { ...props, ref }) });
5817
+ });
5776
5818
  ThreadWelcomeRoot.displayName = "ThreadWelcomeRoot";
5777
5819
  var ThreadWelcomeAvatar = () => {
5778
5820
  const { assistantAvatar: avatar = { fallback: "A" } } = useThreadConfig();
@@ -5889,19 +5931,17 @@ UserMessageRoot.displayName = "UserMessageRoot";
5889
5931
  var UserMessageContentWrapper = withDefaults("div", {
5890
5932
  className: "aui-user-message-content"
5891
5933
  });
5892
- var UserMessageContent = forwardRef31(
5893
- ({ components, ...props }, ref) => {
5894
- return /* @__PURE__ */ jsx50(UserMessageContentWrapper, { ...props, ref, children: /* @__PURE__ */ jsx50(
5895
- message_exports.Content,
5896
- {
5897
- components: {
5898
- ...components,
5899
- Text: components?.Text ?? content_part_default.Text
5900
- }
5934
+ var UserMessageContent = forwardRef31(({ components, ...props }, ref) => {
5935
+ return /* @__PURE__ */ jsx50(UserMessageContentWrapper, { ...props, ref, children: /* @__PURE__ */ jsx50(
5936
+ message_exports.Content,
5937
+ {
5938
+ components: {
5939
+ ...components,
5940
+ Text: components?.Text ?? content_part_default.Text
5901
5941
  }
5902
- ) });
5903
- }
5904
- );
5942
+ }
5943
+ ) });
5944
+ });
5905
5945
  UserMessageContent.displayName = "UserMessageContent";
5906
5946
  var UserMessageAttachmentsContainer = withDefaults("div", {
5907
5947
  className: "aui-user-message-attachments"
@@ -5951,25 +5991,19 @@ var EditComposerFooter = withDefaults("div", {
5951
5991
  className: "aui-edit-composer-footer"
5952
5992
  });
5953
5993
  EditComposerFooter.displayName = "EditComposerFooter";
5954
- var EditComposerCancel = forwardRef32(
5955
- (props, ref) => {
5956
- const {
5957
- strings: {
5958
- editComposer: { cancel: { label = "Cancel" } = {} } = {}
5959
- } = {}
5960
- } = useThreadConfig();
5961
- return /* @__PURE__ */ jsx51(composer_exports.Cancel, { asChild: true, children: /* @__PURE__ */ jsx51(Button, { variant: "ghost", ...props, ref, children: props.children ?? label }) });
5962
- }
5963
- );
5994
+ var EditComposerCancel = forwardRef32((props, ref) => {
5995
+ const {
5996
+ strings: { editComposer: { cancel: { label = "Cancel" } = {} } = {} } = {}
5997
+ } = useThreadConfig();
5998
+ return /* @__PURE__ */ jsx51(composer_exports.Cancel, { asChild: true, children: /* @__PURE__ */ jsx51(Button, { variant: "ghost", ...props, ref, children: props.children ?? label }) });
5999
+ });
5964
6000
  EditComposerCancel.displayName = "EditComposerCancel";
5965
- var EditComposerSend = forwardRef32(
5966
- (props, ref) => {
5967
- const {
5968
- strings: { editComposer: { send: { label = "Send" } = {} } = {} } = {}
5969
- } = useThreadConfig();
5970
- return /* @__PURE__ */ jsx51(composer_exports.Send, { asChild: true, children: /* @__PURE__ */ jsx51(Button, { ...props, ref, children: props.children ?? label }) });
5971
- }
5972
- );
6001
+ var EditComposerSend = forwardRef32((props, ref) => {
6002
+ const {
6003
+ strings: { editComposer: { send: { label = "Send" } = {} } = {} } = {}
6004
+ } = useThreadConfig();
6005
+ return /* @__PURE__ */ jsx51(composer_exports.Send, { asChild: true, children: /* @__PURE__ */ jsx51(Button, { ...props, ref, children: props.children ?? label }) });
6006
+ });
5973
6007
  EditComposerSend.displayName = "EditComposerSend";
5974
6008
  var exports11 = {
5975
6009
  Root: EditComposerRoot,
@@ -6081,7 +6115,10 @@ var AssistantModal = (config) => {
6081
6115
  ] });
6082
6116
  };
6083
6117
  AssistantModal.displayName = "AssistantModal";
6084
- var AssistantModalRoot = ({ config, ...props }) => {
6118
+ var AssistantModalRoot = ({
6119
+ config,
6120
+ ...props
6121
+ }) => {
6085
6122
  return /* @__PURE__ */ jsx53(ThreadConfigProvider, { config, children: /* @__PURE__ */ jsx53(assistantModal_exports.Root, { ...props }) });
6086
6123
  };
6087
6124
  AssistantModalRoot.displayName = "AssistantModalRoot";