@assistant-ui/react 0.5.74 → 0.5.76

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { A as Attachment, P as PendingAttachment, T as ThreadMessage, C as CoreMessage, a as AppendMessage, M as ModelConfig, b as ModelConfigProvider, c as ThreadAssistantContentPart, d as MessageStatus, e as ThreadStep, f as PendingAttachmentStatus, g as CompleteAttachment, h as CompleteAttachmentStatus, i as Tool, j as TextContentPart, I as ImageContentPart, k as ToolCallContentPart, l as CoreToolCallContentPart, U as UIContentPart, m as CreateEdgeRuntimeAPIOptions, n as ThreadUserContentPart, o as ContentPartStatus, p as ToolCallContentPartStatus } from './edge-rTP-G718.js';
2
2
  export { q as AttachmentStatus, v as CoreAssistantContentPart, y as CoreAssistantMessage, w as CoreSystemMessage, u as CoreUserContentPart, x as CoreUserMessage, E as EdgeRuntimeRequestOptions, s as ThreadAssistantMessage, r as ThreadSystemMessage, t as ThreadUserMessage } from './edge-rTP-G718.js';
3
3
  import * as react from 'react';
4
- import { ComponentType, PropsWithChildren, FC, ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
4
+ import { ComponentType, PropsWithChildren, FC, ElementRef, ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
5
5
  import { StoreApi, UseBoundStore } from 'zustand';
6
6
  import { Primitive } from '@radix-ui/react-primitive';
7
7
  import * as PopoverPrimitive from '@radix-ui/react-popover';
@@ -15,8 +15,8 @@ import 'json-schema';
15
15
  import 'zod';
16
16
 
17
17
  type ComposerRuntimeCore = Readonly<{
18
- attachmentAccept: string;
19
18
  attachments: readonly Attachment[];
19
+ getAttachmentAccept(): string;
20
20
  addAttachment: (file: File) => Promise<void>;
21
21
  removeAttachment: (attachmentId: string) => Promise<void>;
22
22
  isEditing: boolean;
@@ -49,7 +49,7 @@ declare namespace SpeechSynthesisAdapter {
49
49
  type Utterance = {
50
50
  status: Status;
51
51
  cancel: () => void;
52
- onEnd: (callback: () => void) => Unsubscribe;
52
+ subscribe: (callback: () => void) => Unsubscribe;
53
53
  };
54
54
  }
55
55
  type SpeechSynthesisAdapter = {
@@ -93,7 +93,7 @@ type RuntimeCapabilities = Readonly<{
93
93
  reload: boolean;
94
94
  cancel: boolean;
95
95
  unstable_copy: boolean;
96
- speak: boolean;
96
+ speech: boolean;
97
97
  attachments: boolean;
98
98
  feedback: boolean;
99
99
  }>;
@@ -110,6 +110,13 @@ type SubmitFeedbackOptions = {
110
110
  type ThreadSuggestion = {
111
111
  prompt: string;
112
112
  };
113
+ type SpeechState = Readonly<{
114
+ messageId: string;
115
+ status: SpeechSynthesisAdapter.Status;
116
+ }>;
117
+ type SubmittedFeedback = Readonly<{
118
+ type: "negative" | "positive";
119
+ }>;
113
120
  type ThreadRuntimeCore = Readonly<{
114
121
  getBranches: (messageId: string) => readonly string[];
115
122
  switchToBranch: (branchId: string) => void;
@@ -117,12 +124,15 @@ type ThreadRuntimeCore = Readonly<{
117
124
  startRun: (parentId: string | null) => void;
118
125
  cancelRun: () => void;
119
126
  addToolResult: (options: AddToolResultOptions) => void;
120
- speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
127
+ speak: (messageId: string) => void;
128
+ stopSpeaking: () => void;
129
+ getSubmittedFeedback: (messageId: string) => SubmittedFeedback | undefined;
121
130
  submitFeedback: (feedback: SubmitFeedbackOptions) => void;
122
131
  getModelConfig: () => ModelConfig;
123
132
  composer: ThreadComposerRuntimeCore;
124
133
  getEditComposer: (messageId: string) => ComposerRuntimeCore | undefined;
125
134
  beginEdit: (messageId: string) => void;
135
+ speech: SpeechState | undefined;
126
136
  capabilities: Readonly<RuntimeCapabilities>;
127
137
  threadId: string;
128
138
  isDisabled: boolean;
@@ -193,6 +203,14 @@ declare abstract class BaseAssistantRuntimeCore<TThreadRuntime extends ThreadRun
193
203
  private subscriptionHandler;
194
204
  }
195
205
 
206
+ type FeedbackAdapterFeedback = {
207
+ message: ThreadMessage;
208
+ type: "positive" | "negative";
209
+ };
210
+ type FeedbackAdapter = {
211
+ submit: (feedback: FeedbackAdapterFeedback) => void;
212
+ };
213
+
196
214
  type AttachmentAdapter = {
197
215
  accept: string;
198
216
  add(state: {
@@ -206,6 +224,20 @@ type AttachmentAdapter = {
206
224
  }>;
207
225
  };
208
226
 
227
+ type LocalRuntimeOptions = {
228
+ initialMessages?: readonly CoreMessage[] | undefined;
229
+ maxSteps?: number | undefined;
230
+ /**
231
+ * @deprecated Use `maxSteps` (which is `maxToolRoundtrips` + 1; if you set `maxToolRoundtrips` to 2, set `maxSteps` to 3) instead. This field will be removed in v0.6.
232
+ */
233
+ maxToolRoundtrips?: number | undefined;
234
+ adapters?: {
235
+ attachments?: AttachmentAdapter | undefined;
236
+ speech?: SpeechSynthesisAdapter | undefined;
237
+ feedback?: FeedbackAdapter | undefined;
238
+ } | undefined;
239
+ };
240
+
209
241
  declare class SimpleImageAttachmentAdapter implements AttachmentAdapter {
210
242
  accept: string;
211
243
  add(state: {
@@ -241,7 +273,8 @@ declare class CompositeAttachmentAdapter implements AttachmentAdapter {
241
273
 
242
274
  declare abstract class BaseComposerRuntimeCore implements ComposerRuntimeCore {
243
275
  readonly isEditing = true;
244
- attachmentAccept: string;
276
+ protected abstract getAttachmentAdapter(): AttachmentAdapter | undefined;
277
+ getAttachmentAccept(): string;
245
278
  private _attachments;
246
279
  protected set attachments(value: readonly Attachment[]);
247
280
  get attachments(): readonly Attachment[];
@@ -254,8 +287,6 @@ declare abstract class BaseComposerRuntimeCore implements ComposerRuntimeCore {
254
287
  send(): Promise<void>;
255
288
  abstract handleSend(message: Omit<AppendMessage, "parentId">): void;
256
289
  abstract cancel(): void;
257
- protected _attachmentAdapter?: AttachmentAdapter | undefined;
258
- setAttachmentAdapter(adapter: AttachmentAdapter | undefined): void;
259
290
  addAttachment(file: File): Promise<void>;
260
291
  removeAttachment(attachmentId: string): Promise<void>;
261
292
  private _subscriptions;
@@ -268,42 +299,30 @@ declare class DefaultThreadComposerRuntimeCore extends BaseComposerRuntimeCore i
268
299
  private _canCancel;
269
300
  get canCancel(): boolean;
270
301
  get attachments(): readonly PendingAttachment[];
271
- constructor(runtime: Omit<ThreadRuntimeCore, "composer">);
302
+ protected getAttachmentAdapter(): AttachmentAdapter | undefined;
303
+ constructor(runtime: Omit<ThreadRuntimeCore, "composer"> & {
304
+ adapters?: {
305
+ attachments?: AttachmentAdapter | undefined;
306
+ } | undefined;
307
+ });
272
308
  connect(): Unsubscribe;
273
309
  handleSend(message: Omit<AppendMessage, "parentId">): Promise<void>;
274
310
  cancel(): Promise<void>;
275
311
  }
276
312
 
277
- type FeedbackAdapterFeedback = {
278
- message: ThreadMessage;
279
- type: "positive" | "negative";
280
- };
281
- type FeedbackAdapter = {
282
- submit: (feedback: FeedbackAdapterFeedback) => void;
283
- };
284
-
285
- type LocalRuntimeOptions = {
286
- initialMessages?: readonly CoreMessage[] | undefined;
287
- maxSteps?: number | undefined;
288
- /**
289
- * @deprecated Use `maxSteps` (which is `maxToolRoundtrips` + 1; if you set `maxToolRoundtrips` to 2, set `maxSteps` to 3) instead. This field will be removed in v0.6.
290
- */
291
- maxToolRoundtrips?: number | undefined;
292
- adapters?: {
293
- attachments?: AttachmentAdapter | undefined;
294
- speech?: SpeechSynthesisAdapter | undefined;
295
- feedback?: FeedbackAdapter | undefined;
296
- } | undefined;
297
- };
298
-
299
313
  declare class DefaultEditComposerRuntimeCore extends BaseComposerRuntimeCore {
300
314
  private runtime;
301
315
  private endEditCallback;
302
316
  get canCancel(): boolean;
317
+ protected getAttachmentAdapter(): AttachmentAdapter | undefined;
303
318
  private _nonTextParts;
304
319
  private _previousText;
305
320
  private _parentId;
306
- constructor(runtime: Omit<ThreadRuntimeCore, "composer">, endEditCallback: () => void, { parentId, message }: {
321
+ constructor(runtime: Omit<ThreadRuntimeCore, "composer"> & {
322
+ adapters?: {
323
+ attachments?: AttachmentAdapter | undefined;
324
+ } | undefined;
325
+ }, endEditCallback: () => void, { parentId, message }: {
307
326
  parentId: string | null;
308
327
  message: ThreadMessage;
309
328
  });
@@ -311,50 +330,80 @@ declare class DefaultEditComposerRuntimeCore extends BaseComposerRuntimeCore {
311
330
  cancel(): Promise<void>;
312
331
  }
313
332
 
314
- declare class LocalThreadRuntimeCore implements ThreadRuntimeCore {
333
+ type BaseThreadAdapters = {
334
+ speech?: SpeechSynthesisAdapter | undefined;
335
+ feedback?: FeedbackAdapter | undefined;
336
+ attachments?: AttachmentAdapter | undefined;
337
+ };
338
+ declare abstract class BaseThreadRuntimeCore implements ThreadRuntimeCore {
315
339
  private configProvider;
316
- adapter: ChatModelAdapter;
317
340
  private _subscriptions;
318
- private abortController;
319
- private readonly repository;
341
+ protected readonly repository: MessageRepository;
342
+ abstract get adapters(): BaseThreadAdapters | undefined;
343
+ abstract get threadId(): string;
344
+ abstract get isDisabled(): boolean;
345
+ abstract get suggestions(): readonly ThreadSuggestion[];
346
+ abstract get extras(): unknown;
347
+ abstract get capabilities(): RuntimeCapabilities;
348
+ abstract append(message: AppendMessage): void;
349
+ abstract startRun(parentId: string | null): void;
350
+ abstract addToolResult(options: AddToolResultOptions): void;
351
+ abstract cancelRun(): void;
352
+ get messages(): ThreadMessage[];
353
+ readonly composer: DefaultThreadComposerRuntimeCore;
354
+ constructor(configProvider: ModelConfigProvider);
355
+ getModelConfig(): ModelConfig;
356
+ private _editComposers;
357
+ getEditComposer(messageId: string): DefaultEditComposerRuntimeCore | undefined;
358
+ beginEdit(messageId: string): void;
359
+ getBranches(messageId: string): string[];
360
+ switchToBranch(branchId: string): void;
361
+ protected notifySubscribers(): void;
362
+ subscribe(callback: () => void): Unsubscribe;
363
+ private _submittedFeedback;
364
+ getSubmittedFeedback(messageId: string): Readonly<{
365
+ type: "negative" | "positive";
366
+ }> | undefined;
367
+ submitFeedback({ messageId, type }: SubmitFeedbackOptions): void;
368
+ private _stopSpeaking;
369
+ speech: SpeechState | undefined;
370
+ speak(messageId: string): void;
371
+ stopSpeaking(): void;
372
+ export(): ExportedMessageRepository;
373
+ import(data: ExportedMessageRepository): void;
374
+ }
375
+
376
+ declare class LocalThreadRuntimeCore extends BaseThreadRuntimeCore implements ThreadRuntimeCore {
377
+ adapter: ChatModelAdapter;
320
378
  readonly capabilities: {
321
379
  switchToBranch: boolean;
322
380
  edit: boolean;
323
381
  reload: boolean;
324
382
  cancel: boolean;
325
383
  unstable_copy: boolean;
326
- speak: boolean;
384
+ speech: boolean;
327
385
  attachments: boolean;
328
386
  feedback: boolean;
329
387
  };
388
+ private abortController;
330
389
  readonly threadId: string;
331
390
  readonly isDisabled = false;
332
391
  readonly suggestions: readonly ThreadSuggestion[];
333
- get messages(): ThreadMessage[];
334
- readonly composer: DefaultThreadComposerRuntimeCore;
392
+ get adapters(): {
393
+ attachments?: AttachmentAdapter | undefined;
394
+ speech?: SpeechSynthesisAdapter | undefined;
395
+ feedback?: FeedbackAdapter | undefined;
396
+ } | undefined;
335
397
  constructor(configProvider: ModelConfigProvider, adapter: ChatModelAdapter, { initialMessages, ...options }: LocalRuntimeOptions);
336
- getModelConfig(): ModelConfig;
337
398
  private _options;
338
399
  get options(): LocalRuntimeOptions;
339
400
  get extras(): undefined;
340
401
  set options({ initialMessages, ...options }: LocalRuntimeOptions);
341
- private _editComposers;
342
- getEditComposer(messageId: string): DefaultEditComposerRuntimeCore | undefined;
343
- beginEdit(messageId: string): void;
344
- getBranches(messageId: string): string[];
345
- switchToBranch(branchId: string): void;
346
402
  append(message: AppendMessage): Promise<void>;
347
403
  startRun(parentId: string | null): Promise<void>;
348
404
  private performRoundtrip;
349
405
  cancelRun(): void;
350
- private notifySubscribers;
351
- subscribe(callback: () => void): Unsubscribe;
352
406
  addToolResult({ messageId, toolCallId, result, }: AddToolResultOptions): void;
353
- private _utterance;
354
- speak(messageId: string): SpeechSynthesisAdapter.Utterance;
355
- submitFeedback({ messageId, type }: SubmitFeedbackOptions): void;
356
- export(): ExportedMessageRepository;
357
- import(data: ExportedMessageRepository): void;
358
407
  }
359
408
 
360
409
  declare class LocalRuntimeCore extends BaseAssistantRuntimeCore<LocalThreadRuntimeCore> {
@@ -382,10 +431,11 @@ type AssistantRuntime = {
382
431
  */
383
432
  subscribe(callback: () => void): Unsubscribe;
384
433
  };
385
- declare class AssistantRuntimeImpl<TThreadRuntime extends ThreadRuntime = ThreadRuntime> implements AssistantRuntimeCore, AssistantRuntime {
386
- private _core;
387
- constructor(_core: AssistantRuntimeCore, CustomThreadRuntime: new (binding: ThreadRuntimeCoreBinding) => TThreadRuntime);
388
- readonly thread: TThreadRuntime;
434
+ declare class AssistantRuntimeImpl implements AssistantRuntimeCore, AssistantRuntime {
435
+ private readonly _core;
436
+ private readonly _thread;
437
+ protected constructor(_core: AssistantRuntimeCore, _thread: ThreadRuntime);
438
+ get thread(): ThreadRuntime;
389
439
  switchToNewThread(): void;
390
440
  switchToThread(threadId: string): void;
391
441
  /**
@@ -397,13 +447,13 @@ declare class AssistantRuntimeImpl<TThreadRuntime extends ThreadRuntime = Thread
397
447
  * @deprecated Thread is now static and never gets updated. This will be removed in 0.6.0.
398
448
  */
399
449
  subscribe(callback: () => void): Unsubscribe;
450
+ protected static createThreadRuntime(_core: AssistantRuntimeCore, CustomThreadRuntime?: new (binding: ThreadRuntimeCoreBinding) => ThreadRuntime): ThreadRuntime;
451
+ static create(_core: AssistantRuntimeCore, CustomThreadRuntime?: new (binding: ThreadRuntimeCoreBinding) => ThreadRuntime): AssistantRuntime;
400
452
  }
401
453
 
402
- declare class LocalRuntime extends AssistantRuntimeImpl {
403
- private core;
404
- constructor(core: LocalRuntimeCore);
405
- reset(options?: Parameters<LocalRuntimeCore["reset"]>[0]): void;
406
- }
454
+ type LocalRuntime = AssistantRuntime & {
455
+ reset: (options?: Parameters<LocalRuntimeCore["reset"]>[0]) => void;
456
+ };
407
457
  declare const useLocalRuntime: (adapter: ChatModelAdapter, options?: LocalRuntimeOptions) => LocalRuntime;
408
458
 
409
459
  declare function toLanguageModelMessages(message: readonly CoreMessage[] | readonly ThreadMessage[]): LanguageModelV1Message[];
@@ -445,6 +495,9 @@ declare function streamPartEncoderStream<T extends Record<string, unknown>>(): P
445
495
  declare namespace StreamUtils {
446
496
  export type { StreamPart };
447
497
  }
498
+ /**
499
+ * @deprecated `streamUtils` will be replaced with `assistant-stream` once it is ready.
500
+ */
448
501
  declare const streamUtils: {
449
502
  streamPartEncoderStream: typeof streamPartEncoderStream;
450
503
  streamPartDecoderStream: typeof streamPartDecoderStream;
@@ -493,10 +546,10 @@ type ExternalStoreAdapterBase<T> = {
493
546
  onAddToolResult?: ((options: AddToolResultOptions) => Promise<void> | void) | undefined;
494
547
  onSwitchToThread?: ((threadId: string) => Promise<void> | void) | undefined;
495
548
  onSwitchToNewThread?: (() => Promise<void> | void) | undefined;
496
- onSpeak?: ((message: ThreadMessage) => SpeechSynthesisAdapter.Utterance) | undefined;
497
549
  convertMessage?: ExternalStoreMessageConverter<T> | undefined;
498
550
  adapters?: {
499
551
  attachments?: AttachmentAdapter | undefined;
552
+ speech?: SpeechSynthesisAdapter | undefined;
500
553
  feedback?: FeedbackAdapter | undefined;
501
554
  };
502
555
  unstable_capabilities?: {
@@ -505,30 +558,6 @@ type ExternalStoreAdapterBase<T> = {
505
558
  };
506
559
  type ExternalStoreAdapter<T = ThreadMessage> = ExternalStoreAdapterBase<T> & (T extends ThreadMessage ? object : ExternalStoreMessageConverterAdapter<T>);
507
560
 
508
- declare const useExternalStoreRuntime: <T>(store: ExternalStoreAdapter<T>) => AssistantRuntimeImpl<ThreadRuntimeImpl>;
509
-
510
- declare const getExternalStoreMessage: <T>(message: ThreadMessage) => T | undefined;
511
-
512
- declare namespace useExternalMessageConverter {
513
- type Message = ThreadMessageLike | {
514
- role: "tool";
515
- toolCallId: string;
516
- toolName?: string | undefined;
517
- result: any;
518
- };
519
- type Callback<T> = (message: T) => Message | Message[];
520
- }
521
- declare const useExternalMessageConverter: <T extends WeakKey>({ callback, messages, isRunning, }: {
522
- callback: useExternalMessageConverter.Callback<T>;
523
- messages: T[];
524
- isRunning: boolean;
525
- }) => ThreadMessage[];
526
-
527
- type DangerousInBrowserAdapterOptions = CreateEdgeRuntimeAPIOptions;
528
-
529
- type DangerousInBrowserRuntimeOptions = DangerousInBrowserAdapterOptions & LocalRuntimeOptions;
530
- declare const useDangerousInBrowserRuntime: (options: DangerousInBrowserRuntimeOptions) => LocalRuntime;
531
-
532
561
  type Subscribable = {
533
562
  subscribe: (callback: () => void) => Unsubscribe;
534
563
  };
@@ -571,7 +600,6 @@ type LegacyThreadComposerState = Readonly<{
571
600
  value: string;
572
601
  /** @deprecated Use `useComposerRuntime().setText` instead. This will be removed in 0.6.0. */
573
602
  setValue: (value: string) => void;
574
- attachmentAccept: string;
575
603
  attachments: readonly Attachment[];
576
604
  /** @deprecated Use `useComposerRuntime().addAttachment` instead. This will be removed in 0.6.0. */
577
605
  addAttachment: (file: File) => Promise<void>;
@@ -598,7 +626,6 @@ type LegacyThreadComposerState = Readonly<{
598
626
  }>;
599
627
  type BaseComposerState = {
600
628
  text: string;
601
- attachmentAccept: string;
602
629
  attachments: readonly Attachment[];
603
630
  canCancel: boolean;
604
631
  isEditing: boolean;
@@ -623,14 +650,13 @@ type ComposerRuntime = {
623
650
  readonly canCancel: boolean;
624
651
  /** @deprecated Use `getState().text` instead. This will be removed in 0.6.0. */
625
652
  readonly text: string;
626
- /** @deprecated Use `getState().attachmentAccept` instead. This will be removed in 0.6.0. */
627
- readonly attachmentAccept: string;
628
653
  /** @deprecated Use `getState().attachments` instead. This will be removed in 0.6.0. */
629
654
  readonly attachments: readonly Attachment[];
630
655
  /** @deprecated Use `getState().text` instead. This will be removed in 0.6.0. */
631
656
  readonly value: string;
632
657
  setText(text: string): void;
633
658
  setValue(text: string): void;
659
+ getAttachmentAccept(): string;
634
660
  addAttachment(file: File): Promise<void>;
635
661
  /** @deprecated Use `getAttachmentById(id).removeAttachment()` instead. This will be removed in 0.6.0. */
636
662
  removeAttachment(attachmentId: string): Promise<void>;
@@ -661,10 +687,6 @@ declare abstract class ComposerRuntimeImpl implements ComposerRuntimeCore, Compo
661
687
  * @deprecated Use `getState().text` instead. This will be removed in 0.6.0.
662
688
  */
663
689
  get text(): string;
664
- /**
665
- * @deprecated Use `getState().attachmentAccept` instead. This will be removed in 0.6.0.
666
- */
667
- get attachmentAccept(): string;
668
690
  /**
669
691
  * @deprecated Use `getState().attachments` instead. This will be removed in 0.6.0.
670
692
  */
@@ -688,6 +710,7 @@ declare abstract class ComposerRuntimeImpl implements ComposerRuntimeCore, Compo
688
710
  send(): void;
689
711
  cancel(): void;
690
712
  subscribe(callback: () => void): Unsubscribe;
713
+ getAttachmentAccept(): string;
691
714
  abstract getAttachmentByIndex(idx: number): AttachmentRuntime;
692
715
  }
693
716
  type ThreadComposerRuntime = Omit<ComposerRuntime, "getState" | "getAttachmentByIndex"> & {
@@ -822,13 +845,16 @@ type MessageState = ThreadMessage & {
822
845
  branches: readonly string[];
823
846
  branchNumber: number;
824
847
  branchCount: number;
848
+ speech: SpeechState | undefined;
849
+ submittedFeedback: SubmittedFeedback | undefined;
825
850
  };
826
851
  type MessageStateBinding = SubscribableWithState<MessageState>;
827
852
  type MessageRuntime = {
828
853
  composer: EditComposerRuntime;
829
854
  getState(): MessageState;
830
855
  reload(): void;
831
- speak(): SpeechSynthesisAdapter.Utterance;
856
+ speak(): void;
857
+ stopSpeaking(): void;
832
858
  submitFeedback({ type }: {
833
859
  type: "positive" | "negative";
834
860
  }): void;
@@ -849,7 +875,8 @@ declare class MessageRuntimeImpl implements MessageRuntime {
849
875
  composer: EditComposerRuntimeImpl;
850
876
  getState(): MessageState;
851
877
  reload(): void;
852
- speak(): SpeechSynthesisAdapter.Utterance;
878
+ speak(): void;
879
+ stopSpeaking(): void;
853
880
  submitFeedback({ type }: {
854
881
  type: "positive" | "negative";
855
882
  }): void;
@@ -862,6 +889,30 @@ declare class MessageRuntimeImpl implements MessageRuntime {
862
889
  getAttachmentByIndex(idx: number): MessageAttachmentRuntimeImpl;
863
890
  }
864
891
 
892
+ declare const useExternalStoreRuntime: <T>(store: ExternalStoreAdapter<T>) => AssistantRuntime;
893
+
894
+ declare const getExternalStoreMessage: <T>(message: ThreadMessage) => T | undefined;
895
+
896
+ declare namespace useExternalMessageConverter {
897
+ type Message = ThreadMessageLike | {
898
+ role: "tool";
899
+ toolCallId: string;
900
+ toolName?: string | undefined;
901
+ result: any;
902
+ };
903
+ type Callback<T> = (message: T) => Message | Message[];
904
+ }
905
+ declare const useExternalMessageConverter: <T extends WeakKey>({ callback, messages, isRunning, }: {
906
+ callback: useExternalMessageConverter.Callback<T>;
907
+ messages: T[];
908
+ isRunning: boolean;
909
+ }) => ThreadMessage[];
910
+
911
+ type DangerousInBrowserAdapterOptions = CreateEdgeRuntimeAPIOptions;
912
+
913
+ type DangerousInBrowserRuntimeOptions = DangerousInBrowserAdapterOptions & LocalRuntimeOptions;
914
+ declare const useDangerousInBrowserRuntime: (options: DangerousInBrowserRuntimeOptions) => LocalRuntime;
915
+
865
916
  type CreateAppendMessage = string | {
866
917
  parentId?: string | null | undefined;
867
918
  role?: AppendMessage["role"] | undefined;
@@ -877,6 +928,7 @@ type ThreadState = Readonly<{
877
928
  messages: readonly ThreadMessage[];
878
929
  suggestions: readonly ThreadSuggestion[];
879
930
  extras: unknown;
931
+ speech: SpeechState | undefined;
880
932
  }>;
881
933
  type ThreadRuntime = {
882
934
  composer: ThreadComposerRuntime;
@@ -893,6 +945,7 @@ type ThreadRuntime = {
893
945
  export(): ExportedMessageRepository;
894
946
  import(repository: ExportedMessageRepository): void;
895
947
  getMesssageByIndex(idx: number): MessageRuntime;
948
+ stopSpeaking: () => void;
896
949
  /**
897
950
  * @deprecated Use `getState().capabilities` instead. This will be removed in 0.6.0.
898
951
  */
@@ -917,6 +970,10 @@ type ThreadRuntime = {
917
970
  * @deprecated Use `getState().followupSuggestions` instead. This will be removed in 0.6.0.
918
971
  */
919
972
  suggestions: readonly ThreadSuggestion[];
973
+ /**
974
+ * @deprecated Use `getState().speechState` instead. This will be removed in 0.6.0.
975
+ */
976
+ speech: SpeechState | undefined;
920
977
  /**
921
978
  * @deprecated Use `getState().extras` instead. This will be removed in 0.6.0.
922
979
  */
@@ -936,7 +993,11 @@ type ThreadRuntime = {
936
993
  /**
937
994
  * @deprecated Use `getMesssageById(id).speak()` instead. This will be removed in 0.6.0.
938
995
  */
939
- speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
996
+ speak: (messageId: string) => void;
997
+ /**
998
+ * @deprecated Use `getMesssageById(id).getState().submittedFeedback` instead. This will be removed in 0.6.0.
999
+ */
1000
+ getSubmittedFeedback: (messageId: string) => SubmittedFeedback | undefined;
940
1001
  /**
941
1002
  * @deprecated Use `getMesssageById(id).submitFeedback({ type })` instead. This will be removed in 0.6.0.
942
1003
  */
@@ -972,7 +1033,7 @@ declare class ThreadRuntimeImpl implements ThreadRuntimeCore, ThreadRuntime {
972
1033
  reload: boolean;
973
1034
  cancel: boolean;
974
1035
  unstable_copy: boolean;
975
- speak: boolean;
1036
+ speech: boolean;
976
1037
  attachments: boolean;
977
1038
  feedback: boolean;
978
1039
  }>;
@@ -988,6 +1049,13 @@ declare class ThreadRuntimeImpl implements ThreadRuntimeCore, ThreadRuntime {
988
1049
  * @deprecated Use `getState().messages` instead. This will be removed in 0.6.0.
989
1050
  */
990
1051
  get messages(): readonly ThreadMessage[];
1052
+ /**
1053
+ * @deprecated Use `getState().speechState` instead. This will be removed in 0.6.0.
1054
+ */
1055
+ get speech(): Readonly<{
1056
+ messageId: string;
1057
+ status: SpeechSynthesisAdapter.Status;
1058
+ }> | undefined;
991
1059
  unstable_getCore(): Readonly<{
992
1060
  getBranches: (messageId: string) => readonly string[];
993
1061
  switchToBranch: (branchId: string) => void;
@@ -995,12 +1063,15 @@ declare class ThreadRuntimeImpl implements ThreadRuntimeCore, ThreadRuntime {
995
1063
  startRun: (parentId: string | null) => void;
996
1064
  cancelRun: () => void;
997
1065
  addToolResult: (options: AddToolResultOptions) => void;
998
- speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
1066
+ speak: (messageId: string) => void;
1067
+ stopSpeaking: () => void;
1068
+ getSubmittedFeedback: (messageId: string) => SubmittedFeedback | undefined;
999
1069
  submitFeedback: (feedback: SubmitFeedbackOptions) => void;
1000
1070
  getModelConfig: () => ModelConfig;
1001
1071
  composer: ThreadComposerRuntimeCore;
1002
1072
  getEditComposer: (messageId: string) => ComposerRuntimeCore | undefined;
1003
1073
  beginEdit: (messageId: string) => void;
1074
+ speech: SpeechState | undefined;
1004
1075
  capabilities: Readonly<RuntimeCapabilities>;
1005
1076
  threadId: string;
1006
1077
  isDisabled: boolean;
@@ -1022,6 +1093,7 @@ declare class ThreadRuntimeImpl implements ThreadRuntimeCore, ThreadRuntime {
1022
1093
  messages: readonly ThreadMessage[];
1023
1094
  suggestions: readonly ThreadSuggestion[];
1024
1095
  extras: unknown;
1096
+ speech: SpeechState | undefined;
1025
1097
  }>;
1026
1098
  append(message: CreateAppendMessage): void;
1027
1099
  subscribe(callback: () => void): Unsubscribe;
@@ -1040,14 +1112,24 @@ declare class ThreadRuntimeImpl implements ThreadRuntimeCore, ThreadRuntime {
1040
1112
  * @deprecated Use `getMesssageById(id).switchToBranch({ options })` instead. This will be removed in 0.6.0.
1041
1113
  */
1042
1114
  switchToBranch(branchId: string): void;
1043
- speak(messageId: string): SpeechSynthesisAdapter.Utterance;
1115
+ /**
1116
+ * @deprecated Use `getMesssageById(id).speak()` instead. This will be removed in 0.6.0.
1117
+ */
1118
+ speak(messageId: string): void;
1119
+ stopSpeaking(): void;
1120
+ getSubmittedFeedback(messageId: string): Readonly<{
1121
+ type: "negative" | "positive";
1122
+ }> | undefined;
1123
+ /**
1124
+ * @deprecated Use `getMesssageById(id).submitFeedback({ type })` instead. This will be removed in 0.6.0.
1125
+ */
1044
1126
  submitFeedback(options: SubmitFeedbackOptions): void;
1045
1127
  /**
1046
1128
  * @deprecated Use `getMesssageById(id).getMessageByIndex(idx).composer` instead. This will be removed in 0.6.0.
1047
1129
  */
1048
1130
  getEditComposer(messageId: string): Readonly<{
1049
- attachmentAccept: string;
1050
1131
  attachments: readonly Attachment[];
1132
+ getAttachmentAccept(): string;
1051
1133
  addAttachment: (file: File) => Promise<void>;
1052
1134
  removeAttachment: (attachmentId: string) => Promise<void>;
1053
1135
  isEditing: boolean;
@@ -1147,16 +1229,6 @@ type MessageUtilsState = Readonly<{
1147
1229
  setIsCopied: (value: boolean) => void;
1148
1230
  isHovering: boolean;
1149
1231
  setIsHovering: (value: boolean) => void;
1150
- /** @deprecated This will be moved to `useMessage().isSpeaking` instead. This will be removed in 0.6.0. */
1151
- isSpeaking: boolean;
1152
- /** @deprecated This will be moved to `useMessageRuntime().stopSpeaking()` instead. This will be removed in 0.6.0. */
1153
- stopSpeaking: () => void;
1154
- /** @deprecated This will be moved to `useMessageRuntime().speak()` instead. This will be removed in 0.6.0. */
1155
- addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
1156
- /** @deprecated This will be moved to `useMessage().submittedFeedback`. This will be removed in 0.6.0. */
1157
- submittedFeedback: "positive" | "negative" | null;
1158
- /** @deprecated This will be moved to `useMessageRuntime().submitFeedback()` instead. This will be removed in 0.6.0. */
1159
- setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
1160
1232
  }>;
1161
1233
 
1162
1234
  type ThreadViewportState = Readonly<{
@@ -1325,13 +1397,17 @@ declare const useThread: {
1325
1397
  reload: boolean;
1326
1398
  cancel: boolean;
1327
1399
  unstable_copy: boolean;
1328
- speak: boolean;
1400
+ speech: boolean;
1329
1401
  attachments: boolean;
1330
1402
  feedback: boolean;
1331
1403
  }>;
1332
1404
  messages: readonly ThreadMessage[];
1333
1405
  suggestions: readonly ThreadSuggestion[];
1334
1406
  extras: unknown;
1407
+ speech: Readonly<{
1408
+ messageId: string;
1409
+ status: SpeechSynthesisAdapter.Status;
1410
+ }> | undefined;
1335
1411
  }>;
1336
1412
  <TSelected>(selector: (state: Readonly<{
1337
1413
  threadId: string;
@@ -1343,13 +1419,17 @@ declare const useThread: {
1343
1419
  reload: boolean;
1344
1420
  cancel: boolean;
1345
1421
  unstable_copy: boolean;
1346
- speak: boolean;
1422
+ speech: boolean;
1347
1423
  attachments: boolean;
1348
1424
  feedback: boolean;
1349
1425
  }>;
1350
1426
  messages: readonly ThreadMessage[];
1351
1427
  suggestions: readonly ThreadSuggestion[];
1352
1428
  extras: unknown;
1429
+ speech: Readonly<{
1430
+ messageId: string;
1431
+ status: SpeechSynthesisAdapter.Status;
1432
+ }> | undefined;
1353
1433
  }>) => TSelected): TSelected;
1354
1434
  (options: {
1355
1435
  optional: true;
@@ -1363,13 +1443,17 @@ declare const useThread: {
1363
1443
  reload: boolean;
1364
1444
  cancel: boolean;
1365
1445
  unstable_copy: boolean;
1366
- speak: boolean;
1446
+ speech: boolean;
1367
1447
  attachments: boolean;
1368
1448
  feedback: boolean;
1369
1449
  }>;
1370
1450
  messages: readonly ThreadMessage[];
1371
1451
  suggestions: readonly ThreadSuggestion[];
1372
1452
  extras: unknown;
1453
+ speech: Readonly<{
1454
+ messageId: string;
1455
+ status: SpeechSynthesisAdapter.Status;
1456
+ }> | undefined;
1373
1457
  }> | null;
1374
1458
  <TSelected>(options: {
1375
1459
  optional: true;
@@ -1383,13 +1467,17 @@ declare const useThread: {
1383
1467
  reload: boolean;
1384
1468
  cancel: boolean;
1385
1469
  unstable_copy: boolean;
1386
- speak: boolean;
1470
+ speech: boolean;
1387
1471
  attachments: boolean;
1388
1472
  feedback: boolean;
1389
1473
  }>;
1390
1474
  messages: readonly ThreadMessage[];
1391
1475
  suggestions: readonly ThreadSuggestion[];
1392
1476
  extras: unknown;
1477
+ speech: Readonly<{
1478
+ messageId: string;
1479
+ status: SpeechSynthesisAdapter.Status;
1480
+ }> | undefined;
1393
1481
  }>) => TSelected;
1394
1482
  }): TSelected | null;
1395
1483
  };
@@ -1404,13 +1492,17 @@ declare const useThreadStore: {
1404
1492
  reload: boolean;
1405
1493
  cancel: boolean;
1406
1494
  unstable_copy: boolean;
1407
- speak: boolean;
1495
+ speech: boolean;
1408
1496
  attachments: boolean;
1409
1497
  feedback: boolean;
1410
1498
  }>;
1411
1499
  messages: readonly ThreadMessage[];
1412
1500
  suggestions: readonly ThreadSuggestion[];
1413
1501
  extras: unknown;
1502
+ speech: Readonly<{
1503
+ messageId: string;
1504
+ status: SpeechSynthesisAdapter.Status;
1505
+ }> | undefined;
1414
1506
  }>>;
1415
1507
  (options: {
1416
1508
  optional: true;
@@ -1424,13 +1516,17 @@ declare const useThreadStore: {
1424
1516
  reload: boolean;
1425
1517
  cancel: boolean;
1426
1518
  unstable_copy: boolean;
1427
- speak: boolean;
1519
+ speech: boolean;
1428
1520
  attachments: boolean;
1429
1521
  feedback: boolean;
1430
1522
  }>;
1431
1523
  messages: readonly ThreadMessage[];
1432
1524
  suggestions: readonly ThreadSuggestion[];
1433
1525
  extras: unknown;
1526
+ speech: Readonly<{
1527
+ messageId: string;
1528
+ status: SpeechSynthesisAdapter.Status;
1529
+ }> | undefined;
1434
1530
  }>> | null;
1435
1531
  };
1436
1532
  /**
@@ -1558,22 +1654,12 @@ declare const useMessageUtils: {
1558
1654
  setIsCopied: (value: boolean) => void;
1559
1655
  isHovering: boolean;
1560
1656
  setIsHovering: (value: boolean) => void;
1561
- isSpeaking: boolean;
1562
- stopSpeaking: () => void;
1563
- addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
1564
- submittedFeedback: "positive" | "negative" | null;
1565
- setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
1566
1657
  }>;
1567
1658
  <TSelected>(selector: (state: Readonly<{
1568
1659
  isCopied: boolean;
1569
1660
  setIsCopied: (value: boolean) => void;
1570
1661
  isHovering: boolean;
1571
1662
  setIsHovering: (value: boolean) => void;
1572
- isSpeaking: boolean;
1573
- stopSpeaking: () => void;
1574
- addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
1575
- submittedFeedback: "positive" | "negative" | null;
1576
- setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
1577
1663
  }>) => TSelected): TSelected;
1578
1664
  (options: {
1579
1665
  optional: true;
@@ -1582,11 +1668,6 @@ declare const useMessageUtils: {
1582
1668
  setIsCopied: (value: boolean) => void;
1583
1669
  isHovering: boolean;
1584
1670
  setIsHovering: (value: boolean) => void;
1585
- isSpeaking: boolean;
1586
- stopSpeaking: () => void;
1587
- addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
1588
- submittedFeedback: "positive" | "negative" | null;
1589
- setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
1590
1671
  }> | null;
1591
1672
  <TSelected>(options: {
1592
1673
  optional: true;
@@ -1595,11 +1676,6 @@ declare const useMessageUtils: {
1595
1676
  setIsCopied: (value: boolean) => void;
1596
1677
  isHovering: boolean;
1597
1678
  setIsHovering: (value: boolean) => void;
1598
- isSpeaking: boolean;
1599
- stopSpeaking: () => void;
1600
- addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
1601
- submittedFeedback: "positive" | "negative" | null;
1602
- setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
1603
1679
  }>) => TSelected;
1604
1680
  }): TSelected | null;
1605
1681
  };
@@ -1609,11 +1685,6 @@ declare const useMessageUtilsStore: {
1609
1685
  setIsCopied: (value: boolean) => void;
1610
1686
  isHovering: boolean;
1611
1687
  setIsHovering: (value: boolean) => void;
1612
- isSpeaking: boolean;
1613
- stopSpeaking: () => void;
1614
- addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
1615
- submittedFeedback: "positive" | "negative" | null;
1616
- setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
1617
1688
  }>>;
1618
1689
  (options: {
1619
1690
  optional: true;
@@ -1622,11 +1693,6 @@ declare const useMessageUtilsStore: {
1622
1693
  setIsCopied: (value: boolean) => void;
1623
1694
  isHovering: boolean;
1624
1695
  setIsHovering: (value: boolean) => void;
1625
- isSpeaking: boolean;
1626
- stopSpeaking: () => void;
1627
- addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
1628
- submittedFeedback: "positive" | "negative" | null;
1629
- setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
1630
1696
  }>> | null;
1631
1697
  };
1632
1698
  declare const useEditComposer: {
@@ -1712,6 +1778,9 @@ declare function useComposerRuntime(options?: {
1712
1778
  optional?: boolean | undefined;
1713
1779
  }): ComposerRuntime | null;
1714
1780
 
1781
+ /**
1782
+ * @deprecated Use `useThreadRuntime().append()` instead. This will be removed in 0.6.
1783
+ */
1715
1784
  declare const useAppendMessage: () => (message: CreateAppendMessage) => void;
1716
1785
 
1717
1786
  /**
@@ -1814,6 +1883,7 @@ type MessageIfFilters = {
1814
1883
  lastOrHover: boolean | undefined;
1815
1884
  speaking: boolean | undefined;
1816
1885
  hasAttachments: boolean | undefined;
1886
+ hasContent: boolean | undefined;
1817
1887
  submittedFeedback: "positive" | "negative" | null | undefined;
1818
1888
  };
1819
1889
  type UseMessageIfProps = RequireAtLeastOne<MessageIfFilters>;
@@ -1844,8 +1914,15 @@ type UseActionBarFloatStatusProps = {
1844
1914
  autohideFloat?: "always" | "single-branch" | "never" | undefined;
1845
1915
  };
1846
1916
 
1847
- type PrimitiveDivProps$6 = ComponentPropsWithoutRef<typeof Primitive.div>;
1848
- type ActionBarPrimitiveRootProps = PrimitiveDivProps$6 & UseActionBarFloatStatusProps;
1917
+ type PrimitiveDivProps$2 = ComponentPropsWithoutRef<typeof Primitive.div>;
1918
+ /**
1919
+ * @deprecated Use `ActionBarPrimitive.Root.Props` instead. This will be removed in 0.6.
1920
+ */
1921
+ type ActionBarPrimitiveRootProps = ActionBarPrimitiveRoot.Props;
1922
+ declare namespace ActionBarPrimitiveRoot {
1923
+ type Element = ElementRef<typeof Primitive.div>;
1924
+ type Props = PrimitiveDivProps$2 & UseActionBarFloatStatusProps;
1925
+ }
1849
1926
  declare const ActionBarPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1850
1927
  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;
1851
1928
  } & {
@@ -1854,82 +1931,157 @@ declare const ActionBarPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<
1854
1931
 
1855
1932
  type PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;
1856
1933
  type ActionButtonProps<THook> = PrimitiveButtonProps & (THook extends (props: infer TProps) => unknown ? TProps : never);
1934
+ type ActionButtonElement = ElementRef<typeof Primitive.button>;
1857
1935
 
1858
- type ActionBarPrimitiveCopyProps = ActionButtonProps<typeof useActionBarCopy>;
1859
- declare const ActionBarPrimitiveCopy: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1936
+ /**
1937
+ * @deprecated Use `ActionBarPrimitive.Copy.Props` instead. This will be removed in 0.6.
1938
+ */
1939
+ type ActionBarPrimitiveCopyProps = ActionBarPrimitiveCopy.Props;
1940
+ declare namespace ActionBarPrimitiveCopy {
1941
+ type Element = HTMLButtonElement;
1942
+ type Props = ActionButtonProps<typeof useActionBarCopy>;
1943
+ }
1944
+ declare const ActionBarPrimitiveCopy: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1860
1945
  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;
1861
1946
  } & {
1862
1947
  asChild?: boolean;
1863
- }, "ref"> & UseActionBarCopyProps> & react.RefAttributes<HTMLButtonElement>>;
1948
+ }, "ref"> & UseActionBarCopyProps & react.RefAttributes<HTMLButtonElement>>;
1864
1949
 
1865
- type ActionBarPrimitiveReloadProps = ActionButtonProps<typeof useActionBarReload>;
1950
+ /**
1951
+ * @deprecated Use `ActionBarPrimitive.Reload.Props` instead. This will be removed in 0.6.
1952
+ */
1953
+ type ActionBarPrimitiveReloadProps = ActionBarPrimitiveReload.Props;
1954
+ declare namespace ActionBarPrimitiveReload {
1955
+ type Element = ActionButtonElement;
1956
+ type Props = ActionButtonProps<typeof useActionBarReload>;
1957
+ }
1866
1958
  declare const ActionBarPrimitiveReload: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1867
1959
  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;
1868
1960
  } & {
1869
1961
  asChild?: boolean;
1870
1962
  }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1871
1963
 
1872
- type ActionBarPrimitiveEditProps = ActionButtonProps<typeof useActionBarEdit>;
1964
+ /**
1965
+ * @deprecated Use `ActionBarPrimitive.Edit.Props` instead. This will be removed in 0.6.
1966
+ */
1967
+ type ActionBarPrimitiveEditProps = ActionBarPrimitiveEdit.Props;
1968
+ declare namespace ActionBarPrimitiveEdit {
1969
+ type Element = ActionButtonElement;
1970
+ type Props = ActionButtonProps<typeof useActionBarEdit>;
1971
+ }
1873
1972
  declare const ActionBarPrimitiveEdit: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1874
1973
  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;
1875
1974
  } & {
1876
1975
  asChild?: boolean;
1877
1976
  }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1878
1977
 
1879
- type ActionBarPrimitiveSpeakProps = ActionButtonProps<typeof useActionBarSpeak>;
1978
+ /**
1979
+ * @deprecated Use `ActionBarPrimitive.Speak.Props` instead. This will be removed in 0.6.
1980
+ */
1981
+ type ActionBarPrimitiveSpeakProps = ActionBarPrimitiveSpeak.Props;
1982
+ declare namespace ActionBarPrimitiveSpeak {
1983
+ type Element = ActionButtonElement;
1984
+ type Props = ActionButtonProps<typeof useActionBarSpeak>;
1985
+ }
1880
1986
  declare const ActionBarPrimitiveSpeak: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1881
1987
  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;
1882
1988
  } & {
1883
1989
  asChild?: boolean;
1884
1990
  }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1885
1991
 
1886
- type ActionBarPrimitiveStopSpeakingProps = ActionButtonProps<typeof useActionBarStopSpeaking>;
1887
- declare const ActionBarPrimitiveStopSpeaking: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1992
+ /**
1993
+ * @deprecated Use `ActionBarPrimitive.StopSpeaking.Props` instead. This will be removed in 0.6.
1994
+ */
1995
+ type ActionBarPrimitiveStopSpeakingProps = ActionBarPrimitiveStopSpeaking.Props;
1996
+ declare namespace ActionBarPrimitiveStopSpeaking {
1997
+ type Element = HTMLButtonElement;
1998
+ type Props = ActionButtonProps<typeof useActionBarStopSpeaking>;
1999
+ }
2000
+ declare const ActionBarPrimitiveStopSpeaking: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1888
2001
  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;
1889
2002
  } & {
1890
2003
  asChild?: boolean;
1891
- }, "ref">> & react.RefAttributes<HTMLButtonElement>>;
2004
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1892
2005
 
1893
- type ActionBarPrimitiveFeedbackPositiveProps = ActionButtonProps<typeof useActionBarFeedbackPositive>;
1894
- declare const ActionBarPrimitiveFeedbackPositive: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
2006
+ /**
2007
+ * @deprecated Use `ActionBarPrimitive.FeedbackPositive.Props` instead. This will be removed in 0.6.
2008
+ */
2009
+ type ActionBarPrimitiveFeedbackPositiveProps = ActionBarPrimitiveFeedbackPositive.Props;
2010
+ declare namespace ActionBarPrimitiveFeedbackPositive {
2011
+ type Element = HTMLButtonElement;
2012
+ type Props = ActionButtonProps<typeof useActionBarFeedbackPositive>;
2013
+ }
2014
+ declare const ActionBarPrimitiveFeedbackPositive: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1895
2015
  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;
1896
2016
  } & {
1897
2017
  asChild?: boolean;
1898
- }, "ref">> & react.RefAttributes<HTMLButtonElement>>;
2018
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1899
2019
 
1900
- type ActionBarPrimitiveFeedbackNegativeProps = ActionButtonProps<typeof useActionBarFeedbackNegative>;
1901
- declare const ActionBarPrimitiveFeedbackNegative: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
2020
+ /**
2021
+ * @deprecated Use `ActionBarPrimitive.FeedbackNegative.Props` instead. This will be removed in 0.6.
2022
+ */
2023
+ type ActionBarPrimitiveFeedbackNegativeProps = ActionBarPrimitiveFeedbackNegative.Props;
2024
+ declare namespace ActionBarPrimitiveFeedbackNegative {
2025
+ type Element = HTMLButtonElement;
2026
+ type Props = ActionButtonProps<typeof useActionBarFeedbackNegative>;
2027
+ }
2028
+ declare const ActionBarPrimitiveFeedbackNegative: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1902
2029
  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;
1903
2030
  } & {
1904
2031
  asChild?: boolean;
1905
- }, "ref">> & react.RefAttributes<HTMLButtonElement>>;
2032
+ }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1906
2033
 
1907
2034
  declare namespace index$7 {
1908
2035
  export { ActionBarPrimitiveCopy as Copy, ActionBarPrimitiveEdit as Edit, ActionBarPrimitiveFeedbackNegative as FeedbackNegative, ActionBarPrimitiveFeedbackPositive as FeedbackPositive, ActionBarPrimitiveReload as Reload, ActionBarPrimitiveRoot as Root, ActionBarPrimitiveSpeak as Speak, ActionBarPrimitiveStopSpeaking as StopSpeaking };
1909
2036
  }
1910
2037
 
2038
+ /**
2039
+ * @deprecated Use `AssistantModalPrimitive.Root.Props` instead. This will be removed in 0.6.
2040
+ */
1911
2041
  type AssistantModalPrimitiveRootProps = PopoverPrimitive.PopoverProps;
1912
- declare const AssistantModalPrimitiveRoot: FC<AssistantModalPrimitiveRootProps>;
2042
+ declare namespace AssistantModalPrimitiveRoot {
2043
+ type Props = PopoverPrimitive.PopoverProps;
2044
+ }
2045
+ declare const AssistantModalPrimitiveRoot: FC<AssistantModalPrimitiveRoot.Props>;
1913
2046
 
1914
- type AssistantModalPrimitiveTriggerProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>;
2047
+ /**
2048
+ * @deprecated Use `AssistantModalPrimitive.Trigger.Props` instead. This will be removed in 0.6.
2049
+ */
2050
+ type AssistantModalPrimitiveTriggerProps = AssistantModalPrimitiveTrigger.Props;
2051
+ declare namespace AssistantModalPrimitiveTrigger {
2052
+ type Element = ElementRef<typeof PopoverPrimitive.Trigger>;
2053
+ type Props = ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>;
2054
+ }
1915
2055
  declare const AssistantModalPrimitiveTrigger: react.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1916
2056
 
1917
- type AssistantModalPrimitiveContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {
1918
- dissmissOnInteractOutside?: boolean | undefined;
1919
- };
2057
+ /**
2058
+ * @deprecated Use `AssistantModalPrimitive.Content.Props` instead. This will be removed in 0.6.
2059
+ */
2060
+ type AssistantModalPrimitiveContentProps = AssistantModalPrimitiveContent.Props;
2061
+ declare namespace AssistantModalPrimitiveContent {
2062
+ type Element = ElementRef<typeof PopoverPrimitive.Content>;
2063
+ type Props = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {
2064
+ dissmissOnInteractOutside?: boolean | undefined;
2065
+ };
2066
+ }
1920
2067
  declare const AssistantModalPrimitiveContent: react.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
1921
2068
  dissmissOnInteractOutside?: boolean | undefined;
1922
2069
  } & react.RefAttributes<HTMLDivElement>>;
1923
2070
 
2071
+ declare namespace AssistantModalPrimitiveAnchor {
2072
+ type Element = ElementRef<typeof PopoverPrimitive.Anchor>;
2073
+ type Props = ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>;
2074
+ }
1924
2075
  declare const AssistantModalPrimitiveAnchor: react.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverAnchorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1925
2076
 
1926
2077
  declare namespace index$6 {
1927
2078
  export { AssistantModalPrimitiveAnchor as Anchor, AssistantModalPrimitiveContent as Content, AssistantModalPrimitiveRoot as Root, AssistantModalPrimitiveTrigger as Trigger };
1928
2079
  }
1929
2080
 
1930
- type PrimitiveDivProps$5 = ComponentPropsWithoutRef<typeof Primitive.div>;
2081
+ type PrimitiveDivProps$1 = ComponentPropsWithoutRef<typeof Primitive.div>;
1931
2082
  declare namespace AttachmentPrimitiveRoot {
1932
- type Props = PrimitiveDivProps$5;
2083
+ type Element = ElementRef<typeof Primitive.div>;
2084
+ type Props = PrimitiveDivProps$1;
1933
2085
  }
1934
2086
  declare const AttachmentPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1935
2087
  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;
@@ -1937,9 +2089,10 @@ declare const AttachmentPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit
1937
2089
  asChild?: boolean;
1938
2090
  }, "ref"> & react.RefAttributes<HTMLDivElement>>;
1939
2091
 
1940
- type PrimitiveDivProps$4 = ComponentPropsWithoutRef<typeof Primitive.div>;
2092
+ type PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;
1941
2093
  declare namespace AttachmentPrimitiveThumb {
1942
- type Props = PrimitiveDivProps$4;
2094
+ type Element = ElementRef<typeof Primitive.div>;
2095
+ type Props = PrimitiveDivProps;
1943
2096
  }
1944
2097
  declare const AttachmentPrimitiveThumb: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1945
2098
  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;
@@ -1955,6 +2108,7 @@ declare const AttachmentPrimitiveName: FC<AttachmentPrimitiveName.Props>;
1955
2108
  declare const useAttachmentRemove: () => () => void;
1956
2109
 
1957
2110
  declare namespace AttachmentPrimitiveRemove {
2111
+ type Element = ActionButtonElement;
1958
2112
  type Props = ActionButtonProps<typeof useAttachmentRemove>;
1959
2113
  }
1960
2114
  declare const AttachmentPrimitiveRemove: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
@@ -1967,30 +2121,62 @@ declare namespace index$5 {
1967
2121
  export { AttachmentPrimitiveName as Name, AttachmentPrimitiveRemove as Remove, AttachmentPrimitiveRoot as Root, AttachmentPrimitiveThumb as unstable_Thumb };
1968
2122
  }
1969
2123
 
1970
- type BranchPickerPrimitiveNextProps = ActionButtonProps<typeof useBranchPickerNext>;
2124
+ /**
2125
+ * @deprecated Use `BranchPickerPrimitive.Next.Props` instead. This will be removed in 0.6.
2126
+ */
2127
+ type BranchPickerPrimitiveNextProps = BranchPickerPrimitiveNext.Props;
2128
+ declare namespace BranchPickerPrimitiveNext {
2129
+ type Element = ActionButtonElement;
2130
+ type Props = ActionButtonProps<typeof useBranchPickerNext>;
2131
+ }
1971
2132
  declare const BranchPickerPrimitiveNext: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1972
2133
  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;
1973
2134
  } & {
1974
2135
  asChild?: boolean;
1975
2136
  }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1976
2137
 
1977
- type BranchPickerPrimitivePreviousProps = ActionButtonProps<typeof useBranchPickerPrevious>;
1978
- declare const BranchPickerPrevious: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
2138
+ /**
2139
+ * @deprecated Use `BranchPickerPrimitive.Previous.Props` instead. This will be removed in 0.6.
2140
+ */
2141
+ type BranchPickerPrimitivePreviousProps = BranchPickerPrimitivePrevious.Props;
2142
+ declare namespace BranchPickerPrimitivePrevious {
2143
+ type Element = ActionButtonElement;
2144
+ type Props = ActionButtonProps<typeof useBranchPickerPrevious>;
2145
+ }
2146
+ declare const BranchPickerPrimitivePrevious: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1979
2147
  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;
1980
2148
  } & {
1981
2149
  asChild?: boolean;
1982
2150
  }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1983
2151
 
1984
- type BranchPickerPrimitiveCountProps = Record<string, never>;
1985
- declare const BranchPickerPrimitiveCount: FC<BranchPickerPrimitiveCountProps>;
2152
+ /**
2153
+ * @deprecated Use `BranchPickerPrimitive.Count.Props` instead. This will be removed in 0.6.
2154
+ */
2155
+ type BranchPickerPrimitiveCountProps = BranchPickerPrimitiveCount.Props;
2156
+ declare namespace BranchPickerPrimitiveCount {
2157
+ type Props = Record<string, never>;
2158
+ }
2159
+ declare const BranchPickerPrimitiveCount: FC<BranchPickerPrimitiveCount.Props>;
1986
2160
 
1987
- type BranchPickerPrimitiveNumberProps = Record<string, never>;
1988
- declare const BranchPickerPrimitiveNumber: FC<BranchPickerPrimitiveNumberProps>;
2161
+ /**
2162
+ * @deprecated Use `BranchPickerPrimitive.Number.Props` instead. This will be removed in 0.6.
2163
+ */
2164
+ type BranchPickerPrimitiveNumberProps = BranchPickerPrimitiveNumber.Props;
2165
+ declare namespace BranchPickerPrimitiveNumber {
2166
+ type Props = Record<string, never>;
2167
+ }
2168
+ declare const BranchPickerPrimitiveNumber: FC<BranchPickerPrimitiveNumber.Props>;
1989
2169
 
1990
- type PrimitiveDivProps$3 = ComponentPropsWithoutRef<typeof Primitive.div>;
1991
- type BranchPickerPrimitiveRootProps = PrimitiveDivProps$3 & {
1992
- hideWhenSingleBranch?: boolean | undefined;
1993
- };
2170
+ /**
2171
+ * @deprecated Use `BranchPickerPrimitive.Root.Props` instead. This will be removed in 0.6.
2172
+ */
2173
+ type BranchPickerPrimitiveRootProps = BranchPickerPrimitiveRoot.Props;
2174
+ declare namespace BranchPickerPrimitiveRoot {
2175
+ type Element = ElementRef<typeof Primitive.div>;
2176
+ type Props = ComponentPropsWithoutRef<typeof Primitive.div> & {
2177
+ hideWhenSingleBranch?: boolean | undefined;
2178
+ };
2179
+ }
1994
2180
  declare const BranchPickerPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1995
2181
  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;
1996
2182
  } & {
@@ -2000,70 +2186,112 @@ declare const BranchPickerPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Om
2000
2186
  } & react.RefAttributes<HTMLDivElement>>;
2001
2187
 
2002
2188
  declare namespace index$4 {
2003
- export { BranchPickerPrimitiveCount as Count, BranchPickerPrimitiveNext as Next, BranchPickerPrimitiveNumber as Number, BranchPickerPrevious as Previous, BranchPickerPrimitiveRoot as Root };
2189
+ export { BranchPickerPrimitiveCount as Count, BranchPickerPrimitiveNext as Next, BranchPickerPrimitiveNumber as Number, BranchPickerPrimitivePrevious as Previous, BranchPickerPrimitiveRoot as Root };
2004
2190
  }
2005
2191
 
2006
- type PrimitiveFormProps = ComponentPropsWithoutRef<typeof Primitive.form>;
2007
- type ComposerPrimitiveRootProps = PrimitiveFormProps;
2192
+ type ComposerPrimitiveRootProps = ComposerPrimitiveRoot.Props;
2193
+ declare namespace ComposerPrimitiveRoot {
2194
+ type Element = ElementRef<typeof Primitive.form>;
2195
+ type Props = ComponentPropsWithoutRef<typeof Primitive.form>;
2196
+ }
2008
2197
  declare const ComposerPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
2009
2198
  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;
2010
2199
  } & {
2011
2200
  asChild?: boolean;
2012
2201
  }, "ref"> & react.RefAttributes<HTMLFormElement>>;
2013
2202
 
2014
- type ComposerPrimitiveInputProps = TextareaAutosizeProps & {
2015
- asChild?: boolean | undefined;
2016
- submitOnEnter?: boolean | undefined;
2017
- cancelOnEscape?: boolean | undefined;
2018
- };
2203
+ /**
2204
+ * @deprecated Use `ComposerPrimitive.Input.Props` instead. This will be removed in 0.6.
2205
+ */
2206
+ type ComposerPrimitiveInputProps = ComposerPrimitiveInput.Props;
2207
+ declare namespace ComposerPrimitiveInput {
2208
+ type Element = HTMLTextAreaElement;
2209
+ type Props = TextareaAutosizeProps & {
2210
+ asChild?: boolean | undefined;
2211
+ submitOnEnter?: boolean | undefined;
2212
+ cancelOnEscape?: boolean | undefined;
2213
+ };
2214
+ }
2019
2215
  declare const ComposerPrimitiveInput: react.ForwardRefExoticComponent<TextareaAutosizeProps & {
2020
2216
  asChild?: boolean | undefined;
2021
2217
  submitOnEnter?: boolean | undefined;
2022
2218
  cancelOnEscape?: boolean | undefined;
2023
2219
  } & react.RefAttributes<HTMLTextAreaElement>>;
2024
2220
 
2025
- type ComposerPrimitiveSendProps = ActionButtonProps<typeof useComposerSend>;
2221
+ /**
2222
+ * @deprecated Use `ComposerPrimitive.Send.Props` instead. This will be removed in 0.6.
2223
+ */
2224
+ type ComposerPrimitiveSendProps = ComposerPrimitiveSend.Props;
2225
+ declare namespace ComposerPrimitiveSend {
2226
+ type Element = ActionButtonElement;
2227
+ type Props = ActionButtonProps<typeof useComposerSend>;
2228
+ }
2026
2229
  declare const ComposerPrimitiveSend: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
2027
2230
  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;
2028
2231
  } & {
2029
2232
  asChild?: boolean;
2030
2233
  }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
2031
2234
 
2032
- type ComposerPrimitiveCancelProps = ActionButtonProps<typeof useComposerCancel>;
2235
+ /**
2236
+ * @deprecated Use `ComposerPrimitive.Cancel.Props` instead. This will be removed in 0.6.
2237
+ */
2238
+ type ComposerPrimitiveCancelProps = ComposerPrimitiveCancel.Props;
2239
+ declare namespace ComposerPrimitiveCancel {
2240
+ type Element = ActionButtonElement;
2241
+ type Props = ActionButtonProps<typeof useComposerCancel>;
2242
+ }
2033
2243
  declare const ComposerPrimitiveCancel: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
2034
2244
  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;
2035
2245
  } & {
2036
2246
  asChild?: boolean;
2037
2247
  }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
2038
2248
 
2249
+ declare namespace ComposerPrimitiveAddAttachment {
2250
+ type Element = ActionButtonElement;
2251
+ type Props = ActionButtonProps<typeof useComposerAddAttachment>;
2252
+ }
2039
2253
  declare const ComposerPrimitiveAddAttachment: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
2040
2254
  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;
2041
2255
  } & {
2042
2256
  asChild?: boolean;
2043
2257
  }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
2044
2258
 
2045
- type ComposerPrimitiveAttachmentsProps = {
2046
- components: {
2047
- Image?: ComponentType | undefined;
2048
- Document?: ComponentType | undefined;
2049
- File?: ComponentType | undefined;
2050
- Attachment?: ComponentType | undefined;
2051
- } | undefined;
2052
- };
2053
- declare const ComposerPrimitiveAttachments: FC<ComposerPrimitiveAttachmentsProps>;
2259
+ declare namespace ComposerPrimitiveAttachments {
2260
+ type Props = {
2261
+ components: {
2262
+ Image?: ComponentType | undefined;
2263
+ Document?: ComponentType | undefined;
2264
+ File?: ComponentType | undefined;
2265
+ Attachment?: ComponentType | undefined;
2266
+ } | undefined;
2267
+ };
2268
+ }
2269
+ declare const ComposerPrimitiveAttachments: FC<ComposerPrimitiveAttachments.Props>;
2054
2270
 
2055
- type ComposerPrimitiveIfProps = PropsWithChildren<UseComposerIfProps>;
2056
- declare const ComposerPrimitiveIf: FC<ComposerPrimitiveIfProps>;
2271
+ /**
2272
+ * @deprecated Use `ComposerPrimitive.If.Props` instead. This will be removed in 0.6.
2273
+ */
2274
+ type ComposerPrimitiveIfProps = ComposerPrimitiveIf.Props;
2275
+ declare namespace ComposerPrimitiveIf {
2276
+ type Props = PropsWithChildren<UseComposerIfProps>;
2277
+ }
2278
+ declare const ComposerPrimitiveIf: FC<ComposerPrimitiveIf.Props>;
2057
2279
 
2058
2280
  declare namespace index$3 {
2059
2281
  export { ComposerPrimitiveAddAttachment as AddAttachment, ComposerPrimitiveAttachments as Attachments, ComposerPrimitiveCancel as Cancel, ComposerPrimitiveIf as If, ComposerPrimitiveInput as Input, ComposerPrimitiveRoot as Root, ComposerPrimitiveSend as Send };
2060
2282
  }
2061
2283
 
2062
- type PrimitiveSpanProps$1 = ComponentPropsWithoutRef<typeof Primitive.span>;
2063
- type ContentPartPrimitiveTextProps = Omit<PrimitiveSpanProps$1, "children" | "asChild"> & {
2064
- smooth?: boolean;
2065
- component?: ElementType;
2066
- };
2284
+ /**
2285
+ * @deprecated Use `ContentPartPrimitive.Text.Props` instead. This will be removed in 0.6.
2286
+ */
2287
+ type ContentPartPrimitiveTextProps = ContentPartPrimitiveText.Props;
2288
+ declare namespace ContentPartPrimitiveText {
2289
+ type Element = ElementRef<typeof Primitive.span>;
2290
+ type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.span>, "children" | "asChild"> & {
2291
+ smooth?: boolean;
2292
+ component?: ElementType;
2293
+ };
2294
+ }
2067
2295
  declare const ContentPartPrimitiveText: react.ForwardRefExoticComponent<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
2068
2296
  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;
2069
2297
  } & {
@@ -2073,129 +2301,212 @@ declare const ContentPartPrimitiveText: react.ForwardRefExoticComponent<Omit<Omi
2073
2301
  component?: ElementType;
2074
2302
  } & react.RefAttributes<HTMLSpanElement>>;
2075
2303
 
2076
- type PrimitiveImageProps = ComponentPropsWithoutRef<typeof Primitive.img>;
2077
- type ContentPartPrimitiveImageProps = PrimitiveImageProps;
2304
+ /**
2305
+ * @deprecated Use `ContentPartPrimitive.Image.Props` instead. This will be removed in 0.6.
2306
+ */
2307
+ type ContentPartPrimitiveImageProps = ContentPartPrimitiveImage.Props;
2308
+ declare namespace ContentPartPrimitiveImage {
2309
+ type Element = ElementRef<typeof Primitive.img>;
2310
+ type Props = ComponentPropsWithoutRef<typeof Primitive.img>;
2311
+ }
2078
2312
  declare const ContentPartPrimitiveImage: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
2079
2313
  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;
2080
2314
  } & {
2081
2315
  asChild?: boolean;
2082
2316
  }, "ref"> & react.RefAttributes<HTMLImageElement>>;
2083
2317
 
2084
- type ContentPartPrimitiveDisplayProps = Record<string, never>;
2085
- declare const ContentPartPrimitiveDisplay: FC;
2318
+ /**
2319
+ * @deprecated Use `ContentPartPrimitive.Display.Props` instead. This will be removed in 0.6.
2320
+ */
2321
+ type ContentPartPrimitiveDisplayProps = ContentPartPrimitiveDisplay.Props;
2322
+ declare namespace ContentPartPrimitiveDisplay {
2323
+ type Props = Record<string, never>;
2324
+ }
2325
+ declare const ContentPartPrimitiveDisplay: FC<ContentPartPrimitiveDisplay.Props>;
2086
2326
 
2087
- type ContentPartPrimitiveInProgressProps = PropsWithChildren;
2088
- declare const ContentPartPrimitiveInProgress: FC<ContentPartPrimitiveInProgressProps>;
2327
+ /**
2328
+ * @deprecated Use `ContentPartPrimitive.InProgress.Props` instead. This will be removed in 0.6.
2329
+ */
2330
+ type ContentPartPrimitiveInProgressProps = ContentPartPrimitiveInProgress.Props;
2331
+ declare namespace ContentPartPrimitiveInProgress {
2332
+ type Props = PropsWithChildren;
2333
+ }
2334
+ declare const ContentPartPrimitiveInProgress: FC<ContentPartPrimitiveInProgress.Props>;
2089
2335
 
2090
2336
  declare namespace index$2 {
2091
2337
  export { ContentPartPrimitiveDisplay as Display, ContentPartPrimitiveImage as Image, ContentPartPrimitiveInProgress as InProgress, ContentPartPrimitiveText as Text };
2092
2338
  }
2093
2339
 
2094
- type PrimitiveDivProps$2 = ComponentPropsWithoutRef<typeof Primitive.div>;
2095
- type MessagePrimitiveRootProps = PrimitiveDivProps$2;
2340
+ /**
2341
+ * @deprecated Use `MessagePrimitive.Root.Props` instead. This will be removed in 0.6.
2342
+ */
2343
+ type MessagePrimitiveRootProps = MessagePrimitiveRoot.Props;
2344
+ declare namespace MessagePrimitiveRoot {
2345
+ type Element = ElementRef<typeof Primitive.div>;
2346
+ type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
2347
+ }
2096
2348
  declare const MessagePrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2097
2349
  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;
2098
2350
  } & {
2099
2351
  asChild?: boolean;
2100
2352
  }, "ref"> & react.RefAttributes<HTMLDivElement>>;
2101
2353
 
2102
- type MessagePrimitiveIfProps = PropsWithChildren<UseMessageIfProps>;
2103
- declare const MessagePrimitiveIf: FC<MessagePrimitiveIfProps>;
2354
+ /**
2355
+ * @deprecated Use `MessagePrimitive.If.Props` instead. This will be removed in 0.6.
2356
+ */
2357
+ type MessagePrimitiveIfProps = MessagePrimitiveIf.Props;
2358
+ declare namespace MessagePrimitiveIf {
2359
+ type Props = PropsWithChildren<UseMessageIfProps>;
2360
+ }
2361
+ declare const MessagePrimitiveIf: FC<MessagePrimitiveIf.Props>;
2104
2362
 
2105
- type MessagePrimitiveContentProps = {
2106
- components?: {
2107
- Empty?: EmptyContentPartComponent | undefined;
2108
- Text?: TextContentPartComponent | undefined;
2109
- Image?: ImageContentPartComponent | undefined;
2110
- UI?: UIContentPartComponent | undefined;
2111
- tools?: {
2112
- by_name?: Record<string, ToolCallContentPartComponent | undefined> | undefined;
2113
- Fallback?: ComponentType<ToolCallContentPartProps> | undefined;
2363
+ /**
2364
+ * @deprecated Use `MessagePrimitive.Content.Props` instead. This will be removed in 0.6.
2365
+ */
2366
+ type MessagePrimitiveContentProps = MessagePrimitiveContent.Props;
2367
+ declare namespace MessagePrimitiveContent {
2368
+ type Props = {
2369
+ components?: {
2370
+ Empty?: EmptyContentPartComponent | undefined;
2371
+ Text?: TextContentPartComponent | undefined;
2372
+ Image?: ImageContentPartComponent | undefined;
2373
+ UI?: UIContentPartComponent | undefined;
2374
+ tools?: {
2375
+ by_name?: Record<string, ToolCallContentPartComponent | undefined> | undefined;
2376
+ Fallback?: ComponentType<ToolCallContentPartProps> | undefined;
2377
+ } | undefined;
2114
2378
  } | undefined;
2115
- } | undefined;
2116
- };
2117
- declare const MessagePrimitiveContent: FC<MessagePrimitiveContentProps>;
2379
+ };
2380
+ }
2381
+ declare const MessagePrimitiveContent: FC<MessagePrimitiveContent.Props>;
2118
2382
 
2119
2383
  type PrimitiveSpanProps = ComponentPropsWithoutRef<typeof Primitive.span>;
2384
+ /**
2385
+ * @deprecated Define a custom Text renderer via ContentPartPrimitiveInProgress instead. This will be removed in 0.6.
2386
+ */
2120
2387
  type MessagePrimitiveInProgressProps = PrimitiveSpanProps;
2121
2388
  /**
2122
2389
  * @deprecated Define a custom Text renderer via ContentPartPrimitiveInProgress instead. This will be removed in 0.6.
2123
2390
  */
2124
2391
  declare const MessagePrimitiveInProgress: FC<MessagePrimitiveInProgressProps>;
2125
2392
 
2126
- type MessagePrimitiveAttachmentsProps = {
2127
- components: {
2128
- Image?: ComponentType | undefined;
2129
- Document?: ComponentType | undefined;
2130
- File?: ComponentType | undefined;
2131
- Attachment?: ComponentType | undefined;
2132
- } | undefined;
2133
- };
2134
- declare const MessagePrimitiveAttachments: FC<MessagePrimitiveAttachmentsProps>;
2393
+ declare namespace MessagePrimitiveAttachments {
2394
+ type Props = {
2395
+ components: {
2396
+ Image?: ComponentType | undefined;
2397
+ Document?: ComponentType | undefined;
2398
+ File?: ComponentType | undefined;
2399
+ Attachment?: ComponentType | undefined;
2400
+ } | undefined;
2401
+ };
2402
+ }
2403
+ declare const MessagePrimitiveAttachments: FC<MessagePrimitiveAttachments.Props>;
2135
2404
 
2136
2405
  declare namespace index$1 {
2137
2406
  export { MessagePrimitiveAttachments as Attachments, MessagePrimitiveContent as Content, MessagePrimitiveIf as If, MessagePrimitiveInProgress as InProgress, MessagePrimitiveRoot as Root };
2138
2407
  }
2139
2408
 
2140
- type PrimitiveDivProps$1 = ComponentPropsWithoutRef<typeof Primitive.div>;
2141
- type ThreadPrimitiveRootProps = PrimitiveDivProps$1;
2409
+ /**
2410
+ * @deprecated Use `ThreadPrimitive.Root.Props` instead. This will be removed in 0.6.
2411
+ */
2412
+ type ThreadPrimitiveRootProps = ThreadPrimitiveRoot.Props;
2413
+ declare namespace ThreadPrimitiveRoot {
2414
+ type Element = ElementRef<typeof Primitive.div>;
2415
+ type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
2416
+ }
2142
2417
  declare const ThreadPrimitiveRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2143
2418
  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;
2144
2419
  } & {
2145
2420
  asChild?: boolean;
2146
2421
  }, "ref"> & react.RefAttributes<HTMLDivElement>>;
2147
2422
 
2148
- type ThreadPrimitiveEmptyProps = {
2149
- children: ReactNode;
2150
- };
2151
- declare const ThreadPrimitiveEmpty: FC<ThreadPrimitiveEmptyProps>;
2423
+ /**
2424
+ * @deprecated Use `ThreadPrimitive.Empty.Props` instead. This will be removed in 0.6.
2425
+ */
2426
+ type ThreadPrimitiveEmptyProps = ThreadPrimitiveEmpty.Props;
2427
+ declare namespace ThreadPrimitiveEmpty {
2428
+ type Props = PropsWithChildren;
2429
+ }
2430
+ declare const ThreadPrimitiveEmpty: FC<ThreadPrimitiveEmpty.Props>;
2152
2431
 
2153
- type ThreadPrimitiveIfProps = PropsWithChildren<UseThreadIfProps>;
2154
- declare const ThreadPrimitiveIf: FC<ThreadPrimitiveIfProps>;
2432
+ /**
2433
+ * @deprecated Use `ThreadPrimitive.If.Props` instead. This will be removed in 0.6.
2434
+ */
2435
+ type ThreadPrimitiveIfProps = ThreadPrimitiveIf.Props;
2436
+ declare namespace ThreadPrimitiveIf {
2437
+ type Props = PropsWithChildren<UseThreadIfProps>;
2438
+ }
2439
+ declare const ThreadPrimitiveIf: FC<ThreadPrimitiveIf.Props>;
2155
2440
 
2156
2441
  type UseThreadViewportAutoScrollProps = {
2157
2442
  autoScroll?: boolean | undefined;
2158
2443
  };
2159
2444
 
2160
- type PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;
2161
- type ThreadPrimitiveViewportProps = PrimitiveDivProps & UseThreadViewportAutoScrollProps;
2445
+ /**
2446
+ * @deprecated Use `ThreadPrimitive.Viewport.Props` instead. This will be removed in 0.6.
2447
+ */
2448
+ type ThreadPrimitiveViewportProps = ThreadPrimitiveViewport.Props;
2449
+ declare namespace ThreadPrimitiveViewport {
2450
+ type Element = ElementRef<typeof Primitive.div>;
2451
+ type Props = ComponentPropsWithoutRef<typeof Primitive.div> & UseThreadViewportAutoScrollProps;
2452
+ }
2162
2453
  declare const ThreadPrimitiveViewport: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2163
2454
  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;
2164
2455
  } & {
2165
2456
  asChild?: boolean;
2166
2457
  }, "ref"> & UseThreadViewportAutoScrollProps & react.RefAttributes<HTMLDivElement>>;
2167
2458
 
2168
- type ThreadPrimitiveMessagesProps = {
2169
- components: {
2170
- Message: ComponentType;
2171
- EditComposer?: ComponentType | undefined;
2172
- UserEditComposer?: ComponentType | undefined;
2173
- AssistantEditComposer?: ComponentType | undefined;
2174
- SystemEditComposer?: ComponentType | undefined;
2175
- UserMessage?: ComponentType | undefined;
2176
- AssistantMessage?: ComponentType | undefined;
2177
- SystemMessage?: ComponentType | undefined;
2178
- } | {
2179
- Message?: ComponentType | undefined;
2180
- EditComposer?: ComponentType | undefined;
2181
- UserEditComposer?: ComponentType | undefined;
2182
- AssistantEditComposer?: ComponentType | undefined;
2183
- SystemEditComposer?: ComponentType | undefined;
2184
- UserMessage: ComponentType;
2185
- AssistantMessage: ComponentType;
2186
- SystemMessage?: ComponentType | undefined;
2459
+ /**
2460
+ * @deprecated Use `ThreadPrimitive.Messages.Props` instead. This will be removed in 0.6.
2461
+ */
2462
+ type ThreadPrimitiveMessagesProps = ThreadPrimitiveMessages.Props;
2463
+ declare namespace ThreadPrimitiveMessages {
2464
+ type Props = {
2465
+ components: {
2466
+ Message: ComponentType;
2467
+ EditComposer?: ComponentType | undefined;
2468
+ UserEditComposer?: ComponentType | undefined;
2469
+ AssistantEditComposer?: ComponentType | undefined;
2470
+ SystemEditComposer?: ComponentType | undefined;
2471
+ UserMessage?: ComponentType | undefined;
2472
+ AssistantMessage?: ComponentType | undefined;
2473
+ SystemMessage?: ComponentType | undefined;
2474
+ } | {
2475
+ Message?: ComponentType | undefined;
2476
+ EditComposer?: ComponentType | undefined;
2477
+ UserEditComposer?: ComponentType | undefined;
2478
+ AssistantEditComposer?: ComponentType | undefined;
2479
+ SystemEditComposer?: ComponentType | undefined;
2480
+ UserMessage: ComponentType;
2481
+ AssistantMessage: ComponentType;
2482
+ SystemMessage?: ComponentType | undefined;
2483
+ };
2187
2484
  };
2188
- };
2189
- declare const ThreadPrimitiveMessages: react.NamedExoticComponent<ThreadPrimitiveMessagesProps>;
2485
+ }
2486
+ declare const ThreadPrimitiveMessages: react.NamedExoticComponent<ThreadPrimitiveMessages.Props>;
2190
2487
 
2191
- type ThreadPrimitiveScrollToBottomProps = ActionButtonProps<typeof useThreadScrollToBottom>;
2488
+ /**
2489
+ * @deprecated Use `ThreadPrimitive.ScrollToBottom.Props` instead. This will be removed in 0.6.
2490
+ */
2491
+ type ThreadPrimitiveScrollToBottomProps = ThreadPrimitiveScrollToBottom.Props;
2492
+ declare namespace ThreadPrimitiveScrollToBottom {
2493
+ type Element = ActionButtonElement;
2494
+ type Props = ActionButtonProps<typeof useThreadScrollToBottom>;
2495
+ }
2192
2496
  declare const ThreadPrimitiveScrollToBottom: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
2193
2497
  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;
2194
2498
  } & {
2195
2499
  asChild?: boolean;
2196
2500
  }, "ref"> & react.RefAttributes<HTMLButtonElement>>;
2197
2501
 
2198
- type ThreadPrimitiveSuggestionProps = ActionButtonProps<typeof useThreadSuggestion>;
2502
+ /**
2503
+ * @deprecated Use `ThreadPrimitive.Suggestion.Props` instead. This will be removed in 0.6.
2504
+ */
2505
+ type ThreadPrimitiveSuggestionProps = ThreadPrimitiveSuggestion.Props;
2506
+ declare namespace ThreadPrimitiveSuggestion {
2507
+ type Element = ActionButtonElement;
2508
+ type Props = ActionButtonProps<typeof useThreadSuggestion>;
2509
+ }
2199
2510
  declare const ThreadPrimitiveSuggestion: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
2200
2511
  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;
2201
2512
  } & {
@@ -2377,7 +2688,9 @@ declare const exports$c: {
2377
2688
  asChild?: boolean;
2378
2689
  }, "ref"> & UseActionBarFloatStatusProps & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
2379
2690
  Reload: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
2380
- Copy: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
2691
+ Copy: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & {
2692
+ copiedDuration?: number | undefined;
2693
+ } & react.RefAttributes<HTMLButtonElement>>;
2381
2694
  Speak: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
2382
2695
  StopSpeaking: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
2383
2696
  SpeechControl: FC;
@@ -2387,7 +2700,15 @@ declare const exports$c: {
2387
2700
  declare const _default$b: typeof AssistantActionBar & typeof exports$c;
2388
2701
 
2389
2702
  declare const AssistantMessage: FC;
2390
- type AssistantMessageContentProps = MessagePrimitiveContentProps & ComponentPropsWithoutRef<"div">;
2703
+ /**
2704
+ * @deprecated Use `AssistantMessage.Content.Props` instead. This will be removed in 0.6.
2705
+ */
2706
+ type AssistantMessageContentProps = AssistantMessageContent.Props;
2707
+ declare namespace AssistantMessageContent {
2708
+ type Element = HTMLDivElement;
2709
+ type Props = MessagePrimitiveContent.Props & ComponentPropsWithoutRef<"div">;
2710
+ }
2711
+ declare const AssistantMessageContent: react.ForwardRefExoticComponent<MessagePrimitiveContent.Props & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
2391
2712
  declare const exports$b: {
2392
2713
  Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2393
2714
  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;
@@ -2395,25 +2716,24 @@ declare const exports$b: {
2395
2716
  asChild?: boolean;
2396
2717
  }, "ref"> & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
2397
2718
  Avatar: FC;
2398
- Content: react.ForwardRefExoticComponent<MessagePrimitiveContentProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
2719
+ Content: react.ForwardRefExoticComponent<MessagePrimitiveContent.Props & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
2399
2720
  };
2400
2721
  declare const _default$a: typeof AssistantMessage & typeof exports$b;
2401
2722
 
2402
2723
  declare const AssistantModal: FC<ThreadConfig>;
2403
- type AssistantModalButtonProps = TooltipIconButtonProps & {
2404
- "data-state"?: "open" | "closed";
2405
- };
2724
+ declare namespace AssistantModalRoot {
2725
+ type Props = AssistantModalPrimitiveRoot.Props & ThreadConfigProviderProps;
2726
+ }
2727
+ declare const AssistantModalRoot: FC<AssistantModalRoot.Props>;
2406
2728
  declare const exports$a: {
2407
- Root: FC<PopoverPrimitive.PopoverProps & {
2408
- config?: ThreadConfig | undefined;
2409
- } & {
2410
- children?: react.ReactNode | undefined;
2411
- }>;
2729
+ Root: FC<AssistantModalRoot.Props>;
2412
2730
  Trigger: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
2413
2731
  Content: react.ForwardRefExoticComponent<Partial<Omit<Omit<PopoverPrimitive.PopoverContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
2414
2732
  dissmissOnInteractOutside?: boolean | undefined;
2415
2733
  } & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
2416
- Button: react.ForwardRefExoticComponent<Partial<AssistantModalButtonProps> & react.RefAttributes<HTMLButtonElement>>;
2734
+ Button: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & {
2735
+ "data-state"?: "open" | "closed";
2736
+ } & react.RefAttributes<HTMLButtonElement>>;
2417
2737
  Anchor: react.ForwardRefExoticComponent<Partial<Omit<Omit<PopoverPrimitive.PopoverAnchorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
2418
2738
  };
2419
2739
  declare const _default$9: typeof AssistantModal & typeof exports$a;
@@ -2438,7 +2758,19 @@ declare const ComposerInputStyled: react.ForwardRefExoticComponent<Partial<Omit<
2438
2758
  submitOnEnter?: boolean | undefined;
2439
2759
  cancelOnEscape?: boolean | undefined;
2440
2760
  } & react.RefAttributes<HTMLTextAreaElement>, "ref">> & react.RefAttributes<HTMLTextAreaElement>>;
2441
- type ComposerInputProps = ComponentPropsWithoutRef<typeof ComposerInputStyled>;
2761
+ /**
2762
+ * @deprecated Use `ComposerInput.Props` instead. This will be removed in 0.6.
2763
+ */
2764
+ type ComposerInputProps = ComposerInput.Props;
2765
+ declare namespace ComposerInput {
2766
+ type Element = HTMLTextAreaElement;
2767
+ type Props = ComponentPropsWithoutRef<typeof ComposerInputStyled>;
2768
+ }
2769
+ declare const ComposerInput: react.ForwardRefExoticComponent<Omit<Partial<Omit<react_textarea_autosize.TextareaAutosizeProps & {
2770
+ asChild?: boolean | undefined;
2771
+ submitOnEnter?: boolean | undefined;
2772
+ cancelOnEscape?: boolean | undefined;
2773
+ } & react.RefAttributes<HTMLTextAreaElement>, "ref">> & react.RefAttributes<HTMLTextAreaElement>, "ref"> & react.RefAttributes<HTMLTextAreaElement>>;
2442
2774
  declare const exports$8: {
2443
2775
  Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
2444
2776
  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;
@@ -2454,7 +2786,7 @@ declare const exports$8: {
2454
2786
  Send: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
2455
2787
  Cancel: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
2456
2788
  AddAttachment: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
2457
- Attachments: FC<Partial<ComposerPrimitiveAttachmentsProps>>;
2789
+ Attachments: FC<Partial<ComposerPrimitiveAttachments.Props>>;
2458
2790
  };
2459
2791
  declare const _default$7: typeof Composer & typeof exports$8;
2460
2792
 
@@ -2488,7 +2820,23 @@ declare const exports$6: {
2488
2820
  declare const _default$5: typeof EditComposer & typeof exports$6;
2489
2821
 
2490
2822
  declare const Thread: FC<ThreadConfig>;
2491
- type ThreadRootProps = ThreadPrimitiveRootProps & ThreadConfigProviderProps;
2823
+ /**
2824
+ * @deprecated Use `Thread.Root.Props` instead. This will be removed in 0.6.
2825
+ */
2826
+ type ThreadRootProps = ThreadRoot.Props;
2827
+ declare namespace ThreadRoot {
2828
+ type Element = HTMLDivElement;
2829
+ type Props = ThreadPrimitiveRoot.Props & ThreadConfigProviderProps;
2830
+ }
2831
+ declare const ThreadRoot: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2832
+ 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;
2833
+ } & {
2834
+ asChild?: boolean;
2835
+ }, "ref"> & {
2836
+ config?: ThreadConfig | undefined;
2837
+ } & {
2838
+ children?: react.ReactNode | undefined;
2839
+ } & react.RefAttributes<HTMLDivElement>>;
2492
2840
  declare const exports$5: {
2493
2841
  Root: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2494
2842
  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;
@@ -2520,15 +2868,23 @@ declare const exports$5: {
2520
2868
  declare const _default$4: typeof Thread & typeof exports$5;
2521
2869
 
2522
2870
  declare const UserMessage: FC;
2523
- type UserMessageContentProps = MessagePrimitiveContentProps & ComponentPropsWithoutRef<"div">;
2871
+ /**
2872
+ * @deprecated Use `UserMessage.Content.Props` instead. This will be removed in 0.6.
2873
+ */
2874
+ type UserMessageContentProps = UserMessageContent.Props;
2875
+ declare namespace UserMessageContent {
2876
+ type Element = HTMLDivElement;
2877
+ type Props = MessagePrimitiveContent.Props & ComponentPropsWithoutRef<"div">;
2878
+ }
2879
+ declare const UserMessageContent: react.ForwardRefExoticComponent<MessagePrimitiveContent.Props & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
2524
2880
  declare const exports$4: {
2525
2881
  Root: react.ForwardRefExoticComponent<Partial<Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2526
2882
  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;
2527
2883
  } & {
2528
2884
  asChild?: boolean;
2529
2885
  }, "ref"> & react.RefAttributes<HTMLDivElement>, "ref">> & react.RefAttributes<HTMLDivElement>>;
2530
- Content: react.ForwardRefExoticComponent<MessagePrimitiveContentProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
2531
- Attachments: FC<Partial<MessagePrimitiveAttachmentsProps>>;
2886
+ Content: react.ForwardRefExoticComponent<MessagePrimitiveContent.Props & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
2887
+ Attachments: FC<Partial<MessagePrimitiveAttachments.Props>>;
2532
2888
  };
2533
2889
  declare const _default$3: typeof UserMessage & typeof exports$4;
2534
2890
 
@@ -2555,9 +2911,19 @@ declare const _default$1: typeof UserMessageAttachment & typeof exports$2;
2555
2911
 
2556
2912
  declare const ThreadWelcome: FC;
2557
2913
  declare const ThreadWelcomeMessageStyled: react.ForwardRefExoticComponent<Partial<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">> & react.RefAttributes<HTMLParagraphElement>>;
2558
- type ThreadWelcomeMessageProps = Omit<ComponentPropsWithoutRef<typeof ThreadWelcomeMessageStyled>, "children"> & {
2914
+ /**
2915
+ * @deprecated Use `ThreadWelcome.Message.Props` instead. This will be removed in 0.6.
2916
+ */
2917
+ type ThreadWelcomeMessageProps = ThreadWelcomeMessage.Props;
2918
+ declare namespace ThreadWelcomeMessage {
2919
+ type Element = HTMLParagraphElement;
2920
+ type Props = Omit<ComponentPropsWithoutRef<typeof ThreadWelcomeMessageStyled>, "children"> & {
2921
+ message?: string | undefined;
2922
+ };
2923
+ }
2924
+ declare const ThreadWelcomeMessage: react.ForwardRefExoticComponent<Omit<Omit<Partial<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">> & react.RefAttributes<HTMLParagraphElement>, "ref">, "children"> & {
2559
2925
  message?: string | undefined;
2560
- };
2926
+ } & react.RefAttributes<HTMLParagraphElement>>;
2561
2927
  type ThreadWelcomeSuggestionProps = {
2562
2928
  suggestion: SuggestionConfig;
2563
2929
  };
@@ -2644,7 +3010,7 @@ declare const useSmoothStatus: {
2644
3010
  }): TSelected | null;
2645
3011
  };
2646
3012
 
2647
- type internal_AssistantRuntimeImpl<TThreadRuntime extends ThreadRuntime = ThreadRuntime> = AssistantRuntimeImpl<TThreadRuntime>;
3013
+ type internal_AssistantRuntimeImpl = AssistantRuntimeImpl;
2648
3014
  declare const internal_AssistantRuntimeImpl: typeof AssistantRuntimeImpl;
2649
3015
  type internal_BaseAssistantRuntimeCore<TThreadRuntime extends ThreadRuntimeCore> = BaseAssistantRuntimeCore<TThreadRuntime>;
2650
3016
  declare const internal_BaseAssistantRuntimeCore: typeof BaseAssistantRuntimeCore;