@assistant-ui/react 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
- import { FC, ReactNode, PropsWithChildren, ComponentType } from 'react';
2
+ import { FC, ReactNode, PropsWithChildren, ComponentType, ComponentPropsWithoutRef } from 'react';
3
3
  import { TextareaAutosizeProps } from 'react-textarea-autosize';
4
- import { T as TextContentPart, I as ImageContentPart, U as UIContentPart, a as ToolCallContentPart, b as ThreadState, c as Unsubscribe, M as ModelConfigProvider, d as ThreadMessage, e as ModelConfig, A as AssistantContentPart, f as AppendMessage } from './Thread-DcmnmkmV.mjs';
5
- export { j as AppendContentPart, g as AssistantMessage, i as UserContentPart, h as UserMessage } from './Thread-DcmnmkmV.mjs';
6
- import { ComponentPropsWithoutRef, Primitive } from '@radix-ui/react-primitive';
4
+ import { T as TextContentPartComponent, I as ImageContentPartComponent, U as UIContentPartComponent, a as ToolCallContentPartComponent, b as ToolCallContentPartProps, c as ThreadState, d as Unsubscribe, M as ModelConfigProvider, e as ThreadMessage, f as ModelConfig, A as AssistantContentPart, g as AppendMessage } from './Thread-ZUDFhMtm.mjs';
5
+ export { k as AppendContentPart, h as AssistantMessage, l as TextContentPart, j as UserContentPart, i as UserMessage } from './Thread-ZUDFhMtm.mjs';
6
+ import { Primitive } from '@radix-ui/react-primitive';
7
7
  import 'zod';
8
8
 
9
9
  declare const useCopyMessage: ({ copiedDuration }: {
@@ -18,11 +18,11 @@ declare const useGoToNextBranch: () => (() => void) | null;
18
18
 
19
19
  declare const useGoToPreviousBranch: () => (() => void) | null;
20
20
 
21
- declare const ThreadRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
22
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
21
+ declare const ThreadRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
22
+ 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;
23
23
  } & {
24
24
  asChild?: boolean;
25
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
25
+ }, "ref"> & react.RefAttributes<HTMLDivElement>>;
26
26
 
27
27
  type ThreadEmptyProps = {
28
28
  children: ReactNode;
@@ -40,11 +40,11 @@ type ThreadIfFilters = {
40
40
  type ThreadIfProps = PropsWithChildren<RequireAtLeastOne<ThreadIfFilters>>;
41
41
  declare const ThreadIf: FC<ThreadIfProps>;
42
42
 
43
- declare const ThreadViewport: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
44
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
43
+ declare const ThreadViewport: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
44
+ 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;
45
45
  } & {
46
46
  asChild?: boolean;
47
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & {
47
+ }, "ref"> & {
48
48
  autoScroll?: boolean;
49
49
  } & react.RefAttributes<HTMLDivElement>>;
50
50
 
@@ -63,17 +63,17 @@ type ThreadMessagesProps = {
63
63
  };
64
64
  declare const ThreadMessages: FC<ThreadMessagesProps>;
65
65
 
66
- declare const ThreadScrollToBottom: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
67
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
66
+ declare const ThreadScrollToBottom: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
67
+ 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;
68
68
  } & {
69
69
  asChild?: boolean;
70
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
70
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
71
71
 
72
- declare const ThreadSuggestion: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
73
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
72
+ declare const ThreadSuggestion: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
73
+ 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;
74
74
  } & {
75
75
  asChild?: boolean;
76
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & {
76
+ }, "ref"> & {
77
77
  prompt: string;
78
78
  method: "replace";
79
79
  autoSend?: boolean;
@@ -83,27 +83,27 @@ declare namespace index$5 {
83
83
  export { ThreadEmpty as Empty, ThreadIf as If, ThreadMessages as Messages, ThreadRoot as Root, ThreadScrollToBottom as ScrollToBottom, ThreadSuggestion as Suggestion, ThreadViewport as Viewport };
84
84
  }
85
85
 
86
- declare const ComposerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
87
- ref?: ((instance: HTMLFormElement | null) => void) | react.RefObject<HTMLFormElement> | null | undefined;
86
+ declare const ComposerRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
87
+ 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;
88
88
  } & {
89
89
  asChild?: boolean;
90
- }, "key" | "asChild" | keyof react.FormHTMLAttributes<HTMLFormElement>> & react.RefAttributes<HTMLFormElement>>;
90
+ }, "ref"> & react.RefAttributes<HTMLFormElement>>;
91
91
 
92
92
  declare const ComposerInput: react.ForwardRefExoticComponent<TextareaAutosizeProps & {
93
93
  asChild?: boolean;
94
94
  } & react.RefAttributes<HTMLTextAreaElement>>;
95
95
 
96
- declare const ComposerSend: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
97
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
96
+ declare const ComposerSend: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
97
+ 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;
98
98
  } & {
99
99
  asChild?: boolean;
100
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
100
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
101
101
 
102
- declare const ComposerCancel: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
103
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
102
+ declare const ComposerCancel: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
103
+ 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;
104
104
  } & {
105
105
  asChild?: boolean;
106
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
106
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
107
107
 
108
108
  type ComposerIfFilters = {
109
109
  editing: boolean | undefined;
@@ -115,11 +115,11 @@ declare namespace index$4 {
115
115
  export { ComposerCancel as Cancel, ComposerIf as If, ComposerInput as Input, ComposerRoot as Root, ComposerSend as Send };
116
116
  }
117
117
 
118
- declare const MessageRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
119
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
118
+ declare const MessageRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
119
+ 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;
120
120
  } & {
121
121
  asChild?: boolean;
122
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
122
+ }, "ref"> & react.RefAttributes<HTMLDivElement>>;
123
123
 
124
124
  type MessageIfFilters = {
125
125
  user: boolean | undefined;
@@ -135,63 +135,48 @@ declare const MessageIf: FC<MessageIfProps>;
135
135
 
136
136
  type MessageContentProps = {
137
137
  components?: {
138
- Text?: ComponentType<{
139
- part: TextContentPart;
140
- status: "done" | "in_progress" | "error";
141
- }>;
142
- Image?: ComponentType<{
143
- part: ImageContentPart;
144
- status: "done" | "in_progress" | "error";
145
- }>;
146
- UI?: ComponentType<{
147
- part: UIContentPart;
148
- status: "done" | "in_progress" | "error";
149
- }>;
138
+ Text?: TextContentPartComponent;
139
+ Image?: ImageContentPartComponent;
140
+ UI?: UIContentPartComponent;
150
141
  tools?: {
151
- by_name?: Record<string, ComponentType<{
152
- part: ToolCallContentPart;
153
- status: "done" | "in_progress" | "error";
154
- }>>;
155
- Fallback?: ComponentType<{
156
- part: ToolCallContentPart;
157
- status: "done" | "in_progress" | "error";
158
- }>;
142
+ by_name?: Record<string, ToolCallContentPartComponent>;
143
+ Fallback?: ComponentType<ToolCallContentPartProps>;
159
144
  };
160
145
  };
161
146
  };
162
147
  declare const MessageContent: FC<MessageContentProps>;
163
148
 
164
- declare const MessageInProgress: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
165
- ref?: ((instance: HTMLSpanElement | null) => void) | react.RefObject<HTMLSpanElement> | null | undefined;
149
+ declare const MessageInProgress: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
150
+ ref?: ((instance: HTMLSpanElement | 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<HTMLSpanElement> | null | undefined;
166
151
  } & {
167
152
  asChild?: boolean;
168
- }, "key" | "asChild" | keyof react.HTMLAttributes<HTMLSpanElement>> & react.RefAttributes<HTMLSpanElement>>;
153
+ }, "ref"> & react.RefAttributes<HTMLSpanElement>>;
169
154
 
170
155
  declare namespace index$3 {
171
156
  export { MessageContent as Content, MessageIf as If, MessageInProgress as InProgress, MessageRoot as Root };
172
157
  }
173
158
 
174
- declare const BranchPickerNext: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
175
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
159
+ declare const BranchPickerNext: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
160
+ 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;
176
161
  } & {
177
162
  asChild?: boolean;
178
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
163
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
179
164
 
180
- declare const BranchPickerPrevious: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
181
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
165
+ declare const BranchPickerPrevious: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
166
+ 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;
182
167
  } & {
183
168
  asChild?: boolean;
184
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
169
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
185
170
 
186
171
  declare const BranchPickerCount: FC;
187
172
 
188
173
  declare const BranchPickerNumber: FC;
189
174
 
190
- declare const BranchPickerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
191
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
175
+ declare const BranchPickerRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
176
+ 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;
192
177
  } & {
193
178
  asChild?: boolean;
194
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & {
179
+ }, "ref"> & {
195
180
  hideWhenSingleBranch?: boolean;
196
181
  } & react.RefAttributes<HTMLDivElement>>;
197
182
 
@@ -199,11 +184,11 @@ declare namespace index$2 {
199
184
  export { BranchPickerCount as Count, BranchPickerNext as Next, BranchPickerNumber as Number, BranchPickerPrevious as Previous, BranchPickerRoot as Root };
200
185
  }
201
186
 
202
- declare const ActionBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
203
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
187
+ declare const ActionBarRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
188
+ 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;
204
189
  } & {
205
190
  asChild?: boolean;
206
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & {
191
+ }, "ref"> & {
207
192
  hideWhenRunning?: boolean;
208
193
  autohide?: "always" | "not-last" | "never";
209
194
  autohideFloat?: "always" | "single-branch" | "never";
@@ -212,23 +197,23 @@ declare const ActionBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.Det
212
197
  type ActionBarCopyProps = {
213
198
  copiedDuration?: number;
214
199
  };
215
- declare const ActionBarCopy: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
216
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
200
+ declare const ActionBarCopy: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
201
+ 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;
217
202
  } & {
218
203
  asChild?: boolean;
219
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & ActionBarCopyProps & react.RefAttributes<HTMLButtonElement>>;
204
+ }, "ref"> & ActionBarCopyProps & react.RefAttributes<HTMLButtonElement>>;
220
205
 
221
- declare const ActionBarReload: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
222
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
206
+ declare const ActionBarReload: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
207
+ 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;
223
208
  } & {
224
209
  asChild?: boolean;
225
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
210
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
226
211
 
227
- declare const ActionBarEdit: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
228
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
212
+ declare const ActionBarEdit: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
213
+ 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;
229
214
  } & {
230
215
  asChild?: boolean;
231
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
216
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
232
217
 
233
218
  declare namespace index$1 {
234
219
  export { ActionBarCopy as Copy, ActionBarEdit as Edit, ActionBarReload as Reload, ActionBarRoot as Root };
@@ -240,11 +225,11 @@ type PrimitiveSpanProps = ComponentPropsWithoutRef<typeof Primitive.span>;
240
225
  type ContentPartTextProps = Omit<PrimitiveSpanProps, "children">;
241
226
  declare const ContentPartText: react.ForwardRefExoticComponent<ContentPartTextProps & react.RefAttributes<HTMLSpanElement>>;
242
227
 
243
- declare const ContentPartImage: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
244
- ref?: ((instance: HTMLImageElement | null) => void) | react.RefObject<HTMLImageElement> | null | undefined;
228
+ declare const ContentPartImage: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
229
+ ref?: ((instance: HTMLImageElement | 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<HTMLImageElement> | null | undefined;
245
230
  } & {
246
231
  asChild?: boolean;
247
- }, "key" | "asChild" | keyof react.ImgHTMLAttributes<HTMLImageElement>> & react.RefAttributes<HTMLImageElement>>;
232
+ }, "ref"> & react.RefAttributes<HTMLImageElement>>;
248
233
 
249
234
  declare const ContentPartDisplay: FC;
250
235
 
@@ -331,4 +316,4 @@ declare namespace internal {
331
316
  export { internal_MessageRepository as MessageRepository, internal_ProxyConfigProvider as ProxyConfigProvider };
332
317
  }
333
318
 
334
- export { index$1 as ActionBarPrimitive, AppendMessage, AssistantContentPart, type AssistantRuntime, AssistantRuntimeProvider, index$2 as BranchPickerPrimitive, type ChatModelAdapter, type ChatModelRunOptions, index$4 as ComposerPrimitive, index as ContentPartPrimitive, internal as INTERNAL, index$3 as MessagePrimitive, type ReactThreadRuntime, TextContentPart, ThreadMessage, index$5 as ThreadPrimitive, type ThreadRuntime, Unsubscribe, useBeginMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useLocalRuntime, useReloadMessage };
319
+ export { index$1 as ActionBarPrimitive, AppendMessage, AssistantContentPart, type AssistantRuntime, AssistantRuntimeProvider, index$2 as BranchPickerPrimitive, type ChatModelAdapter, type ChatModelRunOptions, index$4 as ComposerPrimitive, index as ContentPartPrimitive, internal as INTERNAL, index$3 as MessagePrimitive, type ReactThreadRuntime, ThreadMessage, index$5 as ThreadPrimitive, type ThreadRuntime, Unsubscribe, useBeginMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useLocalRuntime, useReloadMessage };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
- import { FC, ReactNode, PropsWithChildren, ComponentType } from 'react';
2
+ import { FC, ReactNode, PropsWithChildren, ComponentType, ComponentPropsWithoutRef } from 'react';
3
3
  import { TextareaAutosizeProps } from 'react-textarea-autosize';
4
- import { T as TextContentPart, I as ImageContentPart, U as UIContentPart, a as ToolCallContentPart, b as ThreadState, c as Unsubscribe, M as ModelConfigProvider, d as ThreadMessage, e as ModelConfig, A as AssistantContentPart, f as AppendMessage } from './Thread-DcmnmkmV.js';
5
- export { j as AppendContentPart, g as AssistantMessage, i as UserContentPart, h as UserMessage } from './Thread-DcmnmkmV.js';
6
- import { ComponentPropsWithoutRef, Primitive } from '@radix-ui/react-primitive';
4
+ import { T as TextContentPartComponent, I as ImageContentPartComponent, U as UIContentPartComponent, a as ToolCallContentPartComponent, b as ToolCallContentPartProps, c as ThreadState, d as Unsubscribe, M as ModelConfigProvider, e as ThreadMessage, f as ModelConfig, A as AssistantContentPart, g as AppendMessage } from './Thread-ZUDFhMtm.js';
5
+ export { k as AppendContentPart, h as AssistantMessage, l as TextContentPart, j as UserContentPart, i as UserMessage } from './Thread-ZUDFhMtm.js';
6
+ import { Primitive } from '@radix-ui/react-primitive';
7
7
  import 'zod';
8
8
 
9
9
  declare const useCopyMessage: ({ copiedDuration }: {
@@ -18,11 +18,11 @@ declare const useGoToNextBranch: () => (() => void) | null;
18
18
 
19
19
  declare const useGoToPreviousBranch: () => (() => void) | null;
20
20
 
21
- declare const ThreadRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
22
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
21
+ declare const ThreadRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
22
+ 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;
23
23
  } & {
24
24
  asChild?: boolean;
25
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
25
+ }, "ref"> & react.RefAttributes<HTMLDivElement>>;
26
26
 
27
27
  type ThreadEmptyProps = {
28
28
  children: ReactNode;
@@ -40,11 +40,11 @@ type ThreadIfFilters = {
40
40
  type ThreadIfProps = PropsWithChildren<RequireAtLeastOne<ThreadIfFilters>>;
41
41
  declare const ThreadIf: FC<ThreadIfProps>;
42
42
 
43
- declare const ThreadViewport: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
44
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
43
+ declare const ThreadViewport: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
44
+ 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;
45
45
  } & {
46
46
  asChild?: boolean;
47
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & {
47
+ }, "ref"> & {
48
48
  autoScroll?: boolean;
49
49
  } & react.RefAttributes<HTMLDivElement>>;
50
50
 
@@ -63,17 +63,17 @@ type ThreadMessagesProps = {
63
63
  };
64
64
  declare const ThreadMessages: FC<ThreadMessagesProps>;
65
65
 
66
- declare const ThreadScrollToBottom: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
67
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
66
+ declare const ThreadScrollToBottom: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
67
+ 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;
68
68
  } & {
69
69
  asChild?: boolean;
70
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
70
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
71
71
 
72
- declare const ThreadSuggestion: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
73
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
72
+ declare const ThreadSuggestion: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
73
+ 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;
74
74
  } & {
75
75
  asChild?: boolean;
76
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & {
76
+ }, "ref"> & {
77
77
  prompt: string;
78
78
  method: "replace";
79
79
  autoSend?: boolean;
@@ -83,27 +83,27 @@ declare namespace index$5 {
83
83
  export { ThreadEmpty as Empty, ThreadIf as If, ThreadMessages as Messages, ThreadRoot as Root, ThreadScrollToBottom as ScrollToBottom, ThreadSuggestion as Suggestion, ThreadViewport as Viewport };
84
84
  }
85
85
 
86
- declare const ComposerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
87
- ref?: ((instance: HTMLFormElement | null) => void) | react.RefObject<HTMLFormElement> | null | undefined;
86
+ declare const ComposerRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
87
+ 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;
88
88
  } & {
89
89
  asChild?: boolean;
90
- }, "key" | "asChild" | keyof react.FormHTMLAttributes<HTMLFormElement>> & react.RefAttributes<HTMLFormElement>>;
90
+ }, "ref"> & react.RefAttributes<HTMLFormElement>>;
91
91
 
92
92
  declare const ComposerInput: react.ForwardRefExoticComponent<TextareaAutosizeProps & {
93
93
  asChild?: boolean;
94
94
  } & react.RefAttributes<HTMLTextAreaElement>>;
95
95
 
96
- declare const ComposerSend: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
97
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
96
+ declare const ComposerSend: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
97
+ 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;
98
98
  } & {
99
99
  asChild?: boolean;
100
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
100
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
101
101
 
102
- declare const ComposerCancel: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
103
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
102
+ declare const ComposerCancel: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
103
+ 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;
104
104
  } & {
105
105
  asChild?: boolean;
106
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
106
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
107
107
 
108
108
  type ComposerIfFilters = {
109
109
  editing: boolean | undefined;
@@ -115,11 +115,11 @@ declare namespace index$4 {
115
115
  export { ComposerCancel as Cancel, ComposerIf as If, ComposerInput as Input, ComposerRoot as Root, ComposerSend as Send };
116
116
  }
117
117
 
118
- declare const MessageRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
119
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
118
+ declare const MessageRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
119
+ 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;
120
120
  } & {
121
121
  asChild?: boolean;
122
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
122
+ }, "ref"> & react.RefAttributes<HTMLDivElement>>;
123
123
 
124
124
  type MessageIfFilters = {
125
125
  user: boolean | undefined;
@@ -135,63 +135,48 @@ declare const MessageIf: FC<MessageIfProps>;
135
135
 
136
136
  type MessageContentProps = {
137
137
  components?: {
138
- Text?: ComponentType<{
139
- part: TextContentPart;
140
- status: "done" | "in_progress" | "error";
141
- }>;
142
- Image?: ComponentType<{
143
- part: ImageContentPart;
144
- status: "done" | "in_progress" | "error";
145
- }>;
146
- UI?: ComponentType<{
147
- part: UIContentPart;
148
- status: "done" | "in_progress" | "error";
149
- }>;
138
+ Text?: TextContentPartComponent;
139
+ Image?: ImageContentPartComponent;
140
+ UI?: UIContentPartComponent;
150
141
  tools?: {
151
- by_name?: Record<string, ComponentType<{
152
- part: ToolCallContentPart;
153
- status: "done" | "in_progress" | "error";
154
- }>>;
155
- Fallback?: ComponentType<{
156
- part: ToolCallContentPart;
157
- status: "done" | "in_progress" | "error";
158
- }>;
142
+ by_name?: Record<string, ToolCallContentPartComponent>;
143
+ Fallback?: ComponentType<ToolCallContentPartProps>;
159
144
  };
160
145
  };
161
146
  };
162
147
  declare const MessageContent: FC<MessageContentProps>;
163
148
 
164
- declare const MessageInProgress: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
165
- ref?: ((instance: HTMLSpanElement | null) => void) | react.RefObject<HTMLSpanElement> | null | undefined;
149
+ declare const MessageInProgress: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
150
+ ref?: ((instance: HTMLSpanElement | 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<HTMLSpanElement> | null | undefined;
166
151
  } & {
167
152
  asChild?: boolean;
168
- }, "key" | "asChild" | keyof react.HTMLAttributes<HTMLSpanElement>> & react.RefAttributes<HTMLSpanElement>>;
153
+ }, "ref"> & react.RefAttributes<HTMLSpanElement>>;
169
154
 
170
155
  declare namespace index$3 {
171
156
  export { MessageContent as Content, MessageIf as If, MessageInProgress as InProgress, MessageRoot as Root };
172
157
  }
173
158
 
174
- declare const BranchPickerNext: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
175
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
159
+ declare const BranchPickerNext: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
160
+ 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;
176
161
  } & {
177
162
  asChild?: boolean;
178
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
163
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
179
164
 
180
- declare const BranchPickerPrevious: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
181
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
165
+ declare const BranchPickerPrevious: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
166
+ 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;
182
167
  } & {
183
168
  asChild?: boolean;
184
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
169
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
185
170
 
186
171
  declare const BranchPickerCount: FC;
187
172
 
188
173
  declare const BranchPickerNumber: FC;
189
174
 
190
- declare const BranchPickerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
191
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
175
+ declare const BranchPickerRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
176
+ 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;
192
177
  } & {
193
178
  asChild?: boolean;
194
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & {
179
+ }, "ref"> & {
195
180
  hideWhenSingleBranch?: boolean;
196
181
  } & react.RefAttributes<HTMLDivElement>>;
197
182
 
@@ -199,11 +184,11 @@ declare namespace index$2 {
199
184
  export { BranchPickerCount as Count, BranchPickerNext as Next, BranchPickerNumber as Number, BranchPickerPrevious as Previous, BranchPickerRoot as Root };
200
185
  }
201
186
 
202
- declare const ActionBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
203
- ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
187
+ declare const ActionBarRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
188
+ 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;
204
189
  } & {
205
190
  asChild?: boolean;
206
- }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & {
191
+ }, "ref"> & {
207
192
  hideWhenRunning?: boolean;
208
193
  autohide?: "always" | "not-last" | "never";
209
194
  autohideFloat?: "always" | "single-branch" | "never";
@@ -212,23 +197,23 @@ declare const ActionBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.Det
212
197
  type ActionBarCopyProps = {
213
198
  copiedDuration?: number;
214
199
  };
215
- declare const ActionBarCopy: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
216
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
200
+ declare const ActionBarCopy: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
201
+ 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;
217
202
  } & {
218
203
  asChild?: boolean;
219
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & ActionBarCopyProps & react.RefAttributes<HTMLButtonElement>>;
204
+ }, "ref"> & ActionBarCopyProps & react.RefAttributes<HTMLButtonElement>>;
220
205
 
221
- declare const ActionBarReload: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
222
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
206
+ declare const ActionBarReload: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
207
+ 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;
223
208
  } & {
224
209
  asChild?: boolean;
225
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
210
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
226
211
 
227
- declare const ActionBarEdit: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
228
- ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
212
+ declare const ActionBarEdit: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
213
+ 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;
229
214
  } & {
230
215
  asChild?: boolean;
231
- }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
216
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
232
217
 
233
218
  declare namespace index$1 {
234
219
  export { ActionBarCopy as Copy, ActionBarEdit as Edit, ActionBarReload as Reload, ActionBarRoot as Root };
@@ -240,11 +225,11 @@ type PrimitiveSpanProps = ComponentPropsWithoutRef<typeof Primitive.span>;
240
225
  type ContentPartTextProps = Omit<PrimitiveSpanProps, "children">;
241
226
  declare const ContentPartText: react.ForwardRefExoticComponent<ContentPartTextProps & react.RefAttributes<HTMLSpanElement>>;
242
227
 
243
- declare const ContentPartImage: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
244
- ref?: ((instance: HTMLImageElement | null) => void) | react.RefObject<HTMLImageElement> | null | undefined;
228
+ declare const ContentPartImage: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
229
+ ref?: ((instance: HTMLImageElement | 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<HTMLImageElement> | null | undefined;
245
230
  } & {
246
231
  asChild?: boolean;
247
- }, "key" | "asChild" | keyof react.ImgHTMLAttributes<HTMLImageElement>> & react.RefAttributes<HTMLImageElement>>;
232
+ }, "ref"> & react.RefAttributes<HTMLImageElement>>;
248
233
 
249
234
  declare const ContentPartDisplay: FC;
250
235
 
@@ -331,4 +316,4 @@ declare namespace internal {
331
316
  export { internal_MessageRepository as MessageRepository, internal_ProxyConfigProvider as ProxyConfigProvider };
332
317
  }
333
318
 
334
- export { index$1 as ActionBarPrimitive, AppendMessage, AssistantContentPart, type AssistantRuntime, AssistantRuntimeProvider, index$2 as BranchPickerPrimitive, type ChatModelAdapter, type ChatModelRunOptions, index$4 as ComposerPrimitive, index as ContentPartPrimitive, internal as INTERNAL, index$3 as MessagePrimitive, type ReactThreadRuntime, TextContentPart, ThreadMessage, index$5 as ThreadPrimitive, type ThreadRuntime, Unsubscribe, useBeginMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useLocalRuntime, useReloadMessage };
319
+ export { index$1 as ActionBarPrimitive, AppendMessage, AssistantContentPart, type AssistantRuntime, AssistantRuntimeProvider, index$2 as BranchPickerPrimitive, type ChatModelAdapter, type ChatModelRunOptions, index$4 as ComposerPrimitive, index as ContentPartPrimitive, internal as INTERNAL, index$3 as MessagePrimitive, type ReactThreadRuntime, ThreadMessage, index$5 as ThreadPrimitive, type ThreadRuntime, Unsubscribe, useBeginMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useLocalRuntime, useReloadMessage };