@assistant-ui/react 0.5.1 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -204,17 +204,33 @@ declare abstract class BaseAssistantRuntime<TThreadRuntime extends ReactThreadRu
204
204
  private subscriptionHandler;
205
205
  }
206
206
 
207
+ type TextContentPartProps = {
208
+ part: TextContentPart;
209
+ status: ContentPartStatus;
210
+ };
211
+ type TextContentPartComponent = ComponentType<TextContentPartProps>;
212
+ type ImageContentPartProps = {
213
+ part: ImageContentPart;
214
+ status: ContentPartStatus;
215
+ };
216
+ type ImageContentPartComponent = ComponentType<ImageContentPartProps>;
217
+ type UIContentPartProps = {
218
+ part: UIContentPart;
219
+ status: ContentPartStatus;
220
+ };
221
+ type UIContentPartComponent = ComponentType<UIContentPartProps>;
222
+ type ToolCallContentPartProps<TArgs extends Record<string, unknown> = any, TResult = unknown> = {
223
+ part: ToolCallContentPart<TArgs, TResult>;
224
+ status: ToolContentPartStatus;
225
+ addResult: (result: any) => void;
226
+ };
227
+ type ToolCallContentPartComponent<TArgs extends Record<string, unknown> = any, TResult = any> = ComponentType<ToolCallContentPartProps<TArgs, TResult>>;
228
+
207
229
  type LocalRuntimeOptions = {
208
230
  initialMessages?: readonly CoreMessage[] | undefined;
209
231
  maxToolRoundtrips?: number;
210
232
  };
211
- declare class LocalRuntime extends BaseAssistantRuntime<LocalThreadRuntime> {
212
- private readonly _proxyConfigProvider;
213
- constructor(adapter: ChatModelAdapter, options?: LocalRuntimeOptions);
214
- set adapter(adapter: ChatModelAdapter);
215
- registerModelConfigProvider(provider: ModelConfigProvider): () => void;
216
- switchToThread(threadId: string | null): LocalThreadRuntime;
217
- }
233
+
218
234
  declare class LocalThreadRuntime implements ThreadRuntime {
219
235
  private configProvider;
220
236
  adapter: ChatModelAdapter;
@@ -242,32 +258,18 @@ declare class LocalThreadRuntime implements ThreadRuntime {
242
258
  addToolResult({ messageId, toolCallId, result }: AddToolResultOptions): void;
243
259
  }
244
260
 
261
+ declare class LocalRuntime extends BaseAssistantRuntime<LocalThreadRuntime> {
262
+ private readonly _proxyConfigProvider;
263
+ constructor(adapter: ChatModelAdapter, options?: LocalRuntimeOptions);
264
+ set adapter(adapter: ChatModelAdapter);
265
+ registerModelConfigProvider(provider: ModelConfigProvider): () => void;
266
+ switchToThread(threadId: string | null): LocalThreadRuntime;
267
+ }
268
+
245
269
  declare const useLocalRuntime: (adapter: ChatModelAdapter, options?: LocalRuntimeOptions) => LocalRuntime;
246
270
 
247
271
  declare function toLanguageModelMessages(message: readonly CoreMessage[] | readonly ThreadMessage[]): LanguageModelV1Message[];
248
272
 
249
- type TextContentPartProps = {
250
- part: TextContentPart;
251
- status: ContentPartStatus;
252
- };
253
- type TextContentPartComponent = ComponentType<TextContentPartProps>;
254
- type ImageContentPartProps = {
255
- part: ImageContentPart;
256
- status: ContentPartStatus;
257
- };
258
- type ImageContentPartComponent = ComponentType<ImageContentPartProps>;
259
- type UIContentPartProps = {
260
- part: UIContentPart;
261
- status: ContentPartStatus;
262
- };
263
- type UIContentPartComponent = ComponentType<UIContentPartProps>;
264
- type ToolCallContentPartProps<TArgs extends Record<string, unknown> = any, TResult = unknown> = {
265
- part: ToolCallContentPart<TArgs, TResult>;
266
- status: ToolContentPartStatus;
267
- addResult: (result: any) => void;
268
- };
269
- type ToolCallContentPartComponent<TArgs extends Record<string, unknown> = any, TResult = any> = ComponentType<ToolCallContentPartProps<TArgs, TResult>>;
270
-
271
273
  type fromLanguageModelMessagesOptions = {
272
274
  mergeRoundtrips: boolean;
273
275
  };
@@ -548,6 +550,131 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
548
550
  }>;
549
551
  type EdgeRuntimeRequestOptions = z.infer<typeof EdgeRuntimeRequestOptionsSchema>;
550
552
 
553
+ type ExternalStoreMessageConverter<T> = (message: T, idx: number) => ThreadMessage;
554
+ type ExternalStoreMessageConverterAdapter<T> = {
555
+ convertMessage: ExternalStoreMessageConverter<T>;
556
+ };
557
+ type ExternalStoreAdapterBase<T> = {
558
+ threadId?: string;
559
+ isRunning?: boolean;
560
+ messages: T[];
561
+ setMessages?: (messages: T[]) => void;
562
+ onNew: (message: AppendMessage) => Promise<void>;
563
+ onEdit?: ((message: AppendMessage) => Promise<void>) | undefined;
564
+ onReload?: ((parentId: string | null) => Promise<void>) | undefined;
565
+ onCancel?: (() => Promise<void>) | undefined;
566
+ onNewThread?: () => Promise<void> | void;
567
+ onAddToolResult?: (options: AddToolResultOptions) => Promise<void> | void;
568
+ onSwitchThread?: (threadId: string | null) => Promise<void> | void;
569
+ convertMessage?: ExternalStoreMessageConverter<T> | undefined;
570
+ };
571
+ type ExternalStoreAdapter<T = ThreadMessage> = ExternalStoreAdapterBase<T> & (T extends ThreadMessage ? object : ExternalStoreMessageConverterAdapter<T>);
572
+
573
+ declare class ProxyConfigProvider implements ModelConfigProvider {
574
+ private _providers;
575
+ getModelConfig(): ModelConfig;
576
+ registerModelConfigProvider(provider: ModelConfigProvider): () => void;
577
+ }
578
+
579
+ declare class MessageRepository {
580
+ private messages;
581
+ private head;
582
+ private root;
583
+ private performOp;
584
+ getMessages(): ThreadMessage[];
585
+ addOrUpdateMessage(parentId: string | null, message: ThreadMessage): void;
586
+ getMessage(messageId: string): {
587
+ parentId: string | null;
588
+ message: ThreadMessage;
589
+ };
590
+ appendOptimisticMessage(parentId: string | null, message: CoreMessage): string;
591
+ deleteMessage(messageId: string, replacementId?: string | null | undefined): void;
592
+ getBranches(messageId: string): string[];
593
+ switchToBranch(messageId: string): void;
594
+ resetHead(messageId: string | null): void;
595
+ }
596
+
597
+ declare const useSmooth: (text: string, smooth?: boolean) => string;
598
+
599
+ declare const buttonVariants: (props?: ({
600
+ variant?: "default" | "outline" | "ghost" | null | undefined;
601
+ size?: "default" | "icon" | null | undefined;
602
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
603
+ type ButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button> & VariantProps<typeof buttonVariants>;
604
+
605
+ type TooltipIconButtonProps = ButtonProps & {
606
+ tooltip: string;
607
+ side?: "top" | "bottom" | "left" | "right";
608
+ };
609
+ declare const TooltipIconButton: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
610
+ 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;
611
+ } & {
612
+ asChild?: boolean;
613
+ }, "ref"> & class_variance_authority.VariantProps<(props?: ({
614
+ variant?: "default" | "outline" | "ghost" | null | undefined;
615
+ size?: "default" | "icon" | null | undefined;
616
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & {
617
+ tooltip: string;
618
+ side?: "top" | "bottom" | "left" | "right";
619
+ } & react.RefAttributes<HTMLButtonElement>>;
620
+
621
+ declare const generateId: (size?: number) => string;
622
+
623
+ type internal_BaseAssistantRuntime<TThreadRuntime extends ReactThreadRuntime> = BaseAssistantRuntime<TThreadRuntime>;
624
+ declare const internal_BaseAssistantRuntime: typeof BaseAssistantRuntime;
625
+ type internal_MessageRepository = MessageRepository;
626
+ declare const internal_MessageRepository: typeof MessageRepository;
627
+ type internal_ProxyConfigProvider = ProxyConfigProvider;
628
+ declare const internal_ProxyConfigProvider: typeof ProxyConfigProvider;
629
+ declare const internal_TooltipIconButton: typeof TooltipIconButton;
630
+ declare const internal_generateId: typeof generateId;
631
+ declare const internal_useSmooth: typeof useSmooth;
632
+ declare namespace internal {
633
+ export { internal_BaseAssistantRuntime as BaseAssistantRuntime, internal_MessageRepository as MessageRepository, internal_ProxyConfigProvider as ProxyConfigProvider, internal_TooltipIconButton as TooltipIconButton, internal_generateId as generateId, internal_useSmooth as useSmooth };
634
+ }
635
+
636
+ declare class ExternalStoreThreadRuntime implements ReactThreadRuntime {
637
+ store: ExternalStoreAdapter<any>;
638
+ private _subscriptions;
639
+ private repository;
640
+ private assistantOptimisticId;
641
+ private useStore;
642
+ get capabilities(): {
643
+ edit: boolean;
644
+ reload: boolean;
645
+ cancel: boolean;
646
+ copy: boolean;
647
+ };
648
+ messages: ThreadMessage[];
649
+ isRunning: boolean;
650
+ constructor(store: ExternalStoreAdapter<any>);
651
+ getBranches(messageId: string): string[];
652
+ switchToBranch(branchId: string): void;
653
+ append(message: AppendMessage): Promise<void>;
654
+ startRun(parentId: string | null): Promise<void>;
655
+ cancelRun(): void;
656
+ subscribe(callback: () => void): Unsubscribe;
657
+ private updateMessages;
658
+ onStoreUpdated(): void;
659
+ private updateData;
660
+ unstable_synchronizer: () => null;
661
+ addToolResult(options: AddToolResultOptions): void;
662
+ }
663
+
664
+ declare class ExternalStoreRuntime extends BaseAssistantRuntime<ExternalStoreThreadRuntime> {
665
+ private readonly _proxyConfigProvider;
666
+ constructor(store: ExternalStoreAdapter<any>);
667
+ set store(store: ExternalStoreAdapter<any>);
668
+ onStoreUpdated(): void;
669
+ getModelConfig(): ModelConfig;
670
+ registerModelConfigProvider(provider: ModelConfigProvider): () => void;
671
+ switchToThread(threadId: string | null): void | Promise<void>;
672
+ }
673
+
674
+ declare const useExternalStoreRuntime: (store: ExternalStoreAdapter<any>) => ExternalStoreRuntime;
675
+
676
+ declare const getExternalStoreMessage: <T>(message: ThreadMessage) => T | undefined;
677
+
551
678
  type ThreadRuntimeStore = ThreadRuntime;
552
679
 
553
680
  type AddToolResultOptions = {
@@ -1171,28 +1298,6 @@ type ThreadConfigProviderProps = PropsWithChildren<{
1171
1298
  }>;
1172
1299
  declare const ThreadConfigProvider: FC<ThreadConfigProviderProps>;
1173
1300
 
1174
- declare const buttonVariants: (props?: ({
1175
- variant?: "default" | "outline" | "ghost" | null | undefined;
1176
- size?: "default" | "icon" | null | undefined;
1177
- } & class_variance_authority_types.ClassProp) | undefined) => string;
1178
- type ButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button> & VariantProps<typeof buttonVariants>;
1179
-
1180
- type TooltipIconButtonProps = ButtonProps & {
1181
- tooltip: string;
1182
- side?: "top" | "bottom" | "left" | "right";
1183
- };
1184
- declare const TooltipIconButton: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1185
- 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;
1186
- } & {
1187
- asChild?: boolean;
1188
- }, "ref"> & class_variance_authority.VariantProps<(props?: ({
1189
- variant?: "default" | "outline" | "ghost" | null | undefined;
1190
- size?: "default" | "icon" | null | undefined;
1191
- } & class_variance_authority_types.ClassProp) | undefined) => string> & {
1192
- tooltip: string;
1193
- side?: "top" | "bottom" | "left" | "right";
1194
- } & react.RefAttributes<HTMLButtonElement>>;
1195
-
1196
1301
  declare const AssistantActionBar: FC;
1197
1302
  declare const exports$a: {
1198
1303
  Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
@@ -1359,45 +1464,4 @@ declare const exports: {
1359
1464
  Text: FC<TextContentPartProps>;
1360
1465
  };
1361
1466
 
1362
- declare class ProxyConfigProvider implements ModelConfigProvider {
1363
- private _providers;
1364
- getModelConfig(): ModelConfig;
1365
- registerModelConfigProvider(provider: ModelConfigProvider): () => void;
1366
- }
1367
-
1368
- declare class MessageRepository {
1369
- private messages;
1370
- private head;
1371
- private root;
1372
- private performOp;
1373
- getMessages(): ThreadMessage[];
1374
- addOrUpdateMessage(parentId: string | null, message: ThreadMessage): void;
1375
- getMessage(messageId: string): {
1376
- parentId: string | null;
1377
- message: ThreadMessage;
1378
- };
1379
- appendOptimisticMessage(parentId: string | null, message: CoreMessage): string;
1380
- deleteMessage(messageId: string, replacementId?: string | null | undefined): void;
1381
- getBranches(messageId: string): string[];
1382
- switchToBranch(messageId: string): void;
1383
- resetHead(messageId: string | null): void;
1384
- }
1385
-
1386
- declare const useSmooth: (text: string, smooth?: boolean) => string;
1387
-
1388
- declare const generateId: (size?: number) => string;
1389
-
1390
- type internal_BaseAssistantRuntime<TThreadRuntime extends ReactThreadRuntime> = BaseAssistantRuntime<TThreadRuntime>;
1391
- declare const internal_BaseAssistantRuntime: typeof BaseAssistantRuntime;
1392
- type internal_MessageRepository = MessageRepository;
1393
- declare const internal_MessageRepository: typeof MessageRepository;
1394
- type internal_ProxyConfigProvider = ProxyConfigProvider;
1395
- declare const internal_ProxyConfigProvider: typeof ProxyConfigProvider;
1396
- declare const internal_TooltipIconButton: typeof TooltipIconButton;
1397
- declare const internal_generateId: typeof generateId;
1398
- declare const internal_useSmooth: typeof useSmooth;
1399
- declare namespace internal {
1400
- export { internal_BaseAssistantRuntime as BaseAssistantRuntime, internal_MessageRepository as MessageRepository, internal_ProxyConfigProvider as ProxyConfigProvider, internal_TooltipIconButton as TooltipIconButton, internal_generateId as generateId, internal_useSmooth as useSmooth };
1401
- }
1402
-
1403
- export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type AddToolResultOptions, type 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, type CoreAssistantContentPart, type CoreAssistantMessage, type CoreMessage, type CoreSystemMessage, type CoreUserContentPart, type CoreUserMessage, EdgeChatAdapter, type EdgeRuntimeOptions, type EdgeRuntimeRequestOptions, _default$4 as EditComposer, type EditComposerState, internal as INTERNAL, type ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type LocalRuntimeOptions, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, type MessageState, type MessageStatus, type MessageUtilsState, type ModelConfig, type ModelConfigProvider, type ReactThreadRuntime, type StringsConfig, type SuggestionConfig, type TextContentPart, type TextContentPartComponent, type TextContentPartProps, _default$3 as Thread, type ThreadActionsState, type ThreadAssistantContentPart, type ThreadAssistantMessage, type ThreadConfig, ThreadConfigProvider, type ThreadConfigProviderProps, type ThreadContextValue, type ThreadMessage, type ThreadMessagesState, index as ThreadPrimitive, type ThreadPrimitiveEmptyProps, type ThreadPrimitiveIfProps, type ThreadPrimitiveMessagesProps, type ThreadPrimitiveRootProps, type ThreadPrimitiveScrollToBottomProps, type ThreadPrimitiveSuggestionProps, type ThreadPrimitiveViewportProps, type ThreadRootProps, type ThreadRuntime, type ThreadState, type ThreadSystemMessage, type ThreadUserContentPart, type ThreadUserMessage, type ThreadViewportState, _default as ThreadWelcome, type ThreadWelcomeConfig, type ThreadWelcomeMessageProps, type ThreadWelcomeSuggestionProps, type Tool, type ToolCallContentPart, type ToolCallContentPartComponent, type ToolCallContentPartProps, type 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, makeAssistantTool, makeAssistantToolUI, toCoreMessage, toCoreMessages, toLanguageModelMessages, toLanguageModelTools, useActionBarCopy, useActionBarEdit, useActionBarReload, useAppendMessage, useAssistantContext, useAssistantInstructions, useAssistantTool, useAssistantToolUI, useBranchPickerCount, useBranchPickerNext, useBranchPickerNumber, useBranchPickerPrevious, useComposerCancel, useComposerContext, useComposerIf, useComposerSend, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartText, useEdgeRuntime, useLocalRuntime, useMessageContext, useMessageIf, useSwitchToNewThread, useThreadConfig, useThreadContext, useThreadEmpty, useThreadIf, useThreadScrollToBottom, useThreadSuggestion };
1467
+ export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type AddToolResultOptions, type 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, type CoreAssistantContentPart, type CoreAssistantMessage, type CoreMessage, type CoreSystemMessage, type CoreUserContentPart, type CoreUserMessage, EdgeChatAdapter, type EdgeRuntimeOptions, type EdgeRuntimeRequestOptions, _default$4 as EditComposer, type EditComposerState, type ExternalStoreAdapter, type ExternalStoreMessageConverter, ExternalStoreRuntime, internal as INTERNAL, type ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type LocalRuntimeOptions, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, type MessageState, type MessageStatus, type MessageUtilsState, type ModelConfig, type ModelConfigProvider, type ReactThreadRuntime, type StringsConfig, type SuggestionConfig, type TextContentPart, type TextContentPartComponent, type TextContentPartProps, _default$3 as Thread, type ThreadActionsState, type ThreadAssistantContentPart, type ThreadAssistantMessage, type ThreadConfig, ThreadConfigProvider, type ThreadConfigProviderProps, type ThreadContextValue, type ThreadMessage, type ThreadMessagesState, index as ThreadPrimitive, type ThreadPrimitiveEmptyProps, type ThreadPrimitiveIfProps, type ThreadPrimitiveMessagesProps, type ThreadPrimitiveRootProps, type ThreadPrimitiveScrollToBottomProps, type ThreadPrimitiveSuggestionProps, type ThreadPrimitiveViewportProps, type ThreadRootProps, type ThreadRuntime, type ThreadState, type ThreadSystemMessage, type ThreadUserContentPart, type ThreadUserMessage, type ThreadViewportState, _default as ThreadWelcome, type ThreadWelcomeConfig, type ThreadWelcomeMessageProps, type ThreadWelcomeSuggestionProps, type Tool, type ToolCallContentPart, type ToolCallContentPartComponent, type ToolCallContentPartProps, type 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, toCoreMessage, toCoreMessages, toLanguageModelMessages, toLanguageModelTools, useActionBarCopy, useActionBarEdit, useActionBarReload, useAppendMessage, useAssistantContext, useAssistantInstructions, useAssistantTool, useAssistantToolUI, useBranchPickerCount, useBranchPickerNext, useBranchPickerNumber, useBranchPickerPrevious, useComposerCancel, useComposerContext, useComposerIf, useComposerSend, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartText, useEdgeRuntime, useExternalStoreRuntime, useLocalRuntime, useMessageContext, useMessageIf, useSwitchToNewThread, useThreadConfig, useThreadContext, useThreadEmpty, useThreadIf, useThreadScrollToBottom, useThreadSuggestion };