@assistant-ui/react 0.5.40 → 0.5.42

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -110,32 +110,60 @@ declare class MessageRepository {
110
110
  import({ headId, messages }: ExportedMessageRepository): void;
111
111
  }
112
112
 
113
+ declare namespace SpeechSynthesisAdapter {
114
+ type Status = {
115
+ type: "starting" | "running";
116
+ } | {
117
+ type: "ended";
118
+ reason: "finished" | "cancelled" | "error";
119
+ error?: unknown;
120
+ };
121
+ type Utterance = {
122
+ status: Status;
123
+ cancel: () => void;
124
+ onEnd: (callback: () => void) => Unsubscribe;
125
+ };
126
+ }
127
+ type SpeechSynthesisAdapter = {
128
+ speak: (message: ThreadMessage) => SpeechSynthesisAdapter.Utterance;
129
+ };
130
+
113
131
  type LocalRuntimeOptions = {
114
132
  initialMessages?: readonly CoreMessage[] | undefined;
115
133
  maxToolRoundtrips?: number | undefined;
134
+ adapters?: {
135
+ speech?: SpeechSynthesisAdapter | undefined;
136
+ } | undefined;
116
137
  };
117
138
 
139
+ declare class WebSpeechSynthesisAdapter implements SpeechSynthesisAdapter {
140
+ speak(message: ThreadMessage): SpeechSynthesisAdapter.Utterance;
141
+ }
142
+
118
143
  declare class LocalThreadRuntime implements ThreadRuntime {
119
144
  private configProvider;
120
145
  adapter: ChatModelAdapter;
121
- options: LocalRuntimeOptions;
122
146
  private _subscriptions;
123
147
  private abortController;
124
148
  private readonly repository;
125
- readonly capabilities: Readonly<{
126
- switchToBranch: true;
127
- edit: true;
128
- reload: true;
129
- cancel: true;
130
- copy: true;
131
- }>;
149
+ readonly capabilities: {
150
+ switchToBranch: boolean;
151
+ edit: boolean;
152
+ reload: boolean;
153
+ cancel: boolean;
154
+ unstable_copy: boolean;
155
+ speak: boolean;
156
+ };
132
157
  readonly isDisabled = false;
133
158
  get messages(): ThreadMessage[];
134
159
  readonly composer: {
135
160
  text: string;
136
161
  setText: (value: string) => void;
137
162
  };
138
- constructor(configProvider: ModelConfigProvider, adapter: ChatModelAdapter, options: LocalRuntimeOptions);
163
+ constructor(configProvider: ModelConfigProvider, adapter: ChatModelAdapter, { initialMessages, ...options }: LocalRuntimeOptions);
164
+ private _options;
165
+ get options(): LocalRuntimeOptions;
166
+ set options({ initialMessages, ...options }: LocalRuntimeOptions);
139
167
  getBranches(messageId: string): string[];
140
168
  switchToBranch(branchId: string): void;
141
169
  append(message: AppendMessage): Promise<void>;
@@ -144,7 +172,9 @@ declare class LocalThreadRuntime implements ThreadRuntime {
144
172
  cancelRun(): void;
145
173
  private notifySubscribers;
146
174
  subscribe(callback: () => void): Unsubscribe;
147
- addToolResult({ messageId, toolCallId, result }: AddToolResultOptions): void;
175
+ addToolResult({ messageId, toolCallId, result, }: AddToolResultOptions): void;
176
+ private _utterance;
177
+ speak(messageId: string): SpeechSynthesisAdapter.Utterance;
148
178
  export(): ExportedMessageRepository;
149
179
  import(data: ExportedMessageRepository): void;
150
180
  }
@@ -219,7 +249,7 @@ declare class EdgeChatAdapter implements ChatModelAdapter {
219
249
  }
220
250
 
221
251
  type EdgeRuntimeOptions = EdgeChatAdapterOptions & LocalRuntimeOptions;
222
- declare const useEdgeRuntime: ({ initialMessages, maxToolRoundtrips, ...options }: EdgeRuntimeOptions) => LocalRuntime;
252
+ declare const useEdgeRuntime: ({ initialMessages, maxToolRoundtrips, adapters, ...options }: EdgeRuntimeOptions) => LocalRuntime;
223
253
 
224
254
  type ThreadMessageLike = {
225
255
  role: "assistant" | "user" | "system";
@@ -243,11 +273,14 @@ type ExternalStoreAdapterBase<T> = {
243
273
  onEdit?: ((message: AppendMessage) => Promise<void>) | undefined;
244
274
  onReload?: ((parentId: string | null) => Promise<void>) | undefined;
245
275
  onCancel?: (() => Promise<void>) | undefined;
246
- onCopy?: (() => Promise<void>) | null | undefined;
247
276
  onNewThread?: (() => Promise<void> | void) | undefined;
248
277
  onAddToolResult?: ((options: AddToolResultOptions) => Promise<void> | void) | undefined;
249
278
  onSwitchThread?: ((threadId: string | null) => Promise<void> | void) | undefined;
279
+ onSpeak?: ((message: ThreadMessage) => SpeechSynthesisAdapter.Utterance) | undefined;
250
280
  convertMessage?: ExternalStoreMessageConverter<T> | undefined;
281
+ unstable_capabilities?: {
282
+ copy?: boolean | undefined;
283
+ } | undefined;
251
284
  };
252
285
  type ExternalStoreAdapter<T = ThreadMessage> = ExternalStoreAdapterBase<T> & (T extends ThreadMessage ? object : ExternalStoreMessageConverterAdapter<T>);
253
286
 
@@ -349,9 +382,10 @@ declare class ExternalStoreThreadRuntime implements ReactThreadRuntime {
349
382
  append(message: AppendMessage): Promise<void>;
350
383
  startRun(parentId: string | null): Promise<void>;
351
384
  cancelRun(): void;
385
+ addToolResult(options: AddToolResultOptions): void;
386
+ speak(messageId: string): SpeechSynthesisAdapter.Utterance;
352
387
  subscribe(callback: () => void): Unsubscribe;
353
388
  private updateMessages;
354
- addToolResult(options: AddToolResultOptions): void;
355
389
  }
356
390
 
357
391
  declare class ExternalStoreRuntime extends BaseAssistantRuntime<ExternalStoreThreadRuntime> {
@@ -384,7 +418,8 @@ type RuntimeCapabilities = {
384
418
  edit: boolean;
385
419
  reload: boolean;
386
420
  cancel: boolean;
387
- copy: boolean;
421
+ unstable_copy: boolean;
422
+ speak: boolean;
388
423
  };
389
424
 
390
425
  type AddToolResultOptions = {
@@ -399,6 +434,7 @@ type ThreadActionsState = Readonly<{
399
434
  startRun: (parentId: string | null) => void;
400
435
  cancelRun: () => void;
401
436
  addToolResult: (options: AddToolResultOptions) => void;
437
+ speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
402
438
  }>;
403
439
 
404
440
  type ThreadRuntime = ThreadActionsState & Readonly<{
@@ -507,6 +543,9 @@ type MessageUtilsState = Readonly<{
507
543
  setIsCopied: (value: boolean) => void;
508
544
  isHovering: boolean;
509
545
  setIsHovering: (value: boolean) => void;
546
+ isSpeaking: boolean;
547
+ stopSpeaking: () => void;
548
+ addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
510
549
  }>;
511
550
 
512
551
  type MessageContextValue = {
@@ -578,6 +617,10 @@ declare const useActionBarEdit: () => (() => void) | null;
578
617
 
579
618
  declare const useActionBarReload: () => (() => void) | null;
580
619
 
620
+ declare const useActionBarSpeak: () => (() => Promise<void>) | null;
621
+
622
+ declare const useActionBarStopSpeaking: () => (() => Promise<void>) | null;
623
+
581
624
  declare const useBranchPickerCount: () => number;
582
625
 
583
626
  declare const useBranchPickerNext: () => (() => void) | null;
@@ -622,6 +665,7 @@ type MessageIfFilters = {
622
665
  hasBranches: boolean | undefined;
623
666
  copied: boolean | undefined;
624
667
  lastOrHover: boolean | undefined;
668
+ speaking: boolean | undefined;
625
669
  };
626
670
  type UseMessageIfProps = RequireAtLeastOne<MessageIfFilters>;
627
671
  declare const useMessageIf: (props: UseMessageIfProps) => boolean;
@@ -683,8 +727,22 @@ declare const ActionBarPrimitiveEdit: react.ForwardRefExoticComponent<Omit<Omit<
683
727
  asChild?: boolean;
684
728
  }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
685
729
 
730
+ type ActionBarPrimitiveSpeakProps = ActionButtonProps<typeof useActionBarSpeak>;
731
+ declare const ActionBarPrimitiveSpeak: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
732
+ 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;
733
+ } & {
734
+ asChild?: boolean;
735
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
736
+
737
+ type ActionBarPrimitiveStopSpeakingProps = ActionButtonProps<typeof useActionBarStopSpeaking>;
738
+ declare const ActionBarPrimitiveStopSpeaking: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
739
+ 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;
740
+ } & {
741
+ asChild?: boolean;
742
+ }, "ref">> & react.RefAttributes<HTMLButtonElement>>;
743
+
686
744
  declare namespace index$6 {
687
- export { ActionBarPrimitiveCopy as Copy, ActionBarPrimitiveEdit as Edit, ActionBarPrimitiveReload as Reload, ActionBarPrimitiveRoot as Root };
745
+ export { ActionBarPrimitiveCopy as Copy, ActionBarPrimitiveEdit as Edit, ActionBarPrimitiveReload as Reload, ActionBarPrimitiveRoot as Root, ActionBarPrimitiveSpeak as Speak, ActionBarPrimitiveStopSpeaking as StopSpeaking };
688
746
  }
689
747
 
690
748
  type AssistantModalPrimitiveRootProps = PopoverPrimitive.PopoverProps;
@@ -930,6 +988,7 @@ type UserMessageConfig = {
930
988
  type AssistantMessageConfig = {
931
989
  allowReload?: boolean | undefined;
932
990
  allowCopy?: boolean | undefined;
991
+ allowSpeak?: boolean | undefined;
933
992
  components?: {
934
993
  Text?: TextContentPartComponent | undefined;
935
994
  } | undefined;
@@ -967,6 +1026,12 @@ type StringsConfig = {
967
1026
  copy?: {
968
1027
  tooltip?: string | undefined;
969
1028
  };
1029
+ speak?: {
1030
+ tooltip?: string | undefined;
1031
+ stop?: {
1032
+ tooltip?: string | undefined;
1033
+ };
1034
+ };
970
1035
  };
971
1036
  branchPicker?: {
972
1037
  previous?: {
@@ -1020,24 +1085,27 @@ declare const ThreadConfigProvider: FC<ThreadConfigProviderProps>;
1020
1085
 
1021
1086
  declare const AssistantActionBar: FC;
1022
1087
  declare const exports$a: {
1023
- Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1088
+ Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1024
1089
  ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
1025
1090
  } & {
1026
1091
  asChild?: boolean;
1027
- }, "ref"> & UseActionBarFloatStatusProps & react.RefAttributes<HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1092
+ }, "ref"> & UseActionBarFloatStatusProps & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1028
1093
  Reload: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1029
1094
  Copy: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1095
+ Speak: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1096
+ StopSpeaking: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1097
+ SpeechControl: FC;
1030
1098
  };
1031
1099
  declare const _default$9: typeof AssistantActionBar & typeof exports$a;
1032
1100
 
1033
1101
  declare const AssistantMessage: FC;
1034
1102
  type AssistantMessageContentProps = MessagePrimitiveContentProps & ComponentPropsWithoutRef<"div">;
1035
1103
  declare const exports$9: {
1036
- Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1104
+ Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1037
1105
  ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
1038
1106
  } & {
1039
1107
  asChild?: boolean;
1040
- }, "ref"> & react.RefAttributes<HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1108
+ }, "ref"> & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1041
1109
  Avatar: FC;
1042
1110
  Content: react.ForwardRefExoticComponent<MessagePrimitiveContentProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1043
1111
  };
@@ -1054,42 +1122,42 @@ declare const exports$8: {
1054
1122
  children?: react.ReactNode | undefined;
1055
1123
  }>;
1056
1124
  Trigger: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1057
- Content: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<PopoverPrimitive.PopoverContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
1125
+ Content: react.ForwardRefExoticComponent<Partial<Omit<Omit<PopoverPrimitive.PopoverContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
1058
1126
  dissmissOnInteractOutside?: boolean | undefined;
1059
- } & react.RefAttributes<HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1127
+ } & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1060
1128
  Button: react.ForwardRefExoticComponent<Partial<AssistantModalButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1061
- Anchor: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<PopoverPrimitive.PopoverAnchorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1129
+ Anchor: react.ForwardRefExoticComponent<Partial<Omit<Omit<PopoverPrimitive.PopoverAnchorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1062
1130
  };
1063
1131
  declare const _default$7: typeof AssistantModal & typeof exports$8;
1064
1132
 
1065
1133
  declare const BranchPicker: FC;
1066
1134
  declare const exports$7: {
1067
- Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1135
+ Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1068
1136
  ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
1069
1137
  } & {
1070
1138
  asChild?: boolean;
1071
1139
  }, "ref"> & {
1072
1140
  hideWhenSingleBranch?: boolean | undefined;
1073
- } & react.RefAttributes<HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1141
+ } & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1074
1142
  Previous: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1075
1143
  Next: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1076
1144
  };
1077
1145
  declare const _default$6: typeof BranchPicker & typeof exports$7;
1078
1146
 
1079
1147
  declare const Composer: FC;
1080
- declare const ComposerInputStyled: react.ForwardRefExoticComponent<Partial<Omit<Omit<react_textarea_autosize.TextareaAutosizeProps & {
1148
+ declare const ComposerInputStyled: react.ForwardRefExoticComponent<Partial<Omit<react_textarea_autosize.TextareaAutosizeProps & {
1081
1149
  asChild?: boolean | undefined;
1082
- } & react.RefAttributes<HTMLTextAreaElement>, "ref">, "asChild">> & react.RefAttributes<HTMLTextAreaElement>>;
1150
+ } & react.RefAttributes<HTMLTextAreaElement>, "ref">> & react.RefAttributes<HTMLTextAreaElement>>;
1083
1151
  type ComposerInputProps = ComponentPropsWithoutRef<typeof ComposerInputStyled>;
1084
1152
  declare const exports$6: {
1085
- Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
1153
+ Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
1086
1154
  ref?: ((instance: HTMLFormElement | 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<HTMLFormElement> | null | undefined;
1087
1155
  } & {
1088
1156
  asChild?: boolean;
1089
- }, "ref"> & react.RefAttributes<HTMLFormElement>, "ref">, "asChild">> & react.RefAttributes<HTMLFormElement>>;
1090
- Input: react.ForwardRefExoticComponent<Omit<Partial<Omit<Omit<react_textarea_autosize.TextareaAutosizeProps & {
1157
+ }, "ref"> & react.RefAttributes<HTMLFormElement>, "ref">> & react.RefAttributes<HTMLFormElement>>;
1158
+ Input: react.ForwardRefExoticComponent<Omit<Partial<Omit<react_textarea_autosize.TextareaAutosizeProps & {
1091
1159
  asChild?: boolean | undefined;
1092
- } & react.RefAttributes<HTMLTextAreaElement>, "ref">, "asChild">> & react.RefAttributes<HTMLTextAreaElement>, "ref"> & react.RefAttributes<HTMLTextAreaElement>>;
1160
+ } & react.RefAttributes<HTMLTextAreaElement>, "ref">> & react.RefAttributes<HTMLTextAreaElement>, "ref"> & react.RefAttributes<HTMLTextAreaElement>>;
1093
1161
  Action: FC;
1094
1162
  Send: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1095
1163
  Cancel: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
@@ -1098,15 +1166,15 @@ declare const _default$5: typeof Composer & typeof exports$6;
1098
1166
 
1099
1167
  declare const EditComposer: FC;
1100
1168
  declare const exports$5: {
1101
- Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
1169
+ Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
1102
1170
  ref?: ((instance: HTMLFormElement | 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<HTMLFormElement> | null | undefined;
1103
1171
  } & {
1104
1172
  asChild?: boolean;
1105
- }, "ref"> & react.RefAttributes<HTMLFormElement>, "ref">, "asChild">> & react.RefAttributes<HTMLFormElement>>;
1106
- Input: react.ForwardRefExoticComponent<Partial<Omit<Omit<react_textarea_autosize.TextareaAutosizeProps & {
1173
+ }, "ref"> & react.RefAttributes<HTMLFormElement>, "ref">> & react.RefAttributes<HTMLFormElement>>;
1174
+ Input: react.ForwardRefExoticComponent<Partial<Omit<react_textarea_autosize.TextareaAutosizeProps & {
1107
1175
  asChild?: boolean | undefined;
1108
- } & react.RefAttributes<HTMLTextAreaElement>, "ref">, "asChild">> & react.RefAttributes<HTMLTextAreaElement>>;
1109
- Footer: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1176
+ } & react.RefAttributes<HTMLTextAreaElement>, "ref">> & react.RefAttributes<HTMLTextAreaElement>>;
1177
+ Footer: react.ForwardRefExoticComponent<Partial<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1110
1178
  Cancel: react.ForwardRefExoticComponent<Partial<ButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1111
1179
  Send: react.ForwardRefExoticComponent<Partial<ButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1112
1180
  };
@@ -1124,11 +1192,11 @@ declare const exports$4: {
1124
1192
  } & {
1125
1193
  children?: react.ReactNode | undefined;
1126
1194
  } & react.RefAttributes<HTMLDivElement>>;
1127
- Viewport: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1195
+ Viewport: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1128
1196
  ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
1129
1197
  } & {
1130
1198
  asChild?: boolean;
1131
- }, "ref"> & UseThreadViewportAutoScrollProps & react.RefAttributes<HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1199
+ }, "ref"> & UseThreadViewportAutoScrollProps & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1132
1200
  Messages: FC<{
1133
1201
  components?: {
1134
1202
  UserMessage?: ComponentType | undefined;
@@ -1138,35 +1206,35 @@ declare const exports$4: {
1138
1206
  };
1139
1207
  }>;
1140
1208
  ScrollToBottom: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1141
- ViewportFooter: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1209
+ ViewportFooter: react.ForwardRefExoticComponent<Partial<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1142
1210
  };
1143
1211
  declare const _default$3: typeof Thread & typeof exports$4;
1144
1212
 
1145
1213
  declare const UserMessage: FC;
1146
1214
  type UserMessageContentProps = MessagePrimitiveContentProps & ComponentPropsWithoutRef<"div">;
1147
1215
  declare const exports$3: {
1148
- Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1216
+ Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1149
1217
  ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
1150
1218
  } & {
1151
1219
  asChild?: boolean;
1152
- }, "ref"> & react.RefAttributes<HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1220
+ }, "ref"> & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1153
1221
  Content: react.ForwardRefExoticComponent<MessagePrimitiveContentProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1154
1222
  };
1155
1223
  declare const _default$2: typeof UserMessage & typeof exports$3;
1156
1224
 
1157
1225
  declare const UserActionBar: FC;
1158
1226
  declare const exports$2: {
1159
- Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1227
+ Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1160
1228
  ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
1161
1229
  } & {
1162
1230
  asChild?: boolean;
1163
- }, "ref"> & UseActionBarFloatStatusProps & react.RefAttributes<HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1231
+ }, "ref"> & UseActionBarFloatStatusProps & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1164
1232
  Edit: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
1165
1233
  };
1166
1234
  declare const _default$1: typeof UserActionBar & typeof exports$2;
1167
1235
 
1168
1236
  declare const ThreadWelcome: FC;
1169
- declare const ThreadWelcomeMessageStyled: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "asChild">> & react.RefAttributes<HTMLParagraphElement>>;
1237
+ declare const ThreadWelcomeMessageStyled: react.ForwardRefExoticComponent<Partial<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">> & react.RefAttributes<HTMLParagraphElement>>;
1170
1238
  type ThreadWelcomeMessageProps = Omit<ComponentPropsWithoutRef<typeof ThreadWelcomeMessageStyled>, "children"> & {
1171
1239
  message?: string | undefined;
1172
1240
  };
@@ -1175,9 +1243,9 @@ type ThreadWelcomeSuggestionProps = {
1175
1243
  };
1176
1244
  declare const exports$1: {
1177
1245
  Root: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1178
- Center: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "asChild">> & react.RefAttributes<HTMLDivElement>>;
1246
+ Center: react.ForwardRefExoticComponent<Partial<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
1179
1247
  Avatar: FC;
1180
- Message: react.ForwardRefExoticComponent<Omit<Omit<Partial<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "asChild">> & react.RefAttributes<HTMLParagraphElement>, "ref">, "children"> & {
1248
+ Message: react.ForwardRefExoticComponent<Omit<Omit<Partial<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">> & react.RefAttributes<HTMLParagraphElement>, "ref">, "children"> & {
1181
1249
  message?: string | undefined;
1182
1250
  } & react.RefAttributes<HTMLParagraphElement>>;
1183
1251
  Suggestions: FC;
@@ -1189,4 +1257,4 @@ declare const exports: {
1189
1257
  Text: FC;
1190
1258
  };
1191
1259
 
1192
- export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type AddToolResultOptions, AppendMessage, _default$9 as AssistantActionBar, type AssistantActionsState, type AssistantContextValue, _default$8 as AssistantMessage, type AssistantMessageConfig, type AssistantMessageContentProps, _default$7 as AssistantModal, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, type AssistantModelConfigState, type AssistantRuntime, AssistantRuntimeProvider, type AssistantToolProps, type AssistantToolUIProps, type AssistantToolUIsState, _default$6 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$5 as Composer, type ComposerContextValue, type ComposerInputProps, index$3 as ComposerPrimitive, type ComposerPrimitiveCancelProps, type ComposerPrimitiveIfProps, type ComposerPrimitiveInputProps, type ComposerPrimitiveRootProps, type ComposerPrimitiveSendProps, type ComposerState, exports as ContentPart, type ContentPartContextValue, index$2 as ContentPartPrimitive, type ContentPartPrimitiveDisplayProps, type ContentPartPrimitiveImageProps, type ContentPartPrimitiveInProgressProps, type ContentPartPrimitiveTextProps, type ContentPartState, CoreMessage, type DangerousInBrowserRuntimeOptions, EdgeChatAdapter, type EdgeRuntimeOptions, _default$4 as EditComposer, type EditComposerState, type ExternalStoreAdapter, type ExternalStoreMessageConverter, ExternalStoreRuntime, internal as INTERNAL, ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type LocalRuntimeOptions, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, type MessageState, MessageStatus, type MessageUtilsState, ModelConfig, ModelConfigProvider, type ReactThreadRuntime, StreamUtils, type StringsConfig, type SuggestionConfig, TextContentPart, type TextContentPartComponent, type TextContentPartProps, _default$3 as Thread, type ThreadActionsState, ThreadAssistantContentPart, 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, 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$1 as UserActionBar, _default$2 as UserMessage, type UserMessageConfig, type UserMessageContentProps, fromCoreMessage, fromCoreMessages, fromLanguageModelMessages, fromLanguageModelTools, getExternalStoreMessage, makeAssistantTool, makeAssistantToolUI, streamUtils, subscribeToMainThread, toCoreMessage, toCoreMessages, toLanguageModelMessages, toLanguageModelTools, useActionBarCopy, useActionBarEdit, useActionBarReload, useAppendMessage, useAssistantContext, useAssistantInstructions, useAssistantTool, useAssistantToolUI, useBranchPickerCount, useBranchPickerNext, useBranchPickerNumber, useBranchPickerPrevious, useComposerCancel, useComposerContext, useComposerIf, useComposerSend, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartText, useDangerousInBrowserRuntime, useEdgeRuntime, useExternalStoreRuntime, useLocalRuntime, useMessageContext, useMessageIf, useSwitchToNewThread, useThreadConfig, useThreadContext, useThreadEmpty, useThreadIf, useThreadScrollToBottom, useThreadSuggestion };
1260
+ export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type ActionBarPrimitiveSpeakProps, type ActionBarPrimitiveStopSpeakingProps, type AddToolResultOptions, AppendMessage, _default$9 as AssistantActionBar, type AssistantActionsState, type AssistantContextValue, _default$8 as AssistantMessage, type AssistantMessageConfig, type AssistantMessageContentProps, _default$7 as AssistantModal, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, type AssistantModelConfigState, type AssistantRuntime, AssistantRuntimeProvider, type AssistantToolProps, type AssistantToolUIProps, type AssistantToolUIsState, _default$6 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$5 as Composer, type ComposerContextValue, type ComposerInputProps, index$3 as ComposerPrimitive, type ComposerPrimitiveCancelProps, type ComposerPrimitiveIfProps, type ComposerPrimitiveInputProps, type ComposerPrimitiveRootProps, type ComposerPrimitiveSendProps, type ComposerState, exports as ContentPart, type ContentPartContextValue, index$2 as ContentPartPrimitive, type ContentPartPrimitiveDisplayProps, type ContentPartPrimitiveImageProps, type ContentPartPrimitiveInProgressProps, type ContentPartPrimitiveTextProps, type ContentPartState, CoreMessage, type DangerousInBrowserRuntimeOptions, EdgeChatAdapter, type EdgeRuntimeOptions, _default$4 as EditComposer, type EditComposerState, type ExternalStoreAdapter, type ExternalStoreMessageConverter, ExternalStoreRuntime, internal as INTERNAL, ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type LocalRuntimeOptions, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, type MessageState, MessageStatus, type MessageUtilsState, ModelConfig, ModelConfigProvider, type ReactThreadRuntime, SpeechSynthesisAdapter, StreamUtils, type StringsConfig, type SuggestionConfig, TextContentPart, type TextContentPartComponent, type TextContentPartProps, _default$3 as Thread, type ThreadActionsState, ThreadAssistantContentPart, 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, 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$1 as UserActionBar, _default$2 as UserMessage, type UserMessageConfig, type UserMessageContentProps, WebSpeechSynthesisAdapter, fromCoreMessage, fromCoreMessages, fromLanguageModelMessages, fromLanguageModelTools, getExternalStoreMessage, makeAssistantTool, makeAssistantToolUI, streamUtils, subscribeToMainThread, toCoreMessage, toCoreMessages, toLanguageModelMessages, toLanguageModelTools, useActionBarCopy, useActionBarEdit, useActionBarReload, useActionBarSpeak, useActionBarStopSpeaking, useAppendMessage, useAssistantContext, useAssistantInstructions, useAssistantTool, useAssistantToolUI, useBranchPickerCount, useBranchPickerNext, useBranchPickerNumber, useBranchPickerPrevious, useComposerCancel, useComposerContext, useComposerIf, useComposerSend, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartText, useDangerousInBrowserRuntime, useEdgeRuntime, useExternalStoreRuntime, useLocalRuntime, useMessageContext, useMessageIf, useSwitchToNewThread, useThreadConfig, useThreadContext, useThreadEmpty, useThreadIf, useThreadScrollToBottom, useThreadSuggestion };