@assistant-ui/react 0.5.63 → 0.5.66

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.mts CHANGED
@@ -42,25 +42,6 @@ type ToolCallContentPartComponent<TArgs extends Record<string, unknown> = any, T
42
42
 
43
43
  type Unsubscribe = () => void;
44
44
 
45
- type ReadonlyStore<T> = Omit<StoreApi<T>, "setState" | "destroy">;
46
-
47
- type ThreadState$1 = Readonly<{
48
- capabilities: Readonly<RuntimeCapabilities>;
49
- threadId: string;
50
- isRunning: boolean;
51
- isDisabled: boolean;
52
- }>;
53
- type RuntimeCapabilities = {
54
- switchToBranch: boolean;
55
- edit: boolean;
56
- reload: boolean;
57
- cancel: boolean;
58
- unstable_copy: boolean;
59
- speak: boolean;
60
- attachments: boolean;
61
- feedback: boolean;
62
- };
63
-
64
45
  declare namespace SpeechSynthesisAdapter {
65
46
  type Status = {
66
47
  type: "starting" | "running";
@@ -115,14 +96,26 @@ type ThreadComposerRuntimeCore = Readonly<{
115
96
  attachments: ThreadComposerAttachment[];
116
97
  addAttachment: (file: File) => Promise<void>;
117
98
  removeAttachment: (attachmentId: string) => Promise<void>;
99
+ canCancel: boolean;
118
100
  isEmpty: boolean;
119
101
  text: string;
120
102
  setText: (value: string) => void;
121
103
  reset: () => void;
122
104
  send: () => void;
105
+ cancel: () => void;
123
106
  subscribe: (callback: () => void) => Unsubscribe;
124
107
  }>;
125
108
 
109
+ type RuntimeCapabilities = Readonly<{
110
+ switchToBranch: boolean;
111
+ edit: boolean;
112
+ reload: boolean;
113
+ cancel: boolean;
114
+ unstable_copy: boolean;
115
+ speak: boolean;
116
+ attachments: boolean;
117
+ feedback: boolean;
118
+ }>;
126
119
  type AddToolResultOptions = {
127
120
  messageId: string;
128
121
  toolName: string;
@@ -226,10 +219,16 @@ declare class BaseThreadComposerRuntimeCore implements ThreadComposerRuntimeCore
226
219
  private _attachmentAdapter?;
227
220
  attachmentAccept: string;
228
221
  get isEmpty(): boolean;
222
+ private _canCancel;
223
+ get canCancel(): boolean;
229
224
  constructor(runtime: {
225
+ capabilities: Readonly<RuntimeCapabilities>;
230
226
  messages: ThreadRuntimeCore["messages"];
231
227
  append: (message: AppendMessage) => void;
228
+ cancelRun: () => void;
229
+ subscribe: (callback: () => void) => Unsubscribe;
232
230
  });
231
+ connect(): Unsubscribe;
233
232
  setAttachmentAdapter(adapter: AttachmentAdapter | undefined): boolean;
234
233
  private _attachments;
235
234
  get attachments(): ThreadComposerAttachment[];
@@ -240,6 +239,7 @@ declare class BaseThreadComposerRuntimeCore implements ThreadComposerRuntimeCore
240
239
  setText(value: string): void;
241
240
  reset(): void;
242
241
  send(): Promise<void>;
242
+ cancel(): Promise<void>;
243
243
  private _subscriptions;
244
244
  private notifySubscribers;
245
245
  subscribe(callback: () => void): Unsubscribe;
@@ -493,7 +493,10 @@ declare class ContentPartRuntime {
493
493
  addToolResult(result: any): void;
494
494
  }
495
495
 
496
- type MessageSnapshot = {
496
+ type MessageState = ThreadMessage & {
497
+ /**
498
+ * @deprecated You can directly access message fields in the state. Replace `.message.content` with `.content` etc. This will be removed in 0.6.0.
499
+ */
497
500
  message: ThreadMessage;
498
501
  parentId: string | null;
499
502
  isLast: boolean;
@@ -504,19 +507,12 @@ type MessageSnapshot = {
504
507
  branchNumber: number;
505
508
  branchCount: number;
506
509
  };
507
- type MessageSnapshotBinding = SubscribableWithState<MessageSnapshot>;
508
- type MessageState$1 = ThreadMessage & MessageSnapshot & {
509
- /**
510
- * @deprecated You can directly access message fields in the state. Replace `.message.content` with `.content` etc. This will be removed in 0.6.0.
511
- */
512
- message: ThreadMessage;
513
- };
514
- declare const MessageState$1: new (snapshot: MessageSnapshot) => MessageState$1;
510
+ type MessageSnapshotBinding = SubscribableWithState<MessageState>;
515
511
  declare class MessageRuntime {
516
512
  private _core;
517
513
  private _threadBinding;
518
514
  constructor(_core: MessageSnapshotBinding, _threadBinding: ThreadRuntimeCoreBinding);
519
- getState(): MessageState$1;
515
+ getState(): MessageState;
520
516
  edit(message: Omit<AppendMessage, "parentId">): void;
521
517
  reload(): void;
522
518
  speak(): void;
@@ -532,14 +528,13 @@ declare class MessageRuntime {
532
528
  }
533
529
 
534
530
  type ThreadComposerRuntimeCoreBinding = SubscribableWithState<ThreadComposerRuntimeCore>;
535
- declare class ComposerState {
536
- private _composerBinding;
537
- constructor(_composerBinding: ThreadComposerRuntimeCoreBinding);
538
- get isEmpty(): boolean;
539
- get text(): string;
540
- get attachmentAccept(): string;
541
- get attachments(): ThreadComposerAttachment[];
542
- }
531
+ type UnstableThreadComposerStateV2 = Readonly<{
532
+ isEmpty: boolean;
533
+ text: string;
534
+ attachments: readonly ThreadComposerAttachment[];
535
+ attachmentAccept: string;
536
+ canCancel: boolean;
537
+ }>;
543
538
  declare class ThreadComposerRuntime implements ThreadComposerRuntimeCore {
544
539
  private _core;
545
540
  constructor(_core: ThreadComposerRuntimeCoreBinding);
@@ -547,6 +542,10 @@ declare class ThreadComposerRuntime implements ThreadComposerRuntimeCore {
547
542
  * @deprecated Use `getState().isEmpty` instead. This will be removed in 0.6.0.
548
543
  */
549
544
  get isEmpty(): boolean;
545
+ /**
546
+ * @deprecated Use `getState().canCancel` instead. This will be removed in 0.6.0.
547
+ */
548
+ get canCancel(): boolean;
550
549
  /**
551
550
  * @deprecated Use `getState().text` instead. This will be removed in 0.6.0.
552
551
  */
@@ -559,8 +558,13 @@ declare class ThreadComposerRuntime implements ThreadComposerRuntimeCore {
559
558
  * @deprecated Use `getState().attachments` instead. This will be removed in 0.6.0.
560
559
  */
561
560
  get attachments(): ThreadComposerAttachment[];
562
- private _state;
563
- getState(): ComposerState;
561
+ getState(): Readonly<{
562
+ isEmpty: boolean;
563
+ text: string;
564
+ attachments: readonly ThreadComposerAttachment[];
565
+ attachmentAccept: string;
566
+ canCancel: boolean;
567
+ }>;
564
568
  setText(text: string): void;
565
569
  addAttachment(file: File): Promise<void>;
566
570
  removeAttachment(attachmentId: string): Promise<void>;
@@ -569,18 +573,23 @@ declare class ThreadComposerRuntime implements ThreadComposerRuntimeCore {
569
573
  */
570
574
  reset(): void;
571
575
  send(): void;
576
+ cancel(): void;
572
577
  subscribe(callback: () => void): Unsubscribe;
573
578
  }
574
579
 
580
+ type CreateAppendMessage = string | {
581
+ parentId?: string | null | undefined;
582
+ role?: AppendMessage["role"] | undefined;
583
+ content: AppendMessage["content"];
584
+ attachments?: AppendMessage["attachments"] | undefined;
585
+ };
575
586
  type ThreadRuntimeCoreBinding = SubscribableWithState<ThreadRuntimeCore>;
576
- declare class ThreadState {
577
- private _core;
578
- constructor(_core: ThreadRuntimeCore);
579
- get threadId(): string;
580
- get isDisabled(): boolean;
581
- get isRunning(): boolean;
582
- get capabilities(): Readonly<RuntimeCapabilities>;
583
- }
587
+ type ThreadState = Readonly<{
588
+ threadId: string;
589
+ isDisabled: boolean;
590
+ isRunning: boolean;
591
+ capabilities: RuntimeCapabilities;
592
+ }>;
584
593
  declare class ThreadRuntime implements ThreadRuntimeCore {
585
594
  private _threadBinding;
586
595
  /**
@@ -598,7 +607,16 @@ declare class ThreadRuntime implements ThreadRuntimeCore {
598
607
  /**
599
608
  * @deprecated Use `getState().capabilities` instead. This will be removed in 0.6.0.
600
609
  */
601
- get capabilities(): Readonly<RuntimeCapabilities>;
610
+ get capabilities(): Readonly<{
611
+ switchToBranch: boolean;
612
+ edit: boolean;
613
+ reload: boolean;
614
+ cancel: boolean;
615
+ unstable_copy: boolean;
616
+ speak: boolean;
617
+ attachments: boolean;
618
+ feedback: boolean;
619
+ }>;
602
620
  get messages(): readonly ThreadMessage[];
603
621
  unstable_getCore(): Readonly<{
604
622
  getBranches: (messageId: string) => readonly string[];
@@ -621,8 +639,13 @@ declare class ThreadRuntime implements ThreadRuntimeCore {
621
639
  }>;
622
640
  constructor(_threadBinding: ThreadRuntimeCoreBinding);
623
641
  readonly composer: ThreadComposerRuntime;
624
- getState(): ThreadState;
625
- append(message: AppendMessage): void;
642
+ getState(): Readonly<{
643
+ threadId: string;
644
+ isDisabled: boolean;
645
+ isRunning: boolean;
646
+ capabilities: RuntimeCapabilities;
647
+ }>;
648
+ append(message: CreateAppendMessage): void;
626
649
  subscribe(callback: () => void): Unsubscribe;
627
650
  getBranches(messageId: string): readonly string[];
628
651
  getModelConfig(): ModelConfig;
@@ -654,125 +677,6 @@ declare class AssistantRuntime<TThreadRuntime extends ThreadRuntime = ThreadRunt
654
677
  subscribe(callback: () => void): Unsubscribe;
655
678
  }
656
679
 
657
- declare class ProxyConfigProvider implements ModelConfigProvider {
658
- private _providers;
659
- getModelConfig(): ModelConfig;
660
- registerModelConfigProvider(provider: ModelConfigProvider): () => void;
661
- }
662
-
663
- type TextContentPartState = Readonly<{
664
- status: ContentPartStatus;
665
- part: TextContentPart;
666
- }>;
667
- type ContentPartState = Readonly<{
668
- status: ContentPartStatus | ToolCallContentPartStatus;
669
- part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
670
- }>;
671
-
672
- declare const useSmooth: (state: TextContentPartState, smooth?: boolean) => TextContentPartState;
673
-
674
- declare const withSmoothContextProvider: <C extends React.ComponentType<any>>(Component: C) => C;
675
- declare const useSmoothStatus: {
676
- (): {
677
- type: "running";
678
- } | {
679
- type: "complete";
680
- } | {
681
- type: "incomplete";
682
- reason: "cancelled" | "length" | "content-filter" | "other" | "error";
683
- error?: unknown;
684
- } | {
685
- type: "requires-action";
686
- reason: "tool-calls";
687
- };
688
- <TSelected>(selector: (state: {
689
- type: "running";
690
- } | {
691
- type: "complete";
692
- } | {
693
- type: "incomplete";
694
- reason: "cancelled" | "length" | "content-filter" | "other" | "error";
695
- error?: unknown;
696
- } | {
697
- type: "requires-action";
698
- reason: "tool-calls";
699
- }) => TSelected): TSelected;
700
- (options: {
701
- optional: true;
702
- }): {
703
- type: "running";
704
- } | {
705
- type: "complete";
706
- } | {
707
- type: "incomplete";
708
- reason: "cancelled" | "length" | "content-filter" | "other" | "error";
709
- error?: unknown;
710
- } | {
711
- type: "requires-action";
712
- reason: "tool-calls";
713
- } | null;
714
- <TSelected>(options: {
715
- optional: true;
716
- selector?: (state: {
717
- type: "running";
718
- } | {
719
- type: "complete";
720
- } | {
721
- type: "incomplete";
722
- reason: "cancelled" | "length" | "content-filter" | "other" | "error";
723
- error?: unknown;
724
- } | {
725
- type: "requires-action";
726
- reason: "tool-calls";
727
- }) => TSelected;
728
- }): TSelected | null;
729
- };
730
-
731
- declare const buttonVariants: (props?: ({
732
- variant?: "default" | "outline" | "ghost" | null | undefined;
733
- size?: "default" | "icon" | null | undefined;
734
- } & class_variance_authority_types.ClassProp) | undefined) => string;
735
- type ButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button> & VariantProps<typeof buttonVariants>;
736
-
737
- type TooltipIconButtonProps = ButtonProps & {
738
- tooltip: string;
739
- side?: "top" | "bottom" | "left" | "right";
740
- };
741
- declare const TooltipIconButton: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
742
- ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
743
- } & {
744
- asChild?: boolean;
745
- }, "ref"> & class_variance_authority.VariantProps<(props?: ({
746
- variant?: "default" | "outline" | "ghost" | null | undefined;
747
- size?: "default" | "icon" | null | undefined;
748
- } & class_variance_authority_types.ClassProp) | undefined) => string> & {
749
- tooltip: string;
750
- side?: "top" | "bottom" | "left" | "right";
751
- } & react.RefAttributes<HTMLButtonElement>>;
752
-
753
- declare const generateId: (size?: number) => string;
754
-
755
- type internal_AssistantRuntime<TThreadRuntime extends ThreadRuntime = ThreadRuntime> = AssistantRuntime<TThreadRuntime>;
756
- declare const internal_AssistantRuntime: typeof AssistantRuntime;
757
- type internal_BaseAssistantRuntimeCore<TThreadRuntime extends ReactThreadRuntimeCore> = BaseAssistantRuntimeCore<TThreadRuntime>;
758
- declare const internal_BaseAssistantRuntimeCore: typeof BaseAssistantRuntimeCore;
759
- type internal_MessageRepository = MessageRepository;
760
- declare const internal_MessageRepository: typeof MessageRepository;
761
- type internal_ProxyConfigProvider = ProxyConfigProvider;
762
- declare const internal_ProxyConfigProvider: typeof ProxyConfigProvider;
763
- type internal_ReactThreadRuntimeCore = ReactThreadRuntimeCore;
764
- type internal_ThreadRuntime = ThreadRuntime;
765
- declare const internal_ThreadRuntime: typeof ThreadRuntime;
766
- type internal_ThreadRuntimeCoreBinding = ThreadRuntimeCoreBinding;
767
- declare const internal_TooltipIconButton: typeof TooltipIconButton;
768
- declare const internal_generateId: typeof generateId;
769
- declare const internal_useSmooth: typeof useSmooth;
770
- declare const internal_useSmoothStatus: typeof useSmoothStatus;
771
- declare const internal_withSmoothContextProvider: typeof withSmoothContextProvider;
772
- declare namespace internal {
773
- export { internal_AssistantRuntime as AssistantRuntime, internal_BaseAssistantRuntimeCore as BaseAssistantRuntimeCore, BaseThreadComposerRuntimeCore as BaseThreadRuntimeComposerCore, internal_MessageRepository as MessageRepository, internal_ProxyConfigProvider as ProxyConfigProvider, type internal_ReactThreadRuntimeCore as ReactThreadRuntimeCore, internal_ThreadRuntime as ThreadRuntime, type internal_ThreadRuntimeCoreBinding as ThreadRuntimeCoreBinding, internal_TooltipIconButton as TooltipIconButton, internal_generateId as generateId, internal_useSmooth as useSmooth, internal_useSmoothStatus as useSmoothStatus, internal_withSmoothContextProvider as withSmoothContextProvider };
774
- }
775
-
776
680
  type AssistantRuntimeProviderProps = {
777
681
  runtime: AssistantRuntime;
778
682
  };
@@ -789,6 +693,79 @@ type AssistantToolUIsState = Readonly<{
789
693
  setToolUI: (toolName: string, render: ToolCallContentPartComponent) => () => void;
790
694
  }>;
791
695
 
696
+ type ThreadComposerState = Readonly<{
697
+ type: "thread";
698
+ /** @deprecated Use `text` instead. This will be removed in 0.6.0. */
699
+ value: string;
700
+ /** @deprecated Use `useComposerRuntime().setText` instead. This will be removed in 0.6.0. */
701
+ setValue: (value: string) => void;
702
+ attachmentAccept: string;
703
+ attachments: readonly ThreadComposerAttachment[];
704
+ /** @deprecated Use `useComposerRuntime().addAttachment` instead. This will be removed in 0.6.0. */
705
+ addAttachment: (file: File) => void;
706
+ /** @deprecated Use `useComposerRuntime().removeAttachment` instead. This will be removed in 0.6.0. */
707
+ removeAttachment: (attachmentId: string) => void;
708
+ text: string;
709
+ /** @deprecated Use `useComposerRuntime().setText` instead. This will be removed in 0.6.0. */
710
+ setText: (value: string) => void;
711
+ /** @deprecated Use `useComposerRuntime().reset` instead. This will be removed in 0.6.0. */
712
+ reset: () => void;
713
+ canCancel: boolean;
714
+ isEditing: true;
715
+ isEmpty: boolean;
716
+ /** @deprecated Use `useComposerRuntime().send` instead. This will be removed in 0.6.0. */
717
+ send: () => void;
718
+ /** @deprecated Use `useComposerRuntime().cancel` instead. This will be removed in 0.6.0. */
719
+ cancel: () => void;
720
+ focus: () => void;
721
+ onFocus: (listener: () => void) => Unsubscribe;
722
+ }>;
723
+
724
+ type TextContentPartState = Readonly<{
725
+ status: ContentPartStatus;
726
+ part: TextContentPart;
727
+ }>;
728
+ type ContentPartState = Readonly<{
729
+ status: ContentPartStatus | ToolCallContentPartStatus;
730
+ part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
731
+ }>;
732
+
733
+ type ReadonlyStore<T> = Omit<StoreApi<T>, "setState" | "destroy">;
734
+
735
+ type EditComposerState = Readonly<{
736
+ type: "edit";
737
+ /** @deprecated Use `text` instead. This will be removed in 0.6.0. */
738
+ value: string;
739
+ /** @deprecated Use `setText` instead. This will be removed in 0.6.0. */
740
+ setValue: (value: string) => void;
741
+ text: string;
742
+ setText: (value: string) => void;
743
+ canCancel: boolean;
744
+ isEditing: boolean;
745
+ isEmpty: boolean;
746
+ edit: () => void;
747
+ send: () => void;
748
+ cancel: () => void;
749
+ }>;
750
+
751
+ type MessageUtilsState = Readonly<{
752
+ isCopied: boolean;
753
+ setIsCopied: (value: boolean) => void;
754
+ isHovering: boolean;
755
+ setIsHovering: (value: boolean) => void;
756
+ isSpeaking: boolean;
757
+ stopSpeaking: () => void;
758
+ addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
759
+ submittedFeedback: "positive" | "negative" | null;
760
+ setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
761
+ }>;
762
+
763
+ type ThreadViewportState = Readonly<{
764
+ isAtBottom: boolean;
765
+ scrollToBottom: () => void;
766
+ onScrollToBottom: (callback: () => void) => Unsubscribe;
767
+ }>;
768
+
792
769
  type AssistantContextValue = {
793
770
  useToolUIs: UseBoundStore<ReadonlyStore<AssistantToolUIsState>>;
794
771
  useAssistantRuntime: UseBoundStore<ReadonlyStore<AssistantRuntime>>;
@@ -879,22 +856,14 @@ declare const useToolUIsStore: {
879
856
  }>> | null;
880
857
  };
881
858
 
882
- type ThreadViewportState = Readonly<{
883
- isAtBottom: boolean;
884
- scrollToBottom: () => void;
885
- onScrollToBottom: (callback: () => void) => Unsubscribe;
886
- }>;
887
-
888
- type ThreadMessagesState = readonly ThreadMessage[];
889
-
890
859
  type ThreadContextValue = {
891
- useThread: UseBoundStore<ReadonlyStore<ThreadState$1>>;
860
+ useThread: UseBoundStore<ReadonlyStore<ThreadState>>;
892
861
  /**
893
862
  * @deprecated Use `useThreadRuntime` instead. This will be removed in 0.6.0.
894
863
  */
895
864
  useThreadActions: UseBoundStore<ReadonlyStore<ThreadRuntime>>;
896
865
  useThreadRuntime: UseBoundStore<ReadonlyStore<ThreadRuntime>>;
897
- useThreadMessages: UseBoundStore<ReadonlyStore<ThreadMessagesState>>;
866
+ useThreadMessages: UseBoundStore<ReadonlyStore<readonly ThreadMessage[]>>;
898
867
  useComposer: UseBoundStore<ReadonlyStore<ThreadComposerState>>;
899
868
  useViewport: UseBoundStore<ReadonlyStore<ThreadViewportState>>;
900
869
  };
@@ -946,67 +915,121 @@ declare const useThreadRuntimeStore: {
946
915
  };
947
916
  declare const useThread: {
948
917
  (): Readonly<{
949
- capabilities: Readonly<RuntimeCapabilities>;
950
918
  threadId: string;
951
- isRunning: boolean;
952
919
  isDisabled: boolean;
920
+ isRunning: boolean;
921
+ capabilities: Readonly<{
922
+ switchToBranch: boolean;
923
+ edit: boolean;
924
+ reload: boolean;
925
+ cancel: boolean;
926
+ unstable_copy: boolean;
927
+ speak: boolean;
928
+ attachments: boolean;
929
+ feedback: boolean;
930
+ }>;
953
931
  }>;
954
932
  <TSelected>(selector: (state: Readonly<{
955
- capabilities: Readonly<RuntimeCapabilities>;
956
933
  threadId: string;
957
- isRunning: boolean;
958
934
  isDisabled: boolean;
935
+ isRunning: boolean;
936
+ capabilities: Readonly<{
937
+ switchToBranch: boolean;
938
+ edit: boolean;
939
+ reload: boolean;
940
+ cancel: boolean;
941
+ unstable_copy: boolean;
942
+ speak: boolean;
943
+ attachments: boolean;
944
+ feedback: boolean;
945
+ }>;
959
946
  }>) => TSelected): TSelected;
960
947
  (options: {
961
948
  optional: true;
962
949
  }): Readonly<{
963
- capabilities: Readonly<RuntimeCapabilities>;
964
950
  threadId: string;
965
- isRunning: boolean;
966
951
  isDisabled: boolean;
952
+ isRunning: boolean;
953
+ capabilities: Readonly<{
954
+ switchToBranch: boolean;
955
+ edit: boolean;
956
+ reload: boolean;
957
+ cancel: boolean;
958
+ unstable_copy: boolean;
959
+ speak: boolean;
960
+ attachments: boolean;
961
+ feedback: boolean;
962
+ }>;
967
963
  }> | null;
968
964
  <TSelected>(options: {
969
965
  optional: true;
970
966
  selector?: (state: Readonly<{
971
- capabilities: Readonly<RuntimeCapabilities>;
972
967
  threadId: string;
973
- isRunning: boolean;
974
968
  isDisabled: boolean;
969
+ isRunning: boolean;
970
+ capabilities: Readonly<{
971
+ switchToBranch: boolean;
972
+ edit: boolean;
973
+ reload: boolean;
974
+ cancel: boolean;
975
+ unstable_copy: boolean;
976
+ speak: boolean;
977
+ attachments: boolean;
978
+ feedback: boolean;
979
+ }>;
975
980
  }>) => TSelected;
976
981
  }): TSelected | null;
977
982
  };
978
983
  declare const useThreadStore: {
979
984
  (): ReadonlyStore<Readonly<{
980
- capabilities: Readonly<RuntimeCapabilities>;
981
985
  threadId: string;
982
- isRunning: boolean;
983
986
  isDisabled: boolean;
987
+ isRunning: boolean;
988
+ capabilities: Readonly<{
989
+ switchToBranch: boolean;
990
+ edit: boolean;
991
+ reload: boolean;
992
+ cancel: boolean;
993
+ unstable_copy: boolean;
994
+ speak: boolean;
995
+ attachments: boolean;
996
+ feedback: boolean;
997
+ }>;
984
998
  }>>;
985
999
  (options: {
986
1000
  optional: true;
987
1001
  }): ReadonlyStore<Readonly<{
988
- capabilities: Readonly<RuntimeCapabilities>;
989
1002
  threadId: string;
990
- isRunning: boolean;
991
1003
  isDisabled: boolean;
1004
+ isRunning: boolean;
1005
+ capabilities: Readonly<{
1006
+ switchToBranch: boolean;
1007
+ edit: boolean;
1008
+ reload: boolean;
1009
+ cancel: boolean;
1010
+ unstable_copy: boolean;
1011
+ speak: boolean;
1012
+ attachments: boolean;
1013
+ feedback: boolean;
1014
+ }>;
992
1015
  }>> | null;
993
1016
  };
994
1017
  declare const useThreadMessages: {
995
- (): ThreadMessagesState;
996
- <TSelected>(selector: (state: ThreadMessagesState) => TSelected): TSelected;
1018
+ (): readonly ThreadMessage[];
1019
+ <TSelected>(selector: (state: readonly ThreadMessage[]) => TSelected): TSelected;
997
1020
  (options: {
998
1021
  optional: true;
999
- }): ThreadMessagesState | null;
1022
+ }): readonly ThreadMessage[] | null;
1000
1023
  <TSelected>(options: {
1001
1024
  optional: true;
1002
- selector?: (state: ThreadMessagesState) => TSelected;
1025
+ selector?: (state: readonly ThreadMessage[]) => TSelected;
1003
1026
  }): TSelected | null;
1004
1027
  };
1005
1028
  declare const useThreadMessagesStore: {
1006
- (): ReadonlyStore<ThreadMessagesState>;
1029
+ (): ReadonlyStore<readonly ThreadMessage[]>;
1007
1030
  (options: {
1008
1031
  optional: true;
1009
- }): ReadonlyStore<ThreadMessagesState> | null;
1032
+ }): ReadonlyStore<readonly ThreadMessage[]> | null;
1010
1033
  };
1011
1034
  declare const useThreadComposer: {
1012
1035
  (): Readonly<{
@@ -1175,42 +1198,8 @@ declare const useThreadViewportStore: {
1175
1198
  }>> | null;
1176
1199
  };
1177
1200
 
1178
- type MessageState = Readonly<{
1179
- message: Readonly<ThreadMessage>;
1180
- parentId: string | null;
1181
- branches: readonly string[];
1182
- isLast: boolean;
1183
- }>;
1184
-
1185
- type EditComposerState = Readonly<{
1186
- type: "edit";
1187
- /** @deprecated Use `text` instead. This will be removed in 0.6.0. */
1188
- value: string;
1189
- /** @deprecated Use `setText` instead. This will be removed in 0.6.0. */
1190
- setValue: (value: string) => void;
1191
- text: string;
1192
- setText: (value: string) => void;
1193
- canCancel: boolean;
1194
- isEditing: boolean;
1195
- isEmpty: boolean;
1196
- edit: () => void;
1197
- send: () => void;
1198
- cancel: () => void;
1199
- }>;
1200
-
1201
- type MessageUtilsState = Readonly<{
1202
- isCopied: boolean;
1203
- setIsCopied: (value: boolean) => void;
1204
- isHovering: boolean;
1205
- setIsHovering: (value: boolean) => void;
1206
- isSpeaking: boolean;
1207
- stopSpeaking: () => void;
1208
- addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
1209
- submittedFeedback: "positive" | "negative" | null;
1210
- setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
1211
- }>;
1212
-
1213
1201
  type MessageContextValue = {
1202
+ useMessageRuntime: UseBoundStore<ReadonlyStore<MessageRuntime>>;
1214
1203
  useMessage: UseBoundStore<ReadonlyStore<MessageState>>;
1215
1204
  useMessageUtils: UseBoundStore<ReadonlyStore<MessageUtilsState>>;
1216
1205
  useEditComposer: UseBoundStore<ReadonlyStore<EditComposerState>>;
@@ -1223,52 +1212,28 @@ declare const useMessageContext: {
1223
1212
  optional?: boolean | undefined;
1224
1213
  } | undefined): MessageContextValue | null;
1225
1214
  };
1215
+ declare function useMessageRuntime(options?: {
1216
+ optional?: false | undefined;
1217
+ }): MessageRuntime;
1218
+ declare function useMessageRuntime(options?: {
1219
+ optional?: boolean | undefined;
1220
+ }): MessageRuntime | null;
1226
1221
  declare const useMessage: {
1227
- (): Readonly<{
1228
- message: Readonly<ThreadMessage>;
1229
- parentId: string | null;
1230
- branches: readonly string[];
1231
- isLast: boolean;
1232
- }>;
1233
- <TSelected>(selector: (state: Readonly<{
1234
- message: Readonly<ThreadMessage>;
1235
- parentId: string | null;
1236
- branches: readonly string[];
1237
- isLast: boolean;
1238
- }>) => TSelected): TSelected;
1222
+ (): MessageState;
1223
+ <TSelected>(selector: (state: MessageState) => TSelected): TSelected;
1239
1224
  (options: {
1240
1225
  optional: true;
1241
- }): Readonly<{
1242
- message: Readonly<ThreadMessage>;
1243
- parentId: string | null;
1244
- branches: readonly string[];
1245
- isLast: boolean;
1246
- }> | null;
1226
+ }): MessageState | null;
1247
1227
  <TSelected>(options: {
1248
1228
  optional: true;
1249
- selector?: (state: Readonly<{
1250
- message: Readonly<ThreadMessage>;
1251
- parentId: string | null;
1252
- branches: readonly string[];
1253
- isLast: boolean;
1254
- }>) => TSelected;
1229
+ selector?: (state: MessageState) => TSelected;
1255
1230
  }): TSelected | null;
1256
1231
  };
1257
1232
  declare const useMessageStore: {
1258
- (): ReadonlyStore<Readonly<{
1259
- message: Readonly<ThreadMessage>;
1260
- parentId: string | null;
1261
- branches: readonly string[];
1262
- isLast: boolean;
1263
- }>>;
1233
+ (): ReadonlyStore<MessageState>;
1264
1234
  (options: {
1265
1235
  optional: true;
1266
- }): ReadonlyStore<Readonly<{
1267
- message: Readonly<ThreadMessage>;
1268
- parentId: string | null;
1269
- branches: readonly string[];
1270
- isLast: boolean;
1271
- }>> | null;
1236
+ }): ReadonlyStore<MessageState> | null;
1272
1237
  };
1273
1238
  declare const useMessageUtils: {
1274
1239
  (): Readonly<{
@@ -1687,34 +1652,6 @@ declare const useComposerStore: {
1687
1652
  }>> | null;
1688
1653
  };
1689
1654
 
1690
- type ThreadComposerState = Readonly<{
1691
- type: "thread";
1692
- /** @deprecated Use `text` instead. */
1693
- value: string;
1694
- /** @deprecated Use `setText` instead. */
1695
- setValue: (value: string) => void;
1696
- attachmentAccept: string;
1697
- attachments: readonly ThreadComposerAttachment[];
1698
- addAttachment: (file: File) => void;
1699
- removeAttachment: (attachmentId: string) => void;
1700
- text: string;
1701
- setText: (value: string) => void;
1702
- reset: () => void;
1703
- canCancel: boolean;
1704
- isEditing: true;
1705
- isEmpty: boolean;
1706
- send: () => void;
1707
- cancel: () => void;
1708
- focus: () => void;
1709
- onFocus: (listener: () => void) => Unsubscribe;
1710
- }>;
1711
-
1712
- type CreateAppendMessage = string | {
1713
- parentId?: string | null | undefined;
1714
- role?: AppendMessage["role"] | undefined;
1715
- content: AppendMessage["content"];
1716
- attachments?: AppendMessage["attachments"] | undefined;
1717
- };
1718
1655
  declare const useAppendMessage: () => (message: CreateAppendMessage) => void;
1719
1656
 
1720
1657
  /**
@@ -2300,6 +2237,28 @@ type ThreadConfigProviderProps = PropsWithChildren<{
2300
2237
  }>;
2301
2238
  declare const ThreadConfigProvider: FC<ThreadConfigProviderProps>;
2302
2239
 
2240
+ declare const buttonVariants: (props?: ({
2241
+ variant?: "default" | "outline" | "ghost" | null | undefined;
2242
+ size?: "default" | "icon" | null | undefined;
2243
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
2244
+ type ButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button> & VariantProps<typeof buttonVariants>;
2245
+
2246
+ type TooltipIconButtonProps = ButtonProps & {
2247
+ tooltip: string;
2248
+ side?: "top" | "bottom" | "left" | "right";
2249
+ };
2250
+ declare const TooltipIconButton: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
2251
+ ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
2252
+ } & {
2253
+ asChild?: boolean;
2254
+ }, "ref"> & class_variance_authority.VariantProps<(props?: ({
2255
+ variant?: "default" | "outline" | "ghost" | null | undefined;
2256
+ size?: "default" | "icon" | null | undefined;
2257
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & {
2258
+ tooltip: string;
2259
+ side?: "top" | "bottom" | "left" | "right";
2260
+ } & react.RefAttributes<HTMLButtonElement>>;
2261
+
2303
2262
  declare const AssistantActionBar: FC;
2304
2263
  declare const exports$c: {
2305
2264
  Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
@@ -2498,4 +2457,94 @@ declare const exports: {
2498
2457
  Text: FC;
2499
2458
  };
2500
2459
 
2501
- export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveFeedbackNegativeProps, type ActionBarPrimitiveFeedbackPositiveProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type ActionBarPrimitiveSpeakProps, type ActionBarPrimitiveStopSpeakingProps, type AddToolResultOptions, AppendMessage, _default$b as AssistantActionBar, type AssistantContextValue, _default$a as AssistantMessage, type AssistantMessageConfig, type AssistantMessageContentProps, _default$9 as AssistantModal, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, AssistantRuntime, AssistantRuntimeProvider, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type AssistantToolUIsState, type AttachmentAdapter, _default$8 as BranchPicker, index$4 as BranchPickerPrimitive, type BranchPickerPrimitiveCountProps, type BranchPickerPrimitiveNextProps, type BranchPickerPrimitiveNumberProps, type BranchPickerPrimitivePreviousProps, type BranchPickerPrimitiveRootProps, type ChatModelAdapter, type ChatModelRunOptions, type ChatModelRunResult, type ChatModelRunUpdate, _default$7 as Composer, _default$6 as ComposerAttachment, type ComposerContextValue, type ComposerInputProps, index$3 as ComposerPrimitive, type ComposerPrimitiveCancelProps, type ComposerPrimitiveIfProps, type ComposerPrimitiveInputProps, type ComposerPrimitiveRootProps, type ComposerPrimitiveSendProps, CompositeAttachmentAdapter, exports as ContentPart, type ContentPartContextValue, index$2 as ContentPartPrimitive, type ContentPartPrimitiveDisplayProps, type ContentPartPrimitiveImageProps, type ContentPartPrimitiveInProgressProps, type ContentPartPrimitiveTextProps, ContentPartRuntime, type ContentPartState, CoreMessage, type DangerousInBrowserRuntimeOptions, EdgeChatAdapter, type EdgeRuntimeOptions, _default$5 as EditComposer, type EditComposerState, type EmptyContentPartComponent, type EmptyContentPartProps, type ExternalStoreAdapter, type ExternalStoreMessageConverter, internal as INTERNAL, ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type LocalRuntimeOptions, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, MessageRuntime, type MessageState, MessageStatus, type MessageUtilsState, ModelConfig, ModelConfigProvider, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SpeechSynthesisAdapter, StreamUtils, type StringsConfig, type SubmitFeedbackOptions, type SuggestionConfig, TextContentPart, type TextContentPartComponent, type TextContentPartProps, TextContentPartProvider, _default$4 as Thread, ThreadAssistantContentPart, ThreadComposerRuntime, type ThreadComposerState, type ThreadConfig, ThreadConfigProvider, type ThreadConfigProviderProps, type ThreadContextValue, ThreadMessage, type ThreadMessageLike, type ThreadMessagesState, index as ThreadPrimitive, type ThreadPrimitiveEmptyProps, type ThreadPrimitiveIfProps, type ThreadPrimitiveMessagesProps, type ThreadPrimitiveRootProps, type ThreadPrimitiveScrollToBottomProps, type ThreadPrimitiveSuggestionProps, type ThreadPrimitiveViewportProps, type ThreadRootProps, ThreadRuntime, type ThreadState$1 as ThreadState, ThreadUserContentPart, type ThreadViewportState, _default as ThreadWelcome, type ThreadWelcomeConfig, type ThreadWelcomeMessageProps, type ThreadWelcomeSuggestionProps, Tool, ToolCallContentPart, type ToolCallContentPartComponent, type ToolCallContentPartProps, UIContentPart, type UIContentPartComponent, type UIContentPartProps, type Unsubscribe, type UseActionBarCopyProps, _default$2 as UserActionBar, _default$3 as UserMessage, _default$1 as UserMessageAttachment, type UserMessageConfig, type UserMessageContentProps, WebSpeechSynthesisAdapter, fromCoreMessage, fromCoreMessages, fromLanguageModelMessages, fromLanguageModelTools, getExternalStoreMessage, makeAssistantTool, makeAssistantToolUI, streamUtils, subscribeToMainThread, toCoreMessage, toCoreMessages, toLanguageModelMessages, toLanguageModelTools, useActionBarCopy, useActionBarEdit, useActionBarFeedbackNegative, useActionBarFeedbackPositive, useActionBarReload, useActionBarSpeak, useActionBarStopSpeaking, useAppendMessage, useAssistantActions, useAssistantActionsStore, useAssistantContext, useAssistantInstructions, useAssistantRuntime, useAssistantRuntimeStore, useAssistantTool, useAssistantToolUI, useBranchPickerCount, useBranchPickerNext, useBranchPickerNumber, useBranchPickerPrevious, useComposer, useComposerAddAttachment, useComposerCancel, useComposerContext, useComposerIf, useComposerSend, useComposerStore, useContentPart, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartStore, useContentPartText, useDangerousInBrowserRuntime, useEdgeRuntime, useEditComposer, useEditComposerStore, useExternalMessageConverter, useExternalStoreRuntime, useLocalRuntime, useMessage, useMessageContext, useMessageIf, useMessageStore, useMessageUtils, useMessageUtilsStore, useSwitchToNewThread, useThread, useThreadActions, useThreadActionsStore, useThreadComposer, useThreadComposerStore, useThreadConfig, useThreadContext, useThreadEmpty, useThreadIf, useThreadMessages, useThreadMessagesStore, useThreadRuntime, useThreadRuntimeStore, useThreadScrollToBottom, useThreadStore, useThreadSuggestion, useThreadViewport, useThreadViewportStore, useToolUIs, useToolUIsStore };
2460
+ declare class ProxyConfigProvider implements ModelConfigProvider {
2461
+ private _providers;
2462
+ getModelConfig(): ModelConfig;
2463
+ registerModelConfigProvider(provider: ModelConfigProvider): () => void;
2464
+ }
2465
+
2466
+ declare const useSmooth: (state: TextContentPartState, smooth?: boolean) => TextContentPartState;
2467
+
2468
+ declare const withSmoothContextProvider: <C extends ComponentType<any>>(Component: C) => C;
2469
+ declare const useSmoothStatus: {
2470
+ (): {
2471
+ type: "running";
2472
+ } | {
2473
+ type: "complete";
2474
+ } | {
2475
+ type: "incomplete";
2476
+ reason: "cancelled" | "length" | "content-filter" | "other" | "error";
2477
+ error?: unknown;
2478
+ } | {
2479
+ type: "requires-action";
2480
+ reason: "tool-calls";
2481
+ };
2482
+ <TSelected>(selector: (state: {
2483
+ type: "running";
2484
+ } | {
2485
+ type: "complete";
2486
+ } | {
2487
+ type: "incomplete";
2488
+ reason: "cancelled" | "length" | "content-filter" | "other" | "error";
2489
+ error?: unknown;
2490
+ } | {
2491
+ type: "requires-action";
2492
+ reason: "tool-calls";
2493
+ }) => TSelected): TSelected;
2494
+ (options: {
2495
+ optional: true;
2496
+ }): {
2497
+ type: "running";
2498
+ } | {
2499
+ type: "complete";
2500
+ } | {
2501
+ type: "incomplete";
2502
+ reason: "cancelled" | "length" | "content-filter" | "other" | "error";
2503
+ error?: unknown;
2504
+ } | {
2505
+ type: "requires-action";
2506
+ reason: "tool-calls";
2507
+ } | null;
2508
+ <TSelected>(options: {
2509
+ optional: true;
2510
+ selector?: (state: {
2511
+ type: "running";
2512
+ } | {
2513
+ type: "complete";
2514
+ } | {
2515
+ type: "incomplete";
2516
+ reason: "cancelled" | "length" | "content-filter" | "other" | "error";
2517
+ error?: unknown;
2518
+ } | {
2519
+ type: "requires-action";
2520
+ reason: "tool-calls";
2521
+ }) => TSelected;
2522
+ }): TSelected | null;
2523
+ };
2524
+
2525
+ declare const generateId: (size?: number) => string;
2526
+
2527
+ type internal_AssistantRuntime<TThreadRuntime extends ThreadRuntime = ThreadRuntime> = AssistantRuntime<TThreadRuntime>;
2528
+ declare const internal_AssistantRuntime: typeof AssistantRuntime;
2529
+ type internal_BaseAssistantRuntimeCore<TThreadRuntime extends ReactThreadRuntimeCore> = BaseAssistantRuntimeCore<TThreadRuntime>;
2530
+ declare const internal_BaseAssistantRuntimeCore: typeof BaseAssistantRuntimeCore;
2531
+ type internal_BaseThreadComposerRuntimeCore = BaseThreadComposerRuntimeCore;
2532
+ declare const internal_BaseThreadComposerRuntimeCore: typeof BaseThreadComposerRuntimeCore;
2533
+ type internal_MessageRepository = MessageRepository;
2534
+ declare const internal_MessageRepository: typeof MessageRepository;
2535
+ type internal_ProxyConfigProvider = ProxyConfigProvider;
2536
+ declare const internal_ProxyConfigProvider: typeof ProxyConfigProvider;
2537
+ type internal_ReactThreadRuntimeCore = ReactThreadRuntimeCore;
2538
+ type internal_ThreadRuntime = ThreadRuntime;
2539
+ declare const internal_ThreadRuntime: typeof ThreadRuntime;
2540
+ type internal_ThreadRuntimeCoreBinding = ThreadRuntimeCoreBinding;
2541
+ declare const internal_TooltipIconButton: typeof TooltipIconButton;
2542
+ declare const internal_generateId: typeof generateId;
2543
+ declare const internal_useSmooth: typeof useSmooth;
2544
+ declare const internal_useSmoothStatus: typeof useSmoothStatus;
2545
+ declare const internal_withSmoothContextProvider: typeof withSmoothContextProvider;
2546
+ declare namespace internal {
2547
+ export { internal_AssistantRuntime as AssistantRuntime, internal_BaseAssistantRuntimeCore as BaseAssistantRuntimeCore, internal_BaseThreadComposerRuntimeCore as BaseThreadComposerRuntimeCore, internal_MessageRepository as MessageRepository, internal_ProxyConfigProvider as ProxyConfigProvider, type internal_ReactThreadRuntimeCore as ReactThreadRuntimeCore, internal_ThreadRuntime as ThreadRuntime, type internal_ThreadRuntimeCoreBinding as ThreadRuntimeCoreBinding, internal_TooltipIconButton as TooltipIconButton, internal_generateId as generateId, internal_useSmooth as useSmooth, internal_useSmoothStatus as useSmoothStatus, internal_withSmoothContextProvider as withSmoothContextProvider };
2548
+ }
2549
+
2550
+ export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveFeedbackNegativeProps, type ActionBarPrimitiveFeedbackPositiveProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type ActionBarPrimitiveSpeakProps, type ActionBarPrimitiveStopSpeakingProps, type AddToolResultOptions, AppendMessage, _default$b as AssistantActionBar, type AssistantContextValue, _default$a as AssistantMessage, type AssistantMessageConfig, type AssistantMessageContentProps, _default$9 as AssistantModal, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, AssistantRuntime, AssistantRuntimeProvider, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type AssistantToolUIsState, type AttachmentAdapter, _default$8 as BranchPicker, index$4 as BranchPickerPrimitive, type BranchPickerPrimitiveCountProps, type BranchPickerPrimitiveNextProps, type BranchPickerPrimitiveNumberProps, type BranchPickerPrimitivePreviousProps, type BranchPickerPrimitiveRootProps, type ChatModelAdapter, type ChatModelRunOptions, type ChatModelRunResult, type ChatModelRunUpdate, _default$7 as Composer, _default$6 as ComposerAttachment, type ComposerContextValue, type ComposerInputProps, index$3 as ComposerPrimitive, type ComposerPrimitiveCancelProps, type ComposerPrimitiveIfProps, type ComposerPrimitiveInputProps, type ComposerPrimitiveRootProps, type ComposerPrimitiveSendProps, CompositeAttachmentAdapter, exports as ContentPart, type ContentPartContextValue, index$2 as ContentPartPrimitive, type ContentPartPrimitiveDisplayProps, type ContentPartPrimitiveImageProps, type ContentPartPrimitiveInProgressProps, type ContentPartPrimitiveTextProps, ContentPartRuntime, type ContentPartState, CoreMessage, type DangerousInBrowserRuntimeOptions, EdgeChatAdapter, type EdgeRuntimeOptions, _default$5 as EditComposer, type EditComposerState, type EmptyContentPartComponent, type EmptyContentPartProps, type ExternalStoreAdapter, type ExternalStoreMessageConverter, internal as INTERNAL, ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type LocalRuntimeOptions, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, MessageRuntime, type MessageState, MessageStatus, type MessageUtilsState, ModelConfig, ModelConfigProvider, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SpeechSynthesisAdapter, StreamUtils, type StringsConfig, type SubmitFeedbackOptions, type SuggestionConfig, TextContentPart, type TextContentPartComponent, type TextContentPartProps, TextContentPartProvider, _default$4 as Thread, ThreadAssistantContentPart, ThreadComposerRuntime, type ThreadComposerState, type ThreadConfig, ThreadConfigProvider, type ThreadConfigProviderProps, type ThreadContextValue, ThreadMessage, type ThreadMessageLike, index as ThreadPrimitive, type ThreadPrimitiveEmptyProps, type ThreadPrimitiveIfProps, type ThreadPrimitiveMessagesProps, type ThreadPrimitiveRootProps, type ThreadPrimitiveScrollToBottomProps, type ThreadPrimitiveSuggestionProps, type ThreadPrimitiveViewportProps, type ThreadRootProps, ThreadRuntime, type ThreadState, ThreadUserContentPart, type ThreadViewportState, _default as ThreadWelcome, type ThreadWelcomeConfig, type ThreadWelcomeMessageProps, type ThreadWelcomeSuggestionProps, Tool, ToolCallContentPart, type ToolCallContentPartComponent, type ToolCallContentPartProps, UIContentPart, type UIContentPartComponent, type UIContentPartProps, type UnstableThreadComposerStateV2, type Unsubscribe, type UseActionBarCopyProps, _default$2 as UserActionBar, _default$3 as UserMessage, _default$1 as UserMessageAttachment, type UserMessageConfig, type UserMessageContentProps, WebSpeechSynthesisAdapter, fromCoreMessage, fromCoreMessages, fromLanguageModelMessages, fromLanguageModelTools, getExternalStoreMessage, makeAssistantTool, makeAssistantToolUI, streamUtils, subscribeToMainThread, toCoreMessage, toCoreMessages, toLanguageModelMessages, toLanguageModelTools, useActionBarCopy, useActionBarEdit, useActionBarFeedbackNegative, useActionBarFeedbackPositive, useActionBarReload, useActionBarSpeak, useActionBarStopSpeaking, useAppendMessage, useAssistantActions, useAssistantActionsStore, useAssistantContext, useAssistantInstructions, useAssistantRuntime, useAssistantRuntimeStore, useAssistantTool, useAssistantToolUI, useBranchPickerCount, useBranchPickerNext, useBranchPickerNumber, useBranchPickerPrevious, useComposer, useComposerAddAttachment, useComposerCancel, useComposerContext, useComposerIf, useComposerSend, useComposerStore, useContentPart, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartStore, useContentPartText, useDangerousInBrowserRuntime, useEdgeRuntime, useEditComposer, useEditComposerStore, useExternalMessageConverter, useExternalStoreRuntime, useLocalRuntime, useMessage, useMessageContext, useMessageIf, useMessageRuntime, useMessageStore, useMessageUtils, useMessageUtilsStore, useSwitchToNewThread, useThread, useThreadActions, useThreadActionsStore, useThreadComposer, useThreadComposerStore, useThreadConfig, useThreadContext, useThreadEmpty, useThreadIf, useThreadMessages, useThreadMessagesStore, useThreadRuntime, useThreadRuntimeStore, useThreadScrollToBottom, useThreadStore, useThreadSuggestion, useThreadViewport, useThreadViewportStore, useToolUIs, useToolUIsStore };