@assistant-ui/react 0.2.4 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +67 -52
- package/dist/index.d.ts +67 -52
- package/dist/index.js +194 -192
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +182 -177
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
@@ -8,14 +8,14 @@ import { TextareaAutosizeProps } from 'react-textarea-autosize';
|
|
8
8
|
|
9
9
|
type ToolExecuteFunction<TArgs, TResult> = (args: TArgs) => TResult | Promise<TResult>;
|
10
10
|
type Tool<TArgs = unknown, TResult = unknown> = {
|
11
|
-
description?: string;
|
11
|
+
description?: string | undefined;
|
12
12
|
parameters: z.ZodSchema<TArgs>;
|
13
13
|
execute: ToolExecuteFunction<TArgs, TResult>;
|
14
14
|
};
|
15
15
|
type ModelConfig = {
|
16
|
-
priority?: number;
|
17
|
-
system?: string;
|
18
|
-
tools?: Record<string, Tool<any, any
|
16
|
+
priority?: number | undefined;
|
17
|
+
system?: string | undefined;
|
18
|
+
tools?: Record<string, Tool<any, any>> | undefined;
|
19
19
|
};
|
20
20
|
type ModelConfigProvider = () => ModelConfig;
|
21
21
|
|
@@ -82,6 +82,12 @@ type ChatModelAdapter = {
|
|
82
82
|
|
83
83
|
declare abstract class BaseAssistantRuntime<TThreadRuntime extends ReactThreadRuntime> implements AssistantRuntime {
|
84
84
|
private _thread;
|
85
|
+
get capabilities(): Readonly<{
|
86
|
+
edit: boolean;
|
87
|
+
reload: boolean;
|
88
|
+
cancel: boolean;
|
89
|
+
copy: boolean;
|
90
|
+
}>;
|
85
91
|
constructor(_thread: TThreadRuntime);
|
86
92
|
private _unsubscribe;
|
87
93
|
get thread(): TThreadRuntime;
|
@@ -114,7 +120,13 @@ declare class LocalThreadRuntime implements ThreadRuntime {
|
|
114
120
|
adapter: ChatModelAdapter;
|
115
121
|
private _subscriptions;
|
116
122
|
private abortController;
|
117
|
-
private repository;
|
123
|
+
private readonly repository;
|
124
|
+
readonly capabilities: Readonly<{
|
125
|
+
edit: true;
|
126
|
+
reload: true;
|
127
|
+
cancel: true;
|
128
|
+
copy: true;
|
129
|
+
}>;
|
118
130
|
get messages(): ThreadMessage[];
|
119
131
|
get isRunning(): boolean;
|
120
132
|
constructor(_configProviders: Set<ModelConfigProvider>, adapter: ChatModelAdapter);
|
@@ -131,6 +143,12 @@ declare class LocalThreadRuntime implements ThreadRuntime {
|
|
131
143
|
declare const useLocalRuntime: (adapter: ChatModelAdapter) => LocalRuntime;
|
132
144
|
|
133
145
|
type ThreadActionsState = Readonly<{
|
146
|
+
capabilities: Readonly<{
|
147
|
+
edit: boolean;
|
148
|
+
reload: boolean;
|
149
|
+
cancel: boolean;
|
150
|
+
copy: boolean;
|
151
|
+
}>;
|
134
152
|
getBranches: (messageId: string) => readonly string[];
|
135
153
|
switchToBranch: (branchId: string) => void;
|
136
154
|
append: (message: AppendMessage) => void;
|
@@ -184,7 +202,7 @@ type AssistantModelConfigState = Readonly<{
|
|
184
202
|
|
185
203
|
type ContentPartState = Readonly<{
|
186
204
|
status: "in_progress" | "done" | "error";
|
187
|
-
part:
|
205
|
+
part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
|
188
206
|
}>;
|
189
207
|
|
190
208
|
type MessageState = Readonly<{
|
@@ -202,10 +220,11 @@ type BaseComposerState = Readonly<{
|
|
202
220
|
type ReadonlyStore<T> = UseBoundStore<Omit<StoreApi<T>, "setState" | "destroy">>;
|
203
221
|
|
204
222
|
type EditComposerState = BaseComposerState & Readonly<{
|
223
|
+
canCancel: boolean;
|
205
224
|
isEditing: boolean;
|
206
225
|
edit: () => void;
|
207
226
|
send: () => void;
|
208
|
-
cancel: () =>
|
227
|
+
cancel: () => void;
|
209
228
|
}>;
|
210
229
|
|
211
230
|
type ThreadState = Readonly<{
|
@@ -252,7 +271,6 @@ type ComposerContextValue = {
|
|
252
271
|
declare const useComposerContext: () => ComposerContextValue;
|
253
272
|
|
254
273
|
type MessageUtilsState = Readonly<{
|
255
|
-
inProgressIndicator: HTMLSpanElement;
|
256
274
|
isCopied: boolean;
|
257
275
|
setIsCopied: (value: boolean) => void;
|
258
276
|
isHovering: boolean;
|
@@ -272,16 +290,17 @@ type ContentPartContextValue = {
|
|
272
290
|
declare const useContentPartContext: () => ContentPartContextValue;
|
273
291
|
|
274
292
|
type ComposerState = BaseComposerState & Readonly<{
|
293
|
+
canCancel: boolean;
|
275
294
|
isEditing: true;
|
276
295
|
send: () => void;
|
277
|
-
cancel: () =>
|
296
|
+
cancel: () => void;
|
278
297
|
focus: () => void;
|
279
298
|
onFocus: (listener: () => void) => Unsubscribe;
|
280
299
|
}>;
|
281
300
|
|
282
301
|
type CreateAppendMessage = string | {
|
283
302
|
parentId?: string | null | undefined;
|
284
|
-
role?: AppendMessage["role"];
|
303
|
+
role?: AppendMessage["role"] | undefined;
|
285
304
|
content: AppendMessage["content"];
|
286
305
|
};
|
287
306
|
declare const useAppendMessage: () => (message: CreateAppendMessage) => void;
|
@@ -290,7 +309,7 @@ declare const useSwitchToNewThread: () => () => void;
|
|
290
309
|
|
291
310
|
type AssistantToolProps<TArgs, TResult> = Tool<TArgs, TResult> & {
|
292
311
|
toolName: string;
|
293
|
-
render?: ToolCallContentPartComponent<TArgs, TResult
|
312
|
+
render?: ToolCallContentPartComponent<TArgs, TResult> | undefined;
|
294
313
|
};
|
295
314
|
declare const useAssistantTool: <TArgs, TResult>(tool: AssistantToolProps<TArgs, TResult>) => void;
|
296
315
|
|
@@ -307,7 +326,7 @@ declare const makeAssistantToolUI: <TArgs, TResult>(tool: AssistantToolUIProps<T
|
|
307
326
|
declare const useAssistantInstructions: (instruction: string) => void;
|
308
327
|
|
309
328
|
type UseActionBarCopyProps = {
|
310
|
-
copiedDuration?: number;
|
329
|
+
copiedDuration?: number | undefined;
|
311
330
|
};
|
312
331
|
declare const useActionBarCopy: ({ copiedDuration, }?: UseActionBarCopyProps) => (() => void) | null;
|
313
332
|
|
@@ -341,7 +360,10 @@ declare const useContentPartDisplay: () => react.ReactNode;
|
|
341
360
|
|
342
361
|
declare const useContentPartImage: () => string;
|
343
362
|
|
344
|
-
declare const useContentPartText: () =>
|
363
|
+
declare const useContentPartText: () => Readonly<{
|
364
|
+
status: "in_progress" | "done" | "error";
|
365
|
+
part: TextContentPart;
|
366
|
+
}>;
|
345
367
|
|
346
368
|
type MessageIfFilters = {
|
347
369
|
user: boolean | undefined;
|
@@ -367,7 +389,7 @@ declare const useThreadScrollToBottom: () => (() => void) | null;
|
|
367
389
|
type UseApplyThreadSuggestionProps = {
|
368
390
|
prompt: string;
|
369
391
|
method: "replace";
|
370
|
-
autoSend?: boolean;
|
392
|
+
autoSend?: boolean | undefined;
|
371
393
|
};
|
372
394
|
declare const useThreadSuggestion: ({ prompt, autoSend, }: UseApplyThreadSuggestionProps) => (() => void) | null;
|
373
395
|
|
@@ -393,9 +415,7 @@ declare const ActionBarPrimitiveCopy: react.ForwardRefExoticComponent<Omit<Omit<
|
|
393
415
|
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;
|
394
416
|
} & {
|
395
417
|
asChild?: boolean;
|
396
|
-
}, "ref"> &
|
397
|
-
copiedDuration?: number;
|
398
|
-
} & react.RefAttributes<HTMLButtonElement>>;
|
418
|
+
}, "ref"> & UseActionBarCopyProps & react.RefAttributes<HTMLButtonElement>>;
|
399
419
|
|
400
420
|
type ActionBarPrimitiveReloadProps = ActionButtonProps<typeof useActionBarReload>;
|
401
421
|
declare const ActionBarPrimitiveReload: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
@@ -422,10 +442,10 @@ type AssistantModalPrimitiveTriggerProps = ComponentPropsWithoutRef<typeof Popov
|
|
422
442
|
declare const AssistantModalPrimitiveTrigger: react.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
423
443
|
|
424
444
|
type AssistantModalPrimitiveContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {
|
425
|
-
dissmissOnInteractOutside?: boolean;
|
445
|
+
dissmissOnInteractOutside?: boolean | undefined;
|
426
446
|
};
|
427
447
|
declare const AssistantModalPrimitiveContent: react.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
428
|
-
dissmissOnInteractOutside?: boolean;
|
448
|
+
dissmissOnInteractOutside?: boolean | undefined;
|
429
449
|
} & react.RefAttributes<HTMLDivElement>>;
|
430
450
|
|
431
451
|
declare const AssistantModalPrimitiveAnchor: react.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverAnchorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
@@ -456,14 +476,14 @@ declare const BranchPickerPrimitiveNumber: FC<BranchPickerPrimitiveNumberProps>;
|
|
456
476
|
|
457
477
|
type PrimitiveDivProps$3 = ComponentPropsWithoutRef<typeof Primitive.div>;
|
458
478
|
type BranchPickerPrimitiveRootProps = PrimitiveDivProps$3 & {
|
459
|
-
hideWhenSingleBranch?: boolean;
|
479
|
+
hideWhenSingleBranch?: boolean | undefined;
|
460
480
|
};
|
461
481
|
declare const BranchPickerPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
462
482
|
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;
|
463
483
|
} & {
|
464
484
|
asChild?: boolean;
|
465
485
|
}, "ref"> & {
|
466
|
-
hideWhenSingleBranch?: boolean;
|
486
|
+
hideWhenSingleBranch?: boolean | undefined;
|
467
487
|
} & react.RefAttributes<HTMLDivElement>>;
|
468
488
|
|
469
489
|
declare namespace index$4 {
|
@@ -479,10 +499,10 @@ declare const ComposerPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<r
|
|
479
499
|
}, "ref"> & react.RefAttributes<HTMLFormElement>>;
|
480
500
|
|
481
501
|
type ComposerPrimitiveInputProps = TextareaAutosizeProps & {
|
482
|
-
asChild?: boolean;
|
502
|
+
asChild?: boolean | undefined;
|
483
503
|
};
|
484
504
|
declare const ComposerPrimitiveInput: react.ForwardRefExoticComponent<TextareaAutosizeProps & {
|
485
|
-
asChild?: boolean;
|
505
|
+
asChild?: boolean | undefined;
|
486
506
|
} & react.RefAttributes<HTMLTextAreaElement>>;
|
487
507
|
|
488
508
|
type PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;
|
@@ -507,12 +527,9 @@ declare namespace index$3 {
|
|
507
527
|
export { ComposerPrimitiveCancel as Cancel, ComposerPrimitiveIf as If, ComposerPrimitiveInput as Input, ComposerPrimitiveRoot as Root, ComposerPrimitiveSend as Send };
|
508
528
|
}
|
509
529
|
|
510
|
-
type
|
511
|
-
declare const ContentPartPrimitiveInProgressIndicator: FC<ContentPartPrimitiveInProgressIndicatorProps>;
|
512
|
-
|
513
|
-
type PrimitiveSpanProps$1 = ComponentPropsWithoutRef<typeof Primitive.p>;
|
530
|
+
type PrimitiveSpanProps$1 = ComponentPropsWithoutRef<typeof Primitive.span>;
|
514
531
|
type ContentPartPrimitiveTextProps = Omit<PrimitiveSpanProps$1, "children">;
|
515
|
-
declare const ContentPartPrimitiveText: react.ForwardRefExoticComponent<ContentPartPrimitiveTextProps & react.RefAttributes<
|
532
|
+
declare const ContentPartPrimitiveText: react.ForwardRefExoticComponent<ContentPartPrimitiveTextProps & react.RefAttributes<HTMLSpanElement>>;
|
516
533
|
|
517
534
|
type PrimitiveImageProps = ComponentPropsWithoutRef<typeof Primitive.img>;
|
518
535
|
type ContentPartPrimitiveImageProps = PrimitiveImageProps;
|
@@ -525,8 +542,11 @@ declare const ContentPartPrimitiveImage: react.ForwardRefExoticComponent<Omit<Om
|
|
525
542
|
type ContentPartPrimitiveDisplayProps = {};
|
526
543
|
declare const ContentPartPrimitiveDisplay: FC<ContentPartPrimitiveDisplayProps>;
|
527
544
|
|
545
|
+
type ContentPartPrimitiveInProgressProps = PropsWithChildren;
|
546
|
+
declare const ContentPartPrimitiveInProgress: FC<ContentPartPrimitiveInProgressProps>;
|
547
|
+
|
528
548
|
declare namespace index$2 {
|
529
|
-
export { ContentPartPrimitiveDisplay as Display, ContentPartPrimitiveImage as Image,
|
549
|
+
export { ContentPartPrimitiveDisplay as Display, ContentPartPrimitiveImage as Image, ContentPartPrimitiveInProgress as InProgress, ContentPartPrimitiveText as Text };
|
530
550
|
}
|
531
551
|
|
532
552
|
type PrimitiveDivProps$2 = ComponentPropsWithoutRef<typeof Primitive.div>;
|
@@ -542,24 +562,23 @@ declare const MessagePrimitiveIf: FC<MessagePrimitiveIfProps>;
|
|
542
562
|
|
543
563
|
type MessagePrimitiveContentProps = {
|
544
564
|
components?: {
|
545
|
-
Text?: TextContentPartComponent;
|
546
|
-
Image?: ImageContentPartComponent;
|
547
|
-
UI?: UIContentPartComponent;
|
565
|
+
Text?: TextContentPartComponent | undefined;
|
566
|
+
Image?: ImageContentPartComponent | undefined;
|
567
|
+
UI?: UIContentPartComponent | undefined;
|
548
568
|
tools?: {
|
549
|
-
by_name?: Record<string, ToolCallContentPartComponent
|
550
|
-
Fallback?: ComponentType<ToolCallContentPartProps
|
569
|
+
by_name?: Record<string, ToolCallContentPartComponent | undefined> | undefined;
|
570
|
+
Fallback?: ComponentType<ToolCallContentPartProps> | undefined;
|
551
571
|
};
|
552
|
-
};
|
572
|
+
} | undefined;
|
553
573
|
};
|
554
574
|
declare const MessagePrimitiveContent: FC<MessagePrimitiveContentProps>;
|
555
575
|
|
556
576
|
type PrimitiveSpanProps = ComponentPropsWithoutRef<typeof Primitive.span>;
|
557
577
|
type MessagePrimitiveInProgressProps = PrimitiveSpanProps;
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
}, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
578
|
+
/**
|
579
|
+
* @deprecated Define a custom Text renderer via ContentPartPrimitiveInProgress instead.
|
580
|
+
*/
|
581
|
+
declare const MessagePrimitiveInProgress: FC<MessagePrimitiveInProgressProps>;
|
563
582
|
|
564
583
|
declare namespace index$1 {
|
565
584
|
export { MessagePrimitiveContent as Content, MessagePrimitiveIf as If, MessagePrimitiveInProgress as InProgress, MessagePrimitiveRoot as Root };
|
@@ -596,17 +615,17 @@ declare const ThreadPrimitiveViewport: react.ForwardRefExoticComponent<Omit<Omit
|
|
596
615
|
type ThreadPrimitiveMessagesProps = {
|
597
616
|
components: {
|
598
617
|
Message: ComponentType;
|
599
|
-
UserMessage?: ComponentType;
|
600
|
-
EditComposer?: ComponentType;
|
601
|
-
AssistantMessage?: ComponentType;
|
618
|
+
UserMessage?: ComponentType | undefined;
|
619
|
+
EditComposer?: ComponentType | undefined;
|
620
|
+
AssistantMessage?: ComponentType | undefined;
|
602
621
|
} | {
|
603
|
-
Message?: ComponentType;
|
622
|
+
Message?: ComponentType | undefined;
|
604
623
|
UserMessage: ComponentType;
|
605
|
-
EditComposer?: ComponentType;
|
624
|
+
EditComposer?: ComponentType | undefined;
|
606
625
|
AssistantMessage: ComponentType;
|
607
626
|
};
|
608
627
|
};
|
609
|
-
declare const ThreadPrimitiveMessages:
|
628
|
+
declare const ThreadPrimitiveMessages: react.NamedExoticComponent<ThreadPrimitiveMessagesProps>;
|
610
629
|
|
611
630
|
type ThreadPrimitiveScrollToBottomProps = ActionButtonProps<typeof useThreadScrollToBottom>;
|
612
631
|
declare const ThreadPrimitiveScrollToBottom: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
@@ -620,11 +639,7 @@ declare const ThreadPrimitiveSuggestion: react.ForwardRefExoticComponent<Omit<Om
|
|
620
639
|
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;
|
621
640
|
} & {
|
622
641
|
asChild?: boolean;
|
623
|
-
}, "ref"> &
|
624
|
-
prompt: string;
|
625
|
-
method: "replace";
|
626
|
-
autoSend?: boolean;
|
627
|
-
} & react.RefAttributes<HTMLButtonElement>>;
|
642
|
+
}, "ref"> & UseApplyThreadSuggestionProps & react.RefAttributes<HTMLButtonElement>>;
|
628
643
|
|
629
644
|
declare namespace index {
|
630
645
|
export { ThreadPrimitiveEmpty as Empty, ThreadPrimitiveIf as If, ThreadPrimitiveMessages as Messages, ThreadPrimitiveRoot as Root, ThreadPrimitiveScrollToBottom as ScrollToBottom, ThreadPrimitiveSuggestion as Suggestion, ThreadPrimitiveViewport as Viewport };
|
@@ -660,4 +675,4 @@ declare namespace internal {
|
|
660
675
|
export { internal_BaseAssistantRuntime as BaseAssistantRuntime, internal_MessageRepository as MessageRepository, internal_ProxyConfigProvider as ProxyConfigProvider };
|
661
676
|
}
|
662
677
|
|
663
|
-
export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type AppendContentPart, type AppendMessage, type AssistantContentPart, type AssistantContextValue, type AssistantMessage, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, type AssistantModelConfigState, type AssistantRuntime, AssistantRuntimeProvider, type AssistantToolProps, type AssistantToolUIProps, index$4 as BranchPickerPrimitive, type BranchPickerPrimitiveCountProps, type BranchPickerPrimitiveNextProps, type BranchPickerPrimitiveNumberProps, type BranchPickerPrimitivePreviousProps, type BranchPickerPrimitiveRootProps, type ChatModelAdapter, type ChatModelRunOptions, type ComposerContextValue, index$3 as ComposerPrimitive, type ComposerPrimitiveCancelProps, type ComposerPrimitiveIfProps, type ComposerPrimitiveInputProps, type ComposerPrimitiveRootProps, type ComposerPrimitiveSendProps, type ComposerState, type ContentPartContextValue, index$2 as ContentPartPrimitive, type ContentPartPrimitiveDisplayProps, type ContentPartPrimitiveImageProps, type
|
678
|
+
export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type AppendContentPart, type AppendMessage, type AssistantContentPart, type AssistantContextValue, type AssistantMessage, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, type AssistantModelConfigState, type AssistantRuntime, AssistantRuntimeProvider, type AssistantToolProps, type AssistantToolUIProps, index$4 as BranchPickerPrimitive, type BranchPickerPrimitiveCountProps, type BranchPickerPrimitiveNextProps, type BranchPickerPrimitiveNumberProps, type BranchPickerPrimitivePreviousProps, type BranchPickerPrimitiveRootProps, type ChatModelAdapter, type ChatModelRunOptions, type ComposerContextValue, index$3 as ComposerPrimitive, type ComposerPrimitiveCancelProps, type ComposerPrimitiveIfProps, type ComposerPrimitiveInputProps, type ComposerPrimitiveRootProps, type ComposerPrimitiveSendProps, type ComposerState, type ContentPartContextValue, index$2 as ContentPartPrimitive, type ContentPartPrimitiveDisplayProps, type ContentPartPrimitiveImageProps, type ContentPartPrimitiveInProgressProps, type ContentPartPrimitiveTextProps, type ContentPartState, type EditComposerState, internal as INTERNAL, type ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, type MessageState, type ModelConfig, type ModelConfigProvider, type ReactThreadRuntime, type TextContentPart, type TextContentPartComponent, type TextContentPartProps, type ThreadContextValue, type ThreadMessage, index as ThreadPrimitive, type ThreadPrimitiveEmptyProps, type ThreadPrimitiveIfProps, type ThreadPrimitiveMessagesProps, type ThreadPrimitiveRootProps, type ThreadPrimitiveScrollToBottomProps, type ThreadPrimitiveSuggestionProps, type ThreadPrimitiveViewportProps, type ThreadRuntime, type ThreadState, type ThreadViewportState, type ToolCallContentPart, type ToolCallContentPartComponent, type ToolCallContentPartProps, type UIContentPart, type UIContentPartComponent, type UIContentPartProps, type Unsubscribe, type UserContentPart, type UserMessage, makeAssistantTool, makeAssistantToolUI, useActionBarCopy, useActionBarEdit, useActionBarReload, useAppendMessage, useAssistantContext, useAssistantInstructions, useAssistantTool, useAssistantToolUI, useBranchPickerCount, useBranchPickerNext, useBranchPickerNumber, useBranchPickerPrevious, useComposerCancel, useComposerContext, useComposerIf, useComposerSend, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartText, useLocalRuntime, useMessageContext, useMessageIf, useSwitchToNewThread, useThreadContext, useThreadEmpty, useThreadIf, useThreadScrollToBottom, useThreadSuggestion };
|
package/dist/index.d.ts
CHANGED
@@ -8,14 +8,14 @@ import { TextareaAutosizeProps } from 'react-textarea-autosize';
|
|
8
8
|
|
9
9
|
type ToolExecuteFunction<TArgs, TResult> = (args: TArgs) => TResult | Promise<TResult>;
|
10
10
|
type Tool<TArgs = unknown, TResult = unknown> = {
|
11
|
-
description?: string;
|
11
|
+
description?: string | undefined;
|
12
12
|
parameters: z.ZodSchema<TArgs>;
|
13
13
|
execute: ToolExecuteFunction<TArgs, TResult>;
|
14
14
|
};
|
15
15
|
type ModelConfig = {
|
16
|
-
priority?: number;
|
17
|
-
system?: string;
|
18
|
-
tools?: Record<string, Tool<any, any
|
16
|
+
priority?: number | undefined;
|
17
|
+
system?: string | undefined;
|
18
|
+
tools?: Record<string, Tool<any, any>> | undefined;
|
19
19
|
};
|
20
20
|
type ModelConfigProvider = () => ModelConfig;
|
21
21
|
|
@@ -82,6 +82,12 @@ type ChatModelAdapter = {
|
|
82
82
|
|
83
83
|
declare abstract class BaseAssistantRuntime<TThreadRuntime extends ReactThreadRuntime> implements AssistantRuntime {
|
84
84
|
private _thread;
|
85
|
+
get capabilities(): Readonly<{
|
86
|
+
edit: boolean;
|
87
|
+
reload: boolean;
|
88
|
+
cancel: boolean;
|
89
|
+
copy: boolean;
|
90
|
+
}>;
|
85
91
|
constructor(_thread: TThreadRuntime);
|
86
92
|
private _unsubscribe;
|
87
93
|
get thread(): TThreadRuntime;
|
@@ -114,7 +120,13 @@ declare class LocalThreadRuntime implements ThreadRuntime {
|
|
114
120
|
adapter: ChatModelAdapter;
|
115
121
|
private _subscriptions;
|
116
122
|
private abortController;
|
117
|
-
private repository;
|
123
|
+
private readonly repository;
|
124
|
+
readonly capabilities: Readonly<{
|
125
|
+
edit: true;
|
126
|
+
reload: true;
|
127
|
+
cancel: true;
|
128
|
+
copy: true;
|
129
|
+
}>;
|
118
130
|
get messages(): ThreadMessage[];
|
119
131
|
get isRunning(): boolean;
|
120
132
|
constructor(_configProviders: Set<ModelConfigProvider>, adapter: ChatModelAdapter);
|
@@ -131,6 +143,12 @@ declare class LocalThreadRuntime implements ThreadRuntime {
|
|
131
143
|
declare const useLocalRuntime: (adapter: ChatModelAdapter) => LocalRuntime;
|
132
144
|
|
133
145
|
type ThreadActionsState = Readonly<{
|
146
|
+
capabilities: Readonly<{
|
147
|
+
edit: boolean;
|
148
|
+
reload: boolean;
|
149
|
+
cancel: boolean;
|
150
|
+
copy: boolean;
|
151
|
+
}>;
|
134
152
|
getBranches: (messageId: string) => readonly string[];
|
135
153
|
switchToBranch: (branchId: string) => void;
|
136
154
|
append: (message: AppendMessage) => void;
|
@@ -184,7 +202,7 @@ type AssistantModelConfigState = Readonly<{
|
|
184
202
|
|
185
203
|
type ContentPartState = Readonly<{
|
186
204
|
status: "in_progress" | "done" | "error";
|
187
|
-
part:
|
205
|
+
part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
|
188
206
|
}>;
|
189
207
|
|
190
208
|
type MessageState = Readonly<{
|
@@ -202,10 +220,11 @@ type BaseComposerState = Readonly<{
|
|
202
220
|
type ReadonlyStore<T> = UseBoundStore<Omit<StoreApi<T>, "setState" | "destroy">>;
|
203
221
|
|
204
222
|
type EditComposerState = BaseComposerState & Readonly<{
|
223
|
+
canCancel: boolean;
|
205
224
|
isEditing: boolean;
|
206
225
|
edit: () => void;
|
207
226
|
send: () => void;
|
208
|
-
cancel: () =>
|
227
|
+
cancel: () => void;
|
209
228
|
}>;
|
210
229
|
|
211
230
|
type ThreadState = Readonly<{
|
@@ -252,7 +271,6 @@ type ComposerContextValue = {
|
|
252
271
|
declare const useComposerContext: () => ComposerContextValue;
|
253
272
|
|
254
273
|
type MessageUtilsState = Readonly<{
|
255
|
-
inProgressIndicator: HTMLSpanElement;
|
256
274
|
isCopied: boolean;
|
257
275
|
setIsCopied: (value: boolean) => void;
|
258
276
|
isHovering: boolean;
|
@@ -272,16 +290,17 @@ type ContentPartContextValue = {
|
|
272
290
|
declare const useContentPartContext: () => ContentPartContextValue;
|
273
291
|
|
274
292
|
type ComposerState = BaseComposerState & Readonly<{
|
293
|
+
canCancel: boolean;
|
275
294
|
isEditing: true;
|
276
295
|
send: () => void;
|
277
|
-
cancel: () =>
|
296
|
+
cancel: () => void;
|
278
297
|
focus: () => void;
|
279
298
|
onFocus: (listener: () => void) => Unsubscribe;
|
280
299
|
}>;
|
281
300
|
|
282
301
|
type CreateAppendMessage = string | {
|
283
302
|
parentId?: string | null | undefined;
|
284
|
-
role?: AppendMessage["role"];
|
303
|
+
role?: AppendMessage["role"] | undefined;
|
285
304
|
content: AppendMessage["content"];
|
286
305
|
};
|
287
306
|
declare const useAppendMessage: () => (message: CreateAppendMessage) => void;
|
@@ -290,7 +309,7 @@ declare const useSwitchToNewThread: () => () => void;
|
|
290
309
|
|
291
310
|
type AssistantToolProps<TArgs, TResult> = Tool<TArgs, TResult> & {
|
292
311
|
toolName: string;
|
293
|
-
render?: ToolCallContentPartComponent<TArgs, TResult
|
312
|
+
render?: ToolCallContentPartComponent<TArgs, TResult> | undefined;
|
294
313
|
};
|
295
314
|
declare const useAssistantTool: <TArgs, TResult>(tool: AssistantToolProps<TArgs, TResult>) => void;
|
296
315
|
|
@@ -307,7 +326,7 @@ declare const makeAssistantToolUI: <TArgs, TResult>(tool: AssistantToolUIProps<T
|
|
307
326
|
declare const useAssistantInstructions: (instruction: string) => void;
|
308
327
|
|
309
328
|
type UseActionBarCopyProps = {
|
310
|
-
copiedDuration?: number;
|
329
|
+
copiedDuration?: number | undefined;
|
311
330
|
};
|
312
331
|
declare const useActionBarCopy: ({ copiedDuration, }?: UseActionBarCopyProps) => (() => void) | null;
|
313
332
|
|
@@ -341,7 +360,10 @@ declare const useContentPartDisplay: () => react.ReactNode;
|
|
341
360
|
|
342
361
|
declare const useContentPartImage: () => string;
|
343
362
|
|
344
|
-
declare const useContentPartText: () =>
|
363
|
+
declare const useContentPartText: () => Readonly<{
|
364
|
+
status: "in_progress" | "done" | "error";
|
365
|
+
part: TextContentPart;
|
366
|
+
}>;
|
345
367
|
|
346
368
|
type MessageIfFilters = {
|
347
369
|
user: boolean | undefined;
|
@@ -367,7 +389,7 @@ declare const useThreadScrollToBottom: () => (() => void) | null;
|
|
367
389
|
type UseApplyThreadSuggestionProps = {
|
368
390
|
prompt: string;
|
369
391
|
method: "replace";
|
370
|
-
autoSend?: boolean;
|
392
|
+
autoSend?: boolean | undefined;
|
371
393
|
};
|
372
394
|
declare const useThreadSuggestion: ({ prompt, autoSend, }: UseApplyThreadSuggestionProps) => (() => void) | null;
|
373
395
|
|
@@ -393,9 +415,7 @@ declare const ActionBarPrimitiveCopy: react.ForwardRefExoticComponent<Omit<Omit<
|
|
393
415
|
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;
|
394
416
|
} & {
|
395
417
|
asChild?: boolean;
|
396
|
-
}, "ref"> &
|
397
|
-
copiedDuration?: number;
|
398
|
-
} & react.RefAttributes<HTMLButtonElement>>;
|
418
|
+
}, "ref"> & UseActionBarCopyProps & react.RefAttributes<HTMLButtonElement>>;
|
399
419
|
|
400
420
|
type ActionBarPrimitiveReloadProps = ActionButtonProps<typeof useActionBarReload>;
|
401
421
|
declare const ActionBarPrimitiveReload: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
@@ -422,10 +442,10 @@ type AssistantModalPrimitiveTriggerProps = ComponentPropsWithoutRef<typeof Popov
|
|
422
442
|
declare const AssistantModalPrimitiveTrigger: react.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
423
443
|
|
424
444
|
type AssistantModalPrimitiveContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {
|
425
|
-
dissmissOnInteractOutside?: boolean;
|
445
|
+
dissmissOnInteractOutside?: boolean | undefined;
|
426
446
|
};
|
427
447
|
declare const AssistantModalPrimitiveContent: react.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
428
|
-
dissmissOnInteractOutside?: boolean;
|
448
|
+
dissmissOnInteractOutside?: boolean | undefined;
|
429
449
|
} & react.RefAttributes<HTMLDivElement>>;
|
430
450
|
|
431
451
|
declare const AssistantModalPrimitiveAnchor: react.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverAnchorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
@@ -456,14 +476,14 @@ declare const BranchPickerPrimitiveNumber: FC<BranchPickerPrimitiveNumberProps>;
|
|
456
476
|
|
457
477
|
type PrimitiveDivProps$3 = ComponentPropsWithoutRef<typeof Primitive.div>;
|
458
478
|
type BranchPickerPrimitiveRootProps = PrimitiveDivProps$3 & {
|
459
|
-
hideWhenSingleBranch?: boolean;
|
479
|
+
hideWhenSingleBranch?: boolean | undefined;
|
460
480
|
};
|
461
481
|
declare const BranchPickerPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
462
482
|
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;
|
463
483
|
} & {
|
464
484
|
asChild?: boolean;
|
465
485
|
}, "ref"> & {
|
466
|
-
hideWhenSingleBranch?: boolean;
|
486
|
+
hideWhenSingleBranch?: boolean | undefined;
|
467
487
|
} & react.RefAttributes<HTMLDivElement>>;
|
468
488
|
|
469
489
|
declare namespace index$4 {
|
@@ -479,10 +499,10 @@ declare const ComposerPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<r
|
|
479
499
|
}, "ref"> & react.RefAttributes<HTMLFormElement>>;
|
480
500
|
|
481
501
|
type ComposerPrimitiveInputProps = TextareaAutosizeProps & {
|
482
|
-
asChild?: boolean;
|
502
|
+
asChild?: boolean | undefined;
|
483
503
|
};
|
484
504
|
declare const ComposerPrimitiveInput: react.ForwardRefExoticComponent<TextareaAutosizeProps & {
|
485
|
-
asChild?: boolean;
|
505
|
+
asChild?: boolean | undefined;
|
486
506
|
} & react.RefAttributes<HTMLTextAreaElement>>;
|
487
507
|
|
488
508
|
type PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;
|
@@ -507,12 +527,9 @@ declare namespace index$3 {
|
|
507
527
|
export { ComposerPrimitiveCancel as Cancel, ComposerPrimitiveIf as If, ComposerPrimitiveInput as Input, ComposerPrimitiveRoot as Root, ComposerPrimitiveSend as Send };
|
508
528
|
}
|
509
529
|
|
510
|
-
type
|
511
|
-
declare const ContentPartPrimitiveInProgressIndicator: FC<ContentPartPrimitiveInProgressIndicatorProps>;
|
512
|
-
|
513
|
-
type PrimitiveSpanProps$1 = ComponentPropsWithoutRef<typeof Primitive.p>;
|
530
|
+
type PrimitiveSpanProps$1 = ComponentPropsWithoutRef<typeof Primitive.span>;
|
514
531
|
type ContentPartPrimitiveTextProps = Omit<PrimitiveSpanProps$1, "children">;
|
515
|
-
declare const ContentPartPrimitiveText: react.ForwardRefExoticComponent<ContentPartPrimitiveTextProps & react.RefAttributes<
|
532
|
+
declare const ContentPartPrimitiveText: react.ForwardRefExoticComponent<ContentPartPrimitiveTextProps & react.RefAttributes<HTMLSpanElement>>;
|
516
533
|
|
517
534
|
type PrimitiveImageProps = ComponentPropsWithoutRef<typeof Primitive.img>;
|
518
535
|
type ContentPartPrimitiveImageProps = PrimitiveImageProps;
|
@@ -525,8 +542,11 @@ declare const ContentPartPrimitiveImage: react.ForwardRefExoticComponent<Omit<Om
|
|
525
542
|
type ContentPartPrimitiveDisplayProps = {};
|
526
543
|
declare const ContentPartPrimitiveDisplay: FC<ContentPartPrimitiveDisplayProps>;
|
527
544
|
|
545
|
+
type ContentPartPrimitiveInProgressProps = PropsWithChildren;
|
546
|
+
declare const ContentPartPrimitiveInProgress: FC<ContentPartPrimitiveInProgressProps>;
|
547
|
+
|
528
548
|
declare namespace index$2 {
|
529
|
-
export { ContentPartPrimitiveDisplay as Display, ContentPartPrimitiveImage as Image,
|
549
|
+
export { ContentPartPrimitiveDisplay as Display, ContentPartPrimitiveImage as Image, ContentPartPrimitiveInProgress as InProgress, ContentPartPrimitiveText as Text };
|
530
550
|
}
|
531
551
|
|
532
552
|
type PrimitiveDivProps$2 = ComponentPropsWithoutRef<typeof Primitive.div>;
|
@@ -542,24 +562,23 @@ declare const MessagePrimitiveIf: FC<MessagePrimitiveIfProps>;
|
|
542
562
|
|
543
563
|
type MessagePrimitiveContentProps = {
|
544
564
|
components?: {
|
545
|
-
Text?: TextContentPartComponent;
|
546
|
-
Image?: ImageContentPartComponent;
|
547
|
-
UI?: UIContentPartComponent;
|
565
|
+
Text?: TextContentPartComponent | undefined;
|
566
|
+
Image?: ImageContentPartComponent | undefined;
|
567
|
+
UI?: UIContentPartComponent | undefined;
|
548
568
|
tools?: {
|
549
|
-
by_name?: Record<string, ToolCallContentPartComponent
|
550
|
-
Fallback?: ComponentType<ToolCallContentPartProps
|
569
|
+
by_name?: Record<string, ToolCallContentPartComponent | undefined> | undefined;
|
570
|
+
Fallback?: ComponentType<ToolCallContentPartProps> | undefined;
|
551
571
|
};
|
552
|
-
};
|
572
|
+
} | undefined;
|
553
573
|
};
|
554
574
|
declare const MessagePrimitiveContent: FC<MessagePrimitiveContentProps>;
|
555
575
|
|
556
576
|
type PrimitiveSpanProps = ComponentPropsWithoutRef<typeof Primitive.span>;
|
557
577
|
type MessagePrimitiveInProgressProps = PrimitiveSpanProps;
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
}, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
578
|
+
/**
|
579
|
+
* @deprecated Define a custom Text renderer via ContentPartPrimitiveInProgress instead.
|
580
|
+
*/
|
581
|
+
declare const MessagePrimitiveInProgress: FC<MessagePrimitiveInProgressProps>;
|
563
582
|
|
564
583
|
declare namespace index$1 {
|
565
584
|
export { MessagePrimitiveContent as Content, MessagePrimitiveIf as If, MessagePrimitiveInProgress as InProgress, MessagePrimitiveRoot as Root };
|
@@ -596,17 +615,17 @@ declare const ThreadPrimitiveViewport: react.ForwardRefExoticComponent<Omit<Omit
|
|
596
615
|
type ThreadPrimitiveMessagesProps = {
|
597
616
|
components: {
|
598
617
|
Message: ComponentType;
|
599
|
-
UserMessage?: ComponentType;
|
600
|
-
EditComposer?: ComponentType;
|
601
|
-
AssistantMessage?: ComponentType;
|
618
|
+
UserMessage?: ComponentType | undefined;
|
619
|
+
EditComposer?: ComponentType | undefined;
|
620
|
+
AssistantMessage?: ComponentType | undefined;
|
602
621
|
} | {
|
603
|
-
Message?: ComponentType;
|
622
|
+
Message?: ComponentType | undefined;
|
604
623
|
UserMessage: ComponentType;
|
605
|
-
EditComposer?: ComponentType;
|
624
|
+
EditComposer?: ComponentType | undefined;
|
606
625
|
AssistantMessage: ComponentType;
|
607
626
|
};
|
608
627
|
};
|
609
|
-
declare const ThreadPrimitiveMessages:
|
628
|
+
declare const ThreadPrimitiveMessages: react.NamedExoticComponent<ThreadPrimitiveMessagesProps>;
|
610
629
|
|
611
630
|
type ThreadPrimitiveScrollToBottomProps = ActionButtonProps<typeof useThreadScrollToBottom>;
|
612
631
|
declare const ThreadPrimitiveScrollToBottom: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
@@ -620,11 +639,7 @@ declare const ThreadPrimitiveSuggestion: react.ForwardRefExoticComponent<Omit<Om
|
|
620
639
|
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;
|
621
640
|
} & {
|
622
641
|
asChild?: boolean;
|
623
|
-
}, "ref"> &
|
624
|
-
prompt: string;
|
625
|
-
method: "replace";
|
626
|
-
autoSend?: boolean;
|
627
|
-
} & react.RefAttributes<HTMLButtonElement>>;
|
642
|
+
}, "ref"> & UseApplyThreadSuggestionProps & react.RefAttributes<HTMLButtonElement>>;
|
628
643
|
|
629
644
|
declare namespace index {
|
630
645
|
export { ThreadPrimitiveEmpty as Empty, ThreadPrimitiveIf as If, ThreadPrimitiveMessages as Messages, ThreadPrimitiveRoot as Root, ThreadPrimitiveScrollToBottom as ScrollToBottom, ThreadPrimitiveSuggestion as Suggestion, ThreadPrimitiveViewport as Viewport };
|
@@ -660,4 +675,4 @@ declare namespace internal {
|
|
660
675
|
export { internal_BaseAssistantRuntime as BaseAssistantRuntime, internal_MessageRepository as MessageRepository, internal_ProxyConfigProvider as ProxyConfigProvider };
|
661
676
|
}
|
662
677
|
|
663
|
-
export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type AppendContentPart, type AppendMessage, type AssistantContentPart, type AssistantContextValue, type AssistantMessage, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, type AssistantModelConfigState, type AssistantRuntime, AssistantRuntimeProvider, type AssistantToolProps, type AssistantToolUIProps, index$4 as BranchPickerPrimitive, type BranchPickerPrimitiveCountProps, type BranchPickerPrimitiveNextProps, type BranchPickerPrimitiveNumberProps, type BranchPickerPrimitivePreviousProps, type BranchPickerPrimitiveRootProps, type ChatModelAdapter, type ChatModelRunOptions, type ComposerContextValue, index$3 as ComposerPrimitive, type ComposerPrimitiveCancelProps, type ComposerPrimitiveIfProps, type ComposerPrimitiveInputProps, type ComposerPrimitiveRootProps, type ComposerPrimitiveSendProps, type ComposerState, type ContentPartContextValue, index$2 as ContentPartPrimitive, type ContentPartPrimitiveDisplayProps, type ContentPartPrimitiveImageProps, type
|
678
|
+
export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type AppendContentPart, type AppendMessage, type AssistantContentPart, type AssistantContextValue, type AssistantMessage, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, type AssistantModelConfigState, type AssistantRuntime, AssistantRuntimeProvider, type AssistantToolProps, type AssistantToolUIProps, index$4 as BranchPickerPrimitive, type BranchPickerPrimitiveCountProps, type BranchPickerPrimitiveNextProps, type BranchPickerPrimitiveNumberProps, type BranchPickerPrimitivePreviousProps, type BranchPickerPrimitiveRootProps, type ChatModelAdapter, type ChatModelRunOptions, type ComposerContextValue, index$3 as ComposerPrimitive, type ComposerPrimitiveCancelProps, type ComposerPrimitiveIfProps, type ComposerPrimitiveInputProps, type ComposerPrimitiveRootProps, type ComposerPrimitiveSendProps, type ComposerState, type ContentPartContextValue, index$2 as ContentPartPrimitive, type ContentPartPrimitiveDisplayProps, type ContentPartPrimitiveImageProps, type ContentPartPrimitiveInProgressProps, type ContentPartPrimitiveTextProps, type ContentPartState, type EditComposerState, internal as INTERNAL, type ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, type MessageState, type ModelConfig, type ModelConfigProvider, type ReactThreadRuntime, type TextContentPart, type TextContentPartComponent, type TextContentPartProps, type ThreadContextValue, type ThreadMessage, index as ThreadPrimitive, type ThreadPrimitiveEmptyProps, type ThreadPrimitiveIfProps, type ThreadPrimitiveMessagesProps, type ThreadPrimitiveRootProps, type ThreadPrimitiveScrollToBottomProps, type ThreadPrimitiveSuggestionProps, type ThreadPrimitiveViewportProps, type ThreadRuntime, type ThreadState, type ThreadViewportState, type ToolCallContentPart, type ToolCallContentPartComponent, type ToolCallContentPartProps, type UIContentPart, type UIContentPartComponent, type UIContentPartProps, type Unsubscribe, type UserContentPart, type UserMessage, makeAssistantTool, makeAssistantToolUI, useActionBarCopy, useActionBarEdit, useActionBarReload, useAppendMessage, useAssistantContext, useAssistantInstructions, useAssistantTool, useAssistantToolUI, useBranchPickerCount, useBranchPickerNext, useBranchPickerNumber, useBranchPickerPrevious, useComposerCancel, useComposerContext, useComposerIf, useComposerSend, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartText, useLocalRuntime, useMessageContext, useMessageIf, useSwitchToNewThread, useThreadContext, useThreadEmpty, useThreadIf, useThreadScrollToBottom, useThreadSuggestion };
|