@assistant-ui/react 0.5.66 → 0.5.67
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{edge-D7ch2oPK.d.mts → edge-BDAlTCC1.d.mts} +2 -2
- package/dist/{edge-D7ch2oPK.d.ts → edge-BDAlTCC1.d.ts} +2 -2
- package/dist/index.d.mts +388 -646
- package/dist/index.d.ts +388 -646
- package/dist/index.js +991 -890
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +924 -823
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
export { s as CoreAssistantContentPart, v as CoreAssistantMessage, t as CoreSystemMessage, r as CoreUserContentPart, u as CoreUserMessage, E as EdgeRuntimeRequestOptions, p as ThreadAssistantMessage, o as ThreadSystemMessage, q as ThreadUserMessage } from './edge-
|
1
|
+
import { T as ThreadComposerAttachment, a as ThreadMessage, C as CoreMessage, A as AppendMessage, M as ModelConfig, b as ModelConfigProvider, c as ThreadAssistantContentPart, d as MessageStatus, e as ThreadRoundtrip, f as MessageAttachment, g as Tool, h as TextContentPart, I as ImageContentPart, i as ToolCallContentPart, j as CoreToolCallContentPart, U as UIContentPart, k as CreateEdgeRuntimeAPIOptions, l as ThreadUserContentPart, m as ContentPartStatus, n as ToolCallContentPartStatus } from './edge-BDAlTCC1.mjs';
|
2
|
+
export { s as CoreAssistantContentPart, v as CoreAssistantMessage, t as CoreSystemMessage, r as CoreUserContentPart, u as CoreUserMessage, E as EdgeRuntimeRequestOptions, p as ThreadAssistantMessage, o as ThreadSystemMessage, q as ThreadUserMessage } from './edge-BDAlTCC1.mjs';
|
3
3
|
import * as react from 'react';
|
4
4
|
import { ComponentType, PropsWithChildren, FC, ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
|
5
5
|
import { StoreApi, UseBoundStore } from 'zustand';
|
@@ -14,31 +14,24 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
14
14
|
import 'json-schema';
|
15
15
|
import 'zod';
|
16
16
|
|
17
|
-
type
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
}
|
35
|
-
type UIContentPartComponent = ComponentType<UIContentPartProps>;
|
36
|
-
type ToolCallContentPartProps<TArgs extends Record<string, unknown> = any, TResult = unknown> = {
|
37
|
-
part: ToolCallContentPart<TArgs, TResult>;
|
38
|
-
status: ToolCallContentPartStatus;
|
39
|
-
addResult: (result: any) => void;
|
40
|
-
};
|
41
|
-
type ToolCallContentPartComponent<TArgs extends Record<string, unknown> = any, TResult = any> = ComponentType<ToolCallContentPartProps<TArgs, TResult>>;
|
17
|
+
type ComposerRuntimeCore = Readonly<{
|
18
|
+
attachmentAccept: string;
|
19
|
+
attachments: readonly ThreadComposerAttachment[];
|
20
|
+
addAttachment: (file: File) => Promise<void>;
|
21
|
+
removeAttachment: (attachmentId: string) => Promise<void>;
|
22
|
+
isEditing: boolean;
|
23
|
+
canCancel: boolean;
|
24
|
+
isEmpty: boolean;
|
25
|
+
text: string;
|
26
|
+
setText: (value: string) => void;
|
27
|
+
/**
|
28
|
+
* @deprecated This method will be removed in 0.6.0. Submit feedback if you need this functionality.
|
29
|
+
*/
|
30
|
+
reset: () => void;
|
31
|
+
send: () => void;
|
32
|
+
cancel: () => void;
|
33
|
+
subscribe: (callback: () => void) => Unsubscribe;
|
34
|
+
}>;
|
42
35
|
|
43
36
|
type Unsubscribe = () => void;
|
44
37
|
|
@@ -91,21 +84,6 @@ declare class MessageRepository {
|
|
91
84
|
import({ headId, messages }: ExportedMessageRepository): void;
|
92
85
|
}
|
93
86
|
|
94
|
-
type ThreadComposerRuntimeCore = Readonly<{
|
95
|
-
attachmentAccept: string;
|
96
|
-
attachments: ThreadComposerAttachment[];
|
97
|
-
addAttachment: (file: File) => Promise<void>;
|
98
|
-
removeAttachment: (attachmentId: string) => Promise<void>;
|
99
|
-
canCancel: boolean;
|
100
|
-
isEmpty: boolean;
|
101
|
-
text: string;
|
102
|
-
setText: (value: string) => void;
|
103
|
-
reset: () => void;
|
104
|
-
send: () => void;
|
105
|
-
cancel: () => void;
|
106
|
-
subscribe: (callback: () => void) => Unsubscribe;
|
107
|
-
}>;
|
108
|
-
|
109
87
|
type RuntimeCapabilities = Readonly<{
|
110
88
|
switchToBranch: boolean;
|
111
89
|
edit: boolean;
|
@@ -136,7 +114,9 @@ type ThreadRuntimeCore = Readonly<{
|
|
136
114
|
speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
|
137
115
|
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
138
116
|
getModelConfig: () => ModelConfig;
|
139
|
-
composer:
|
117
|
+
composer: ComposerRuntimeCore;
|
118
|
+
getEditComposer: (messageId: string) => ComposerRuntimeCore | undefined;
|
119
|
+
beginEdit: (messageId: string) => void;
|
140
120
|
capabilities: Readonly<RuntimeCapabilities>;
|
141
121
|
threadId: string;
|
142
122
|
isDisabled: boolean;
|
@@ -214,37 +194,69 @@ type AttachmentAdapter = {
|
|
214
194
|
send(attachment: ThreadComposerAttachment): Promise<MessageAttachment>;
|
215
195
|
};
|
216
196
|
|
217
|
-
declare class
|
218
|
-
|
219
|
-
|
197
|
+
declare class SimpleImageAttachmentAdapter implements AttachmentAdapter {
|
198
|
+
accept: string;
|
199
|
+
add(state: {
|
200
|
+
file: File;
|
201
|
+
}): Promise<ThreadComposerAttachment>;
|
202
|
+
send(attachment: ThreadComposerAttachment): Promise<MessageAttachment>;
|
203
|
+
remove(): Promise<void>;
|
204
|
+
}
|
205
|
+
|
206
|
+
declare class SimpleTextAttachmentAdapter implements AttachmentAdapter {
|
207
|
+
accept: string;
|
208
|
+
add(state: {
|
209
|
+
file: File;
|
210
|
+
}): Promise<ThreadComposerAttachment>;
|
211
|
+
send(attachment: ThreadComposerAttachment): Promise<MessageAttachment>;
|
212
|
+
remove(): Promise<void>;
|
213
|
+
}
|
214
|
+
|
215
|
+
declare class CompositeAttachmentAdapter implements AttachmentAdapter {
|
216
|
+
private _adapters;
|
217
|
+
accept: string;
|
218
|
+
constructor(adapters: AttachmentAdapter[]);
|
219
|
+
add(state: {
|
220
|
+
file: File;
|
221
|
+
}): Promise<ThreadComposerAttachment>;
|
222
|
+
send(attachment: ThreadComposerAttachment): Promise<MessageAttachment>;
|
223
|
+
remove(attachment: ThreadComposerAttachment): Promise<void>;
|
224
|
+
}
|
225
|
+
|
226
|
+
declare abstract class BaseComposerRuntimeCore implements ComposerRuntimeCore {
|
227
|
+
readonly isEditing = true;
|
220
228
|
attachmentAccept: string;
|
221
|
-
get isEmpty(): boolean;
|
222
|
-
private _canCancel;
|
223
|
-
get canCancel(): boolean;
|
224
|
-
constructor(runtime: {
|
225
|
-
capabilities: Readonly<RuntimeCapabilities>;
|
226
|
-
messages: ThreadRuntimeCore["messages"];
|
227
|
-
append: (message: AppendMessage) => void;
|
228
|
-
cancelRun: () => void;
|
229
|
-
subscribe: (callback: () => void) => Unsubscribe;
|
230
|
-
});
|
231
|
-
connect(): Unsubscribe;
|
232
|
-
setAttachmentAdapter(adapter: AttachmentAdapter | undefined): boolean;
|
233
229
|
private _attachments;
|
234
|
-
|
235
|
-
|
236
|
-
|
230
|
+
protected set attachments(value: readonly ThreadComposerAttachment[]);
|
231
|
+
get attachments(): readonly ThreadComposerAttachment[];
|
232
|
+
abstract get canCancel(): boolean;
|
233
|
+
get isEmpty(): boolean;
|
237
234
|
private _text;
|
238
235
|
get text(): string;
|
239
236
|
setText(value: string): void;
|
240
237
|
reset(): void;
|
241
238
|
send(): Promise<void>;
|
242
|
-
|
239
|
+
abstract handleSend(message: Omit<AppendMessage, "parentId">): void;
|
240
|
+
abstract cancel(): void;
|
241
|
+
protected _attachmentAdapter?: AttachmentAdapter | undefined;
|
242
|
+
setAttachmentAdapter(adapter: AttachmentAdapter | undefined): void;
|
243
|
+
addAttachment(file: File): Promise<void>;
|
244
|
+
removeAttachment(attachmentId: string): Promise<void>;
|
243
245
|
private _subscriptions;
|
244
|
-
|
246
|
+
protected notifySubscribers(): void;
|
245
247
|
subscribe(callback: () => void): Unsubscribe;
|
246
248
|
}
|
247
249
|
|
250
|
+
declare class DefaultThreadComposerRuntimeCore extends BaseComposerRuntimeCore {
|
251
|
+
private runtime;
|
252
|
+
private _canCancel;
|
253
|
+
get canCancel(): boolean;
|
254
|
+
constructor(runtime: Omit<ThreadRuntimeCore, "composer">);
|
255
|
+
connect(): Unsubscribe;
|
256
|
+
handleSend(message: Omit<AppendMessage, "parentId">): Promise<void>;
|
257
|
+
cancel(): Promise<void>;
|
258
|
+
}
|
259
|
+
|
248
260
|
type FeedbackAdapterFeedback = {
|
249
261
|
message: ThreadMessage;
|
250
262
|
type: "positive" | "negative";
|
@@ -263,6 +275,21 @@ type LocalRuntimeOptions = {
|
|
263
275
|
} | undefined;
|
264
276
|
};
|
265
277
|
|
278
|
+
declare class DefaultEditComposerRuntimeCore extends BaseComposerRuntimeCore {
|
279
|
+
private runtime;
|
280
|
+
private endEditCallback;
|
281
|
+
get canCancel(): boolean;
|
282
|
+
private _nonTextParts;
|
283
|
+
private _previousText;
|
284
|
+
private _parentId;
|
285
|
+
constructor(runtime: Omit<ThreadRuntimeCore, "composer">, endEditCallback: () => void, { parentId, message }: {
|
286
|
+
parentId: string | null;
|
287
|
+
message: ThreadMessage;
|
288
|
+
});
|
289
|
+
handleSend(message: Omit<AppendMessage, "parentId">): Promise<void>;
|
290
|
+
cancel(): Promise<void>;
|
291
|
+
}
|
292
|
+
|
266
293
|
declare class LocalThreadRuntimeCore implements ThreadRuntimeCore {
|
267
294
|
private configProvider;
|
268
295
|
adapter: ChatModelAdapter;
|
@@ -282,12 +309,15 @@ declare class LocalThreadRuntimeCore implements ThreadRuntimeCore {
|
|
282
309
|
readonly threadId: string;
|
283
310
|
readonly isDisabled = false;
|
284
311
|
get messages(): ThreadMessage[];
|
285
|
-
readonly composer:
|
312
|
+
readonly composer: DefaultThreadComposerRuntimeCore;
|
286
313
|
constructor(configProvider: ModelConfigProvider, adapter: ChatModelAdapter, { initialMessages, ...options }: LocalRuntimeOptions);
|
287
314
|
getModelConfig(): ModelConfig;
|
288
315
|
private _options;
|
289
316
|
get options(): LocalRuntimeOptions;
|
290
317
|
set options({ initialMessages, ...options }: LocalRuntimeOptions);
|
318
|
+
private _editComposers;
|
319
|
+
getEditComposer(messageId: string): DefaultEditComposerRuntimeCore | undefined;
|
320
|
+
beginEdit(messageId: string): void;
|
291
321
|
getBranches(messageId: string): string[];
|
292
322
|
switchToBranch(branchId: string): void;
|
293
323
|
append(message: AppendMessage): Promise<void>;
|
@@ -315,6 +345,23 @@ declare class LocalRuntimeCore extends BaseAssistantRuntimeCore<LocalThreadRunti
|
|
315
345
|
}): void;
|
316
346
|
}
|
317
347
|
|
348
|
+
declare class AssistantRuntime<TThreadRuntime extends ThreadRuntime = ThreadRuntime> implements AssistantRuntimeCore {
|
349
|
+
private _core;
|
350
|
+
constructor(_core: AssistantRuntimeCore, CustomThreadRuntime: new (binding: ThreadRuntimeCoreBinding) => TThreadRuntime);
|
351
|
+
readonly thread: TThreadRuntime;
|
352
|
+
switchToNewThread(): void;
|
353
|
+
switchToThread(threadId: string): void;
|
354
|
+
/**
|
355
|
+
* @deprecated Use `switchToNewThread` instead. This will be removed in 0.6.0.
|
356
|
+
*/
|
357
|
+
switchToThread(threadId: string | null): void;
|
358
|
+
registerModelConfigProvider(provider: ModelConfigProvider): Unsubscribe;
|
359
|
+
/**
|
360
|
+
* @deprecated Thread is now static and never gets updated. This will be removed in 0.6.0.
|
361
|
+
*/
|
362
|
+
subscribe(callback: () => void): Unsubscribe;
|
363
|
+
}
|
364
|
+
|
318
365
|
declare class LocalRuntime extends AssistantRuntime {
|
319
366
|
private core;
|
320
367
|
constructor(core: LocalRuntimeCore);
|
@@ -381,35 +428,6 @@ declare class EdgeChatAdapter implements ChatModelAdapter {
|
|
381
428
|
type EdgeRuntimeOptions = EdgeChatAdapterOptions & LocalRuntimeOptions;
|
382
429
|
declare const useEdgeRuntime: ({ initialMessages, maxToolRoundtrips, adapters, ...options }: EdgeRuntimeOptions) => LocalRuntime;
|
383
430
|
|
384
|
-
declare class SimpleImageAttachmentAdapter implements AttachmentAdapter {
|
385
|
-
accept: string;
|
386
|
-
add(state: {
|
387
|
-
file: File;
|
388
|
-
}): Promise<ThreadComposerAttachment>;
|
389
|
-
send(attachment: ThreadComposerAttachment): Promise<MessageAttachment>;
|
390
|
-
remove(): Promise<void>;
|
391
|
-
}
|
392
|
-
|
393
|
-
declare class SimpleTextAttachmentAdapter implements AttachmentAdapter {
|
394
|
-
accept: string;
|
395
|
-
add(state: {
|
396
|
-
file: File;
|
397
|
-
}): Promise<ThreadComposerAttachment>;
|
398
|
-
send(attachment: ThreadComposerAttachment): Promise<MessageAttachment>;
|
399
|
-
remove(): Promise<void>;
|
400
|
-
}
|
401
|
-
|
402
|
-
declare class CompositeAttachmentAdapter implements AttachmentAdapter {
|
403
|
-
private _adapters;
|
404
|
-
accept: string;
|
405
|
-
constructor(adapters: AttachmentAdapter[]);
|
406
|
-
add(state: {
|
407
|
-
file: File;
|
408
|
-
}): Promise<ThreadComposerAttachment>;
|
409
|
-
send(attachment: ThreadComposerAttachment): Promise<MessageAttachment>;
|
410
|
-
remove(attachment: ThreadComposerAttachment): Promise<void>;
|
411
|
-
}
|
412
|
-
|
413
431
|
type ThreadMessageLike = {
|
414
432
|
role: "assistant" | "user" | "system";
|
415
433
|
content: string | (TextContentPart | ImageContentPart | ToolCallContentPart<any, any> | CoreToolCallContentPart<any, any> | UIContentPart)[];
|
@@ -479,65 +497,87 @@ type SubscribableWithState<TState> = Subscribable & {
|
|
479
497
|
getState: () => TState;
|
480
498
|
};
|
481
499
|
|
482
|
-
type
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
private threadApi;
|
491
|
-
constructor(contentBinding: ContentPartSnapshotBinding, messageApi: MessageSnapshotBinding, threadApi: ThreadRuntimeCoreBinding);
|
492
|
-
getState(): ContentPartSnapshot | undefined;
|
493
|
-
addToolResult(result: any): void;
|
494
|
-
}
|
495
|
-
|
496
|
-
type MessageState = ThreadMessage & {
|
500
|
+
type ThreadComposerRuntimeCoreBinding = SubscribableWithState<ComposerRuntimeCore | undefined>;
|
501
|
+
type LegacyEditComposerState = Readonly<{
|
502
|
+
type: "edit" | "thread";
|
503
|
+
/** @deprecated Use `text` instead. This will be removed in 0.6.0. */
|
504
|
+
value: string;
|
505
|
+
/** @deprecated Use `useComposerRuntime().setText()` instead. This will be removed in 0.6.0. */
|
506
|
+
setValue: (value: string) => void;
|
507
|
+
text: string;
|
497
508
|
/**
|
498
|
-
* @deprecated
|
509
|
+
* @deprecated Use `useComposerRuntime().setText()` instead. This will be removed in 0.6.0.
|
499
510
|
*/
|
500
|
-
|
501
|
-
|
502
|
-
|
511
|
+
setText: (value: string) => void;
|
512
|
+
canCancel: boolean;
|
513
|
+
isEditing: boolean;
|
514
|
+
isEmpty: boolean;
|
503
515
|
/**
|
504
|
-
* @deprecated Use
|
516
|
+
* @deprecated Use useComposerRuntime().beginEdit() instead. This will be removed in 0.6.0.
|
505
517
|
*/
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
518
|
+
edit: () => void;
|
519
|
+
/**
|
520
|
+
* @deprecated Use `useComposerRuntime().send()` instead. This will be removed in 0.6.0.
|
521
|
+
*/
|
522
|
+
send: () => void;
|
523
|
+
/**
|
524
|
+
* @deprecated Use `useComposerRuntime().cancel()` instead. This will be removed in 0.6.0.
|
525
|
+
*/
|
526
|
+
cancel: () => void;
|
527
|
+
}>;
|
528
|
+
type LegacyThreadComposerState = Readonly<{
|
529
|
+
type: "thread" | "edit";
|
530
|
+
/** @deprecated Use `text` instead. This will be removed in 0.6.0. */
|
531
|
+
value: string;
|
532
|
+
/** @deprecated Use `useComposerRuntime().setText` instead. This will be removed in 0.6.0. */
|
533
|
+
setValue: (value: string) => void;
|
534
|
+
attachmentAccept: string;
|
535
|
+
attachments: readonly ThreadComposerAttachment[];
|
536
|
+
/** @deprecated Use `useComposerRuntime().addAttachment` instead. This will be removed in 0.6.0. */
|
537
|
+
addAttachment: (file: File) => void;
|
538
|
+
/** @deprecated Use `useComposerRuntime().removeAttachment` instead. This will be removed in 0.6.0. */
|
539
|
+
removeAttachment: (attachmentId: string) => void;
|
540
|
+
text: string;
|
541
|
+
/** @deprecated Use `useComposerRuntime().setText` instead. This will be removed in 0.6.0. */
|
542
|
+
setText: (value: string) => void;
|
543
|
+
/** @deprecated Use `useComposerRuntime().reset` instead. This will be removed in 0.6.0. */
|
544
|
+
reset: () => void;
|
545
|
+
canCancel: boolean;
|
546
|
+
isEditing: boolean;
|
532
547
|
isEmpty: boolean;
|
548
|
+
/**
|
549
|
+
* @deprecated Use `useComposerRuntime().send` instead. This will be removed in 0.6.0.
|
550
|
+
**/
|
551
|
+
send: () => void;
|
552
|
+
/** @deprecated Use `useComposerRuntime().cancel` instead. This will be removed in 0.6.0. */
|
553
|
+
cancel: () => void;
|
554
|
+
/** @deprecated This feature is being removed in 0.6.0. Submit feedback if you need it. */
|
555
|
+
focus: () => void;
|
556
|
+
/** @deprecated This feature is being removed in 0.6.0. Submit feedback if you need it. */
|
557
|
+
onFocus: (listener: () => void) => Unsubscribe;
|
558
|
+
}>;
|
559
|
+
type ComposerState = LegacyThreadComposerState & LegacyEditComposerState & Readonly<{
|
560
|
+
type: "thread" | "edit";
|
533
561
|
text: string;
|
534
|
-
attachments: readonly ThreadComposerAttachment[];
|
535
562
|
attachmentAccept: string;
|
563
|
+
attachments: readonly ThreadComposerAttachment[];
|
536
564
|
canCancel: boolean;
|
565
|
+
isEditing: boolean;
|
566
|
+
isEmpty: boolean;
|
537
567
|
}>;
|
538
|
-
|
568
|
+
/** @deprecated Use `ComposerState` instead. */
|
569
|
+
type ThreadComposerState = ComposerState;
|
570
|
+
/** @deprecated Use `ComposerState` instead. */
|
571
|
+
type EditComposerState = ComposerState;
|
572
|
+
declare class ComposerRuntime implements ComposerRuntimeCore {
|
539
573
|
private _core;
|
540
|
-
|
574
|
+
private _beginEdit?;
|
575
|
+
get type(): "edit" | "thread";
|
576
|
+
constructor(_core: ThreadComposerRuntimeCoreBinding, _beginEdit?: (() => void) | undefined);
|
577
|
+
/**
|
578
|
+
* @deprecated Use `getState().isEditing` instead. This will be removed in 0.6.0.
|
579
|
+
*/
|
580
|
+
get isEditing(): boolean;
|
541
581
|
/**
|
542
582
|
* @deprecated Use `getState().isEmpty` instead. This will be removed in 0.6.0.
|
543
583
|
*/
|
@@ -557,15 +597,14 @@ declare class ThreadComposerRuntime implements ThreadComposerRuntimeCore {
|
|
557
597
|
/**
|
558
598
|
* @deprecated Use `getState().attachments` instead. This will be removed in 0.6.0.
|
559
599
|
*/
|
560
|
-
get attachments(): ThreadComposerAttachment[];
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
canCancel: boolean;
|
567
|
-
}>;
|
600
|
+
get attachments(): readonly ThreadComposerAttachment[];
|
601
|
+
/**
|
602
|
+
* @deprecated Use `getState().text` instead. This will be removed in 0.6.0.
|
603
|
+
*/
|
604
|
+
get value(): string;
|
605
|
+
getState(): ComposerState;
|
568
606
|
setText(text: string): void;
|
607
|
+
setValue(text: string): void;
|
569
608
|
addAttachment(file: File): Promise<void>;
|
570
609
|
removeAttachment(attachmentId: string): Promise<void>;
|
571
610
|
/**
|
@@ -574,7 +613,52 @@ declare class ThreadComposerRuntime implements ThreadComposerRuntimeCore {
|
|
574
613
|
reset(): void;
|
575
614
|
send(): void;
|
576
615
|
cancel(): void;
|
616
|
+
beginEdit(): void;
|
617
|
+
/**
|
618
|
+
* @deprecated Use `beginEdit()` instead. This will be removed in 0.6.0.
|
619
|
+
*/
|
620
|
+
edit(): void;
|
621
|
+
subscribe(callback: () => void): Unsubscribe;
|
622
|
+
private _focusListeners;
|
623
|
+
private focus;
|
624
|
+
private onFocus;
|
625
|
+
}
|
626
|
+
|
627
|
+
type MessageState = ThreadMessage & {
|
628
|
+
/**
|
629
|
+
* @deprecated You can directly access message fields in the state. Replace `.message.content` with `.content` etc. This will be removed in 0.6.0.
|
630
|
+
*/
|
631
|
+
message: ThreadMessage;
|
632
|
+
parentId: string | null;
|
633
|
+
isLast: boolean;
|
634
|
+
/**
|
635
|
+
* @deprecated Use `branchNumber` and `branchCount` instead. This will be removed in 0.6.0.
|
636
|
+
*/
|
637
|
+
branches: readonly string[];
|
638
|
+
branchNumber: number;
|
639
|
+
branchCount: number;
|
640
|
+
};
|
641
|
+
type MessageStateBinding = SubscribableWithState<MessageState>;
|
642
|
+
declare class MessageRuntime {
|
643
|
+
private _core;
|
644
|
+
private _threadBinding;
|
645
|
+
constructor(_core: MessageStateBinding, _threadBinding: ThreadRuntimeCoreBinding);
|
646
|
+
composer: ComposerRuntime & {
|
647
|
+
type: "edit";
|
648
|
+
};
|
649
|
+
getState(): MessageState;
|
650
|
+
unstable_edit(message: Omit<AppendMessage, "parentId">): void;
|
651
|
+
reload(): void;
|
652
|
+
speak(): SpeechSynthesisAdapter.Utterance;
|
653
|
+
submitFeedback({ type }: {
|
654
|
+
type: "positive" | "negative";
|
655
|
+
}): void;
|
656
|
+
switchToBranch({ position, branchId, }: {
|
657
|
+
position?: "previous" | "next" | undefined;
|
658
|
+
branchId?: string | undefined;
|
659
|
+
}): void;
|
577
660
|
subscribe(callback: () => void): Unsubscribe;
|
661
|
+
unstable_getContentPartByIndex(idx: number): ContentPartRuntime;
|
578
662
|
}
|
579
663
|
|
580
664
|
type CreateAppendMessage = string | {
|
@@ -589,9 +673,9 @@ type ThreadState = Readonly<{
|
|
589
673
|
isDisabled: boolean;
|
590
674
|
isRunning: boolean;
|
591
675
|
capabilities: RuntimeCapabilities;
|
676
|
+
messages: readonly ThreadMessage[];
|
592
677
|
}>;
|
593
678
|
declare class ThreadRuntime implements ThreadRuntimeCore {
|
594
|
-
private _threadBinding;
|
595
679
|
/**
|
596
680
|
* @deprecated Use `getState().threadId` instead. This will be removed in 0.6.0.
|
597
681
|
*/
|
@@ -617,6 +701,9 @@ declare class ThreadRuntime implements ThreadRuntimeCore {
|
|
617
701
|
attachments: boolean;
|
618
702
|
feedback: boolean;
|
619
703
|
}>;
|
704
|
+
/**
|
705
|
+
* @deprecated Use `getState().messages` instead. This will be removed in 0.6.0.
|
706
|
+
*/
|
620
707
|
get messages(): readonly ThreadMessage[];
|
621
708
|
unstable_getCore(): Readonly<{
|
622
709
|
getBranches: (messageId: string) => readonly string[];
|
@@ -628,7 +715,9 @@ declare class ThreadRuntime implements ThreadRuntimeCore {
|
|
628
715
|
speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
|
629
716
|
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
630
717
|
getModelConfig: () => ModelConfig;
|
631
|
-
composer:
|
718
|
+
composer: ComposerRuntimeCore;
|
719
|
+
getEditComposer: (messageId: string) => ComposerRuntimeCore | undefined;
|
720
|
+
beginEdit: (messageId: string) => void;
|
632
721
|
capabilities: Readonly<RuntimeCapabilities>;
|
633
722
|
threadId: string;
|
634
723
|
isDisabled: boolean;
|
@@ -637,13 +726,15 @@ declare class ThreadRuntime implements ThreadRuntimeCore {
|
|
637
726
|
import(repository: ExportedMessageRepository): void;
|
638
727
|
export(): ExportedMessageRepository;
|
639
728
|
}>;
|
640
|
-
|
641
|
-
|
729
|
+
private _threadBinding;
|
730
|
+
constructor(threadBinding: ThreadRuntimeCoreBinding);
|
731
|
+
readonly composer: ComposerRuntime;
|
642
732
|
getState(): Readonly<{
|
643
733
|
threadId: string;
|
644
734
|
isDisabled: boolean;
|
645
735
|
isRunning: boolean;
|
646
736
|
capabilities: RuntimeCapabilities;
|
737
|
+
messages: readonly ThreadMessage[];
|
647
738
|
}>;
|
648
739
|
append(message: CreateAppendMessage): void;
|
649
740
|
subscribe(callback: () => void): Unsubscribe;
|
@@ -655,28 +746,85 @@ declare class ThreadRuntime implements ThreadRuntimeCore {
|
|
655
746
|
switchToBranch(branchId: string): void;
|
656
747
|
speak(messageId: string): SpeechSynthesisAdapter.Utterance;
|
657
748
|
submitFeedback(options: SubmitFeedbackOptions): void;
|
749
|
+
/**
|
750
|
+
* @deprecated This is a temporary API. This will be removed in 0.6.0.
|
751
|
+
*/
|
752
|
+
getEditComposer(messageId: string): Readonly<{
|
753
|
+
attachmentAccept: string;
|
754
|
+
attachments: readonly ThreadComposerAttachment[];
|
755
|
+
addAttachment: (file: File) => Promise<void>;
|
756
|
+
removeAttachment: (attachmentId: string) => Promise<void>;
|
757
|
+
isEditing: boolean;
|
758
|
+
canCancel: boolean;
|
759
|
+
isEmpty: boolean;
|
760
|
+
text: string;
|
761
|
+
setText: (value: string) => void;
|
762
|
+
reset: () => void;
|
763
|
+
send: () => void;
|
764
|
+
cancel: () => void;
|
765
|
+
subscribe: (callback: () => void) => Unsubscribe;
|
766
|
+
}> | undefined;
|
767
|
+
/**
|
768
|
+
* @deprecated This is a temporary API. This will be removed in 0.6.0.
|
769
|
+
*/
|
770
|
+
beginEdit(messageId: string): void;
|
658
771
|
export(): ExportedMessageRepository;
|
659
772
|
import(data: ExportedMessageRepository): void;
|
660
773
|
unstable_getMesssageByIndex(idx: number): MessageRuntime;
|
661
774
|
}
|
662
775
|
|
663
|
-
|
664
|
-
private _core;
|
665
|
-
constructor(_core: AssistantRuntimeCore, CustomThreadRuntime: new (binding: ThreadRuntimeCoreBinding) => TThreadRuntime);
|
666
|
-
readonly thread: TThreadRuntime;
|
667
|
-
switchToNewThread(): void;
|
668
|
-
switchToThread(threadId: string): void;
|
776
|
+
type ContentPartState = (ThreadUserContentPart | ThreadAssistantContentPart) & {
|
669
777
|
/**
|
670
|
-
* @deprecated
|
671
|
-
*/
|
672
|
-
switchToThread(threadId: string | null): void;
|
673
|
-
registerModelConfigProvider(provider: ModelConfigProvider): Unsubscribe;
|
674
|
-
/**
|
675
|
-
* @deprecated Thread is now static and never gets updated. This will be removed in 0.6.0.
|
778
|
+
* @deprecated You can directly access content part fields in the state. Replace `.part.type` with `.type` etc. This will be removed in 0.6.0.
|
676
779
|
*/
|
780
|
+
part: ThreadUserContentPart | ThreadAssistantContentPart;
|
781
|
+
status: ContentPartStatus | ToolCallContentPartStatus;
|
782
|
+
};
|
783
|
+
type ContentPartSnapshotBinding = SubscribableWithState<ContentPartState>;
|
784
|
+
declare class ContentPartRuntime {
|
785
|
+
private contentBinding;
|
786
|
+
private messageApi;
|
787
|
+
private threadApi;
|
788
|
+
constructor(contentBinding: ContentPartSnapshotBinding, messageApi: MessageStateBinding, threadApi: ThreadRuntimeCoreBinding);
|
789
|
+
getState(): ContentPartState;
|
790
|
+
addToolResult(result: any): void;
|
677
791
|
subscribe(callback: () => void): Unsubscribe;
|
678
792
|
}
|
679
793
|
|
794
|
+
type EmptyContentPartProps = {
|
795
|
+
status: ContentPartStatus;
|
796
|
+
};
|
797
|
+
type EmptyContentPartComponent = ComponentType<EmptyContentPartProps>;
|
798
|
+
type TextContentPartProps = ContentPartState & TextContentPart & {
|
799
|
+
/**
|
800
|
+
* @deprecated You can directly access content part fields in the state. Replace `.part.type` with `.type` etc. This will be removed in 0.6.0.
|
801
|
+
*/
|
802
|
+
part: TextContentPart;
|
803
|
+
};
|
804
|
+
type TextContentPartComponent = ComponentType<TextContentPartProps>;
|
805
|
+
type ImageContentPartProps = ContentPartState & ImageContentPart & {
|
806
|
+
/**
|
807
|
+
* @deprecated You can directly access content part fields in the state. Replace `.part.type` with `.type` etc. This will be removed in 0.6.0.
|
808
|
+
*/
|
809
|
+
part: ImageContentPart;
|
810
|
+
};
|
811
|
+
type ImageContentPartComponent = ComponentType<ImageContentPartProps>;
|
812
|
+
type UIContentPartProps = ContentPartState & UIContentPart & {
|
813
|
+
/**
|
814
|
+
* @deprecated You can directly access content part fields in the state. Replace `.part.type` with `.type` etc. This will be removed in 0.6.0.
|
815
|
+
*/
|
816
|
+
part: UIContentPart;
|
817
|
+
};
|
818
|
+
type UIContentPartComponent = ComponentType<UIContentPartProps>;
|
819
|
+
type ToolCallContentPartProps<TArgs extends Record<string, unknown> = any, TResult = unknown> = ContentPartState & ToolCallContentPart<TArgs, TResult> & {
|
820
|
+
/**
|
821
|
+
* @deprecated You can directly access content part fields in the state. Replace `.part.type` with `.type` etc. This will be removed in 0.6.0.
|
822
|
+
*/
|
823
|
+
part: ToolCallContentPart<TArgs, TResult>;
|
824
|
+
addResult: (result: any) => void;
|
825
|
+
};
|
826
|
+
type ToolCallContentPartComponent<TArgs extends Record<string, unknown> = any, TResult = any> = ComponentType<ToolCallContentPartProps<TArgs, TResult>>;
|
827
|
+
|
680
828
|
type AssistantRuntimeProviderProps = {
|
681
829
|
runtime: AssistantRuntime;
|
682
830
|
};
|
@@ -686,66 +834,11 @@ type TextContentPartProviderProps = {
|
|
686
834
|
text: string;
|
687
835
|
isRunning?: boolean | undefined;
|
688
836
|
};
|
689
|
-
declare const TextContentPartProvider: FC<PropsWithChildren<TextContentPartProviderProps>>;
|
690
|
-
|
691
|
-
type AssistantToolUIsState = Readonly<{
|
692
|
-
getToolUI: (toolName: string) => ToolCallContentPartComponent | null;
|
693
|
-
setToolUI: (toolName: string, render: ToolCallContentPartComponent) => () => void;
|
694
|
-
}>;
|
695
|
-
|
696
|
-
type ThreadComposerState = Readonly<{
|
697
|
-
type: "thread";
|
698
|
-
/** @deprecated Use `text` instead. This will be removed in 0.6.0. */
|
699
|
-
value: string;
|
700
|
-
/** @deprecated Use `useComposerRuntime().setText` instead. This will be removed in 0.6.0. */
|
701
|
-
setValue: (value: string) => void;
|
702
|
-
attachmentAccept: string;
|
703
|
-
attachments: readonly ThreadComposerAttachment[];
|
704
|
-
/** @deprecated Use `useComposerRuntime().addAttachment` instead. This will be removed in 0.6.0. */
|
705
|
-
addAttachment: (file: File) => void;
|
706
|
-
/** @deprecated Use `useComposerRuntime().removeAttachment` instead. This will be removed in 0.6.0. */
|
707
|
-
removeAttachment: (attachmentId: string) => void;
|
708
|
-
text: string;
|
709
|
-
/** @deprecated Use `useComposerRuntime().setText` instead. This will be removed in 0.6.0. */
|
710
|
-
setText: (value: string) => void;
|
711
|
-
/** @deprecated Use `useComposerRuntime().reset` instead. This will be removed in 0.6.0. */
|
712
|
-
reset: () => void;
|
713
|
-
canCancel: boolean;
|
714
|
-
isEditing: true;
|
715
|
-
isEmpty: boolean;
|
716
|
-
/** @deprecated Use `useComposerRuntime().send` instead. This will be removed in 0.6.0. */
|
717
|
-
send: () => void;
|
718
|
-
/** @deprecated Use `useComposerRuntime().cancel` instead. This will be removed in 0.6.0. */
|
719
|
-
cancel: () => void;
|
720
|
-
focus: () => void;
|
721
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
722
|
-
}>;
|
723
|
-
|
724
|
-
type TextContentPartState = Readonly<{
|
725
|
-
status: ContentPartStatus;
|
726
|
-
part: TextContentPart;
|
727
|
-
}>;
|
728
|
-
type ContentPartState = Readonly<{
|
729
|
-
status: ContentPartStatus | ToolCallContentPartStatus;
|
730
|
-
part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
|
731
|
-
}>;
|
732
|
-
|
733
|
-
type ReadonlyStore<T> = Omit<StoreApi<T>, "setState" | "destroy">;
|
734
|
-
|
735
|
-
type EditComposerState = Readonly<{
|
736
|
-
type: "edit";
|
737
|
-
/** @deprecated Use `text` instead. This will be removed in 0.6.0. */
|
738
|
-
value: string;
|
739
|
-
/** @deprecated Use `setText` instead. This will be removed in 0.6.0. */
|
740
|
-
setValue: (value: string) => void;
|
741
|
-
text: string;
|
742
|
-
setText: (value: string) => void;
|
743
|
-
canCancel: boolean;
|
744
|
-
isEditing: boolean;
|
745
|
-
isEmpty: boolean;
|
746
|
-
edit: () => void;
|
747
|
-
send: () => void;
|
748
|
-
cancel: () => void;
|
837
|
+
declare const TextContentPartProvider: FC<PropsWithChildren<TextContentPartProviderProps>>;
|
838
|
+
|
839
|
+
type AssistantToolUIsState = Readonly<{
|
840
|
+
getToolUI: (toolName: string) => ToolCallContentPartComponent | null;
|
841
|
+
setToolUI: (toolName: string, render: ToolCallContentPartComponent) => () => void;
|
749
842
|
}>;
|
750
843
|
|
751
844
|
type MessageUtilsState = Readonly<{
|
@@ -766,6 +859,8 @@ type ThreadViewportState = Readonly<{
|
|
766
859
|
onScrollToBottom: (callback: () => void) => Unsubscribe;
|
767
860
|
}>;
|
768
861
|
|
862
|
+
type ReadonlyStore<T> = Omit<StoreApi<T>, "setState" | "destroy">;
|
863
|
+
|
769
864
|
type AssistantContextValue = {
|
770
865
|
useToolUIs: UseBoundStore<ReadonlyStore<AssistantToolUIsState>>;
|
771
866
|
useAssistantRuntime: UseBoundStore<ReadonlyStore<AssistantRuntime>>;
|
@@ -928,6 +1023,7 @@ declare const useThread: {
|
|
928
1023
|
attachments: boolean;
|
929
1024
|
feedback: boolean;
|
930
1025
|
}>;
|
1026
|
+
messages: readonly ThreadMessage[];
|
931
1027
|
}>;
|
932
1028
|
<TSelected>(selector: (state: Readonly<{
|
933
1029
|
threadId: string;
|
@@ -943,6 +1039,7 @@ declare const useThread: {
|
|
943
1039
|
attachments: boolean;
|
944
1040
|
feedback: boolean;
|
945
1041
|
}>;
|
1042
|
+
messages: readonly ThreadMessage[];
|
946
1043
|
}>) => TSelected): TSelected;
|
947
1044
|
(options: {
|
948
1045
|
optional: true;
|
@@ -960,6 +1057,7 @@ declare const useThread: {
|
|
960
1057
|
attachments: boolean;
|
961
1058
|
feedback: boolean;
|
962
1059
|
}>;
|
1060
|
+
messages: readonly ThreadMessage[];
|
963
1061
|
}> | null;
|
964
1062
|
<TSelected>(options: {
|
965
1063
|
optional: true;
|
@@ -977,6 +1075,7 @@ declare const useThread: {
|
|
977
1075
|
attachments: boolean;
|
978
1076
|
feedback: boolean;
|
979
1077
|
}>;
|
1078
|
+
messages: readonly ThreadMessage[];
|
980
1079
|
}>) => TSelected;
|
981
1080
|
}): TSelected | null;
|
982
1081
|
};
|
@@ -995,6 +1094,7 @@ declare const useThreadStore: {
|
|
995
1094
|
attachments: boolean;
|
996
1095
|
feedback: boolean;
|
997
1096
|
}>;
|
1097
|
+
messages: readonly ThreadMessage[];
|
998
1098
|
}>>;
|
999
1099
|
(options: {
|
1000
1100
|
optional: true;
|
@@ -1012,8 +1112,12 @@ declare const useThreadStore: {
|
|
1012
1112
|
attachments: boolean;
|
1013
1113
|
feedback: boolean;
|
1014
1114
|
}>;
|
1115
|
+
messages: readonly ThreadMessage[];
|
1015
1116
|
}>> | null;
|
1016
1117
|
};
|
1118
|
+
/**
|
1119
|
+
* @deprecated Use `useThread().messages` instead. This will be removed in 0.6.0.
|
1120
|
+
*/
|
1017
1121
|
declare const useThreadMessages: {
|
1018
1122
|
(): readonly ThreadMessage[];
|
1019
1123
|
<TSelected>(selector: (state: readonly ThreadMessage[]) => TSelected): TSelected;
|
@@ -1025,6 +1129,9 @@ declare const useThreadMessages: {
|
|
1025
1129
|
selector?: (state: readonly ThreadMessage[]) => TSelected;
|
1026
1130
|
}): TSelected | null;
|
1027
1131
|
};
|
1132
|
+
/**
|
1133
|
+
* @deprecated Use `useThreadRuntime().getState().messages` instead. This will be removed in 0.6.0.
|
1134
|
+
*/
|
1028
1135
|
declare const useThreadMessagesStore: {
|
1029
1136
|
(): ReadonlyStore<readonly ThreadMessage[]>;
|
1030
1137
|
(options: {
|
@@ -1032,129 +1139,21 @@ declare const useThreadMessagesStore: {
|
|
1032
1139
|
}): ReadonlyStore<readonly ThreadMessage[]> | null;
|
1033
1140
|
};
|
1034
1141
|
declare const useThreadComposer: {
|
1035
|
-
():
|
1036
|
-
|
1037
|
-
value: string;
|
1038
|
-
setValue: (value: string) => void;
|
1039
|
-
attachmentAccept: string;
|
1040
|
-
attachments: readonly ThreadComposerAttachment[];
|
1041
|
-
addAttachment: (file: File) => void;
|
1042
|
-
removeAttachment: (attachmentId: string) => void;
|
1043
|
-
text: string;
|
1044
|
-
setText: (value: string) => void;
|
1045
|
-
reset: () => void;
|
1046
|
-
canCancel: boolean;
|
1047
|
-
isEditing: true;
|
1048
|
-
isEmpty: boolean;
|
1049
|
-
send: () => void;
|
1050
|
-
cancel: () => void;
|
1051
|
-
focus: () => void;
|
1052
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1053
|
-
}>;
|
1054
|
-
<TSelected>(selector: (state: Readonly<{
|
1055
|
-
type: "thread";
|
1056
|
-
value: string;
|
1057
|
-
setValue: (value: string) => void;
|
1058
|
-
attachmentAccept: string;
|
1059
|
-
attachments: readonly ThreadComposerAttachment[];
|
1060
|
-
addAttachment: (file: File) => void;
|
1061
|
-
removeAttachment: (attachmentId: string) => void;
|
1062
|
-
text: string;
|
1063
|
-
setText: (value: string) => void;
|
1064
|
-
reset: () => void;
|
1065
|
-
canCancel: boolean;
|
1066
|
-
isEditing: true;
|
1067
|
-
isEmpty: boolean;
|
1068
|
-
send: () => void;
|
1069
|
-
cancel: () => void;
|
1070
|
-
focus: () => void;
|
1071
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1072
|
-
}>) => TSelected): TSelected;
|
1142
|
+
(): ComposerState;
|
1143
|
+
<TSelected>(selector: (state: ComposerState) => TSelected): TSelected;
|
1073
1144
|
(options: {
|
1074
1145
|
optional: true;
|
1075
|
-
}):
|
1076
|
-
type: "thread";
|
1077
|
-
value: string;
|
1078
|
-
setValue: (value: string) => void;
|
1079
|
-
attachmentAccept: string;
|
1080
|
-
attachments: readonly ThreadComposerAttachment[];
|
1081
|
-
addAttachment: (file: File) => void;
|
1082
|
-
removeAttachment: (attachmentId: string) => void;
|
1083
|
-
text: string;
|
1084
|
-
setText: (value: string) => void;
|
1085
|
-
reset: () => void;
|
1086
|
-
canCancel: boolean;
|
1087
|
-
isEditing: true;
|
1088
|
-
isEmpty: boolean;
|
1089
|
-
send: () => void;
|
1090
|
-
cancel: () => void;
|
1091
|
-
focus: () => void;
|
1092
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1093
|
-
}> | null;
|
1146
|
+
}): ComposerState | null;
|
1094
1147
|
<TSelected>(options: {
|
1095
1148
|
optional: true;
|
1096
|
-
selector?: (state:
|
1097
|
-
type: "thread";
|
1098
|
-
value: string;
|
1099
|
-
setValue: (value: string) => void;
|
1100
|
-
attachmentAccept: string;
|
1101
|
-
attachments: readonly ThreadComposerAttachment[];
|
1102
|
-
addAttachment: (file: File) => void;
|
1103
|
-
removeAttachment: (attachmentId: string) => void;
|
1104
|
-
text: string;
|
1105
|
-
setText: (value: string) => void;
|
1106
|
-
reset: () => void;
|
1107
|
-
canCancel: boolean;
|
1108
|
-
isEditing: true;
|
1109
|
-
isEmpty: boolean;
|
1110
|
-
send: () => void;
|
1111
|
-
cancel: () => void;
|
1112
|
-
focus: () => void;
|
1113
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1114
|
-
}>) => TSelected;
|
1149
|
+
selector?: (state: ComposerState) => TSelected;
|
1115
1150
|
}): TSelected | null;
|
1116
1151
|
};
|
1117
1152
|
declare const useThreadComposerStore: {
|
1118
|
-
(): ReadonlyStore<
|
1119
|
-
type: "thread";
|
1120
|
-
value: string;
|
1121
|
-
setValue: (value: string) => void;
|
1122
|
-
attachmentAccept: string;
|
1123
|
-
attachments: readonly ThreadComposerAttachment[];
|
1124
|
-
addAttachment: (file: File) => void;
|
1125
|
-
removeAttachment: (attachmentId: string) => void;
|
1126
|
-
text: string;
|
1127
|
-
setText: (value: string) => void;
|
1128
|
-
reset: () => void;
|
1129
|
-
canCancel: boolean;
|
1130
|
-
isEditing: true;
|
1131
|
-
isEmpty: boolean;
|
1132
|
-
send: () => void;
|
1133
|
-
cancel: () => void;
|
1134
|
-
focus: () => void;
|
1135
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1136
|
-
}>>;
|
1153
|
+
(): ReadonlyStore<ComposerState>;
|
1137
1154
|
(options: {
|
1138
1155
|
optional: true;
|
1139
|
-
}): ReadonlyStore<
|
1140
|
-
type: "thread";
|
1141
|
-
value: string;
|
1142
|
-
setValue: (value: string) => void;
|
1143
|
-
attachmentAccept: string;
|
1144
|
-
attachments: readonly ThreadComposerAttachment[];
|
1145
|
-
addAttachment: (file: File) => void;
|
1146
|
-
removeAttachment: (attachmentId: string) => void;
|
1147
|
-
text: string;
|
1148
|
-
setText: (value: string) => void;
|
1149
|
-
reset: () => void;
|
1150
|
-
canCancel: boolean;
|
1151
|
-
isEditing: true;
|
1152
|
-
isEmpty: boolean;
|
1153
|
-
send: () => void;
|
1154
|
-
cancel: () => void;
|
1155
|
-
focus: () => void;
|
1156
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1157
|
-
}>> | null;
|
1156
|
+
}): ReadonlyStore<ComposerState> | null;
|
1158
1157
|
};
|
1159
1158
|
declare const useThreadViewport: {
|
1160
1159
|
(): Readonly<{
|
@@ -1313,96 +1312,25 @@ declare const useMessageUtilsStore: {
|
|
1313
1312
|
}>> | null;
|
1314
1313
|
};
|
1315
1314
|
declare const useEditComposer: {
|
1316
|
-
():
|
1317
|
-
|
1318
|
-
value: string;
|
1319
|
-
setValue: (value: string) => void;
|
1320
|
-
text: string;
|
1321
|
-
setText: (value: string) => void;
|
1322
|
-
canCancel: boolean;
|
1323
|
-
isEditing: boolean;
|
1324
|
-
isEmpty: boolean;
|
1325
|
-
edit: () => void;
|
1326
|
-
send: () => void;
|
1327
|
-
cancel: () => void;
|
1328
|
-
}>;
|
1329
|
-
<TSelected>(selector: (state: Readonly<{
|
1330
|
-
type: "edit";
|
1331
|
-
value: string;
|
1332
|
-
setValue: (value: string) => void;
|
1333
|
-
text: string;
|
1334
|
-
setText: (value: string) => void;
|
1335
|
-
canCancel: boolean;
|
1336
|
-
isEditing: boolean;
|
1337
|
-
isEmpty: boolean;
|
1338
|
-
edit: () => void;
|
1339
|
-
send: () => void;
|
1340
|
-
cancel: () => void;
|
1341
|
-
}>) => TSelected): TSelected;
|
1315
|
+
(): ComposerState;
|
1316
|
+
<TSelected>(selector: (state: ComposerState) => TSelected): TSelected;
|
1342
1317
|
(options: {
|
1343
1318
|
optional: true;
|
1344
|
-
}):
|
1345
|
-
type: "edit";
|
1346
|
-
value: string;
|
1347
|
-
setValue: (value: string) => void;
|
1348
|
-
text: string;
|
1349
|
-
setText: (value: string) => void;
|
1350
|
-
canCancel: boolean;
|
1351
|
-
isEditing: boolean;
|
1352
|
-
isEmpty: boolean;
|
1353
|
-
edit: () => void;
|
1354
|
-
send: () => void;
|
1355
|
-
cancel: () => void;
|
1356
|
-
}> | null;
|
1319
|
+
}): ComposerState | null;
|
1357
1320
|
<TSelected>(options: {
|
1358
1321
|
optional: true;
|
1359
|
-
selector?: (state:
|
1360
|
-
type: "edit";
|
1361
|
-
value: string;
|
1362
|
-
setValue: (value: string) => void;
|
1363
|
-
text: string;
|
1364
|
-
setText: (value: string) => void;
|
1365
|
-
canCancel: boolean;
|
1366
|
-
isEditing: boolean;
|
1367
|
-
isEmpty: boolean;
|
1368
|
-
edit: () => void;
|
1369
|
-
send: () => void;
|
1370
|
-
cancel: () => void;
|
1371
|
-
}>) => TSelected;
|
1322
|
+
selector?: (state: ComposerState) => TSelected;
|
1372
1323
|
}): TSelected | null;
|
1373
1324
|
};
|
1374
1325
|
declare const useEditComposerStore: {
|
1375
|
-
(): ReadonlyStore<
|
1376
|
-
type: "edit";
|
1377
|
-
value: string;
|
1378
|
-
setValue: (value: string) => void;
|
1379
|
-
text: string;
|
1380
|
-
setText: (value: string) => void;
|
1381
|
-
canCancel: boolean;
|
1382
|
-
isEditing: boolean;
|
1383
|
-
isEmpty: boolean;
|
1384
|
-
edit: () => void;
|
1385
|
-
send: () => void;
|
1386
|
-
cancel: () => void;
|
1387
|
-
}>>;
|
1326
|
+
(): ReadonlyStore<ComposerState>;
|
1388
1327
|
(options: {
|
1389
1328
|
optional: true;
|
1390
|
-
}): ReadonlyStore<
|
1391
|
-
type: "edit";
|
1392
|
-
value: string;
|
1393
|
-
setValue: (value: string) => void;
|
1394
|
-
text: string;
|
1395
|
-
setText: (value: string) => void;
|
1396
|
-
canCancel: boolean;
|
1397
|
-
isEditing: boolean;
|
1398
|
-
isEmpty: boolean;
|
1399
|
-
edit: () => void;
|
1400
|
-
send: () => void;
|
1401
|
-
cancel: () => void;
|
1402
|
-
}>> | null;
|
1329
|
+
}): ReadonlyStore<ComposerState> | null;
|
1403
1330
|
};
|
1404
1331
|
|
1405
1332
|
type ContentPartContextValue = {
|
1333
|
+
useContentPartRuntime: UseBoundStore<ReadonlyStore<ContentPartRuntime>>;
|
1406
1334
|
useContentPart: UseBoundStore<ReadonlyStore<ContentPartState>>;
|
1407
1335
|
};
|
1408
1336
|
declare const useContentPartContext: {
|
@@ -1413,244 +1341,58 @@ declare const useContentPartContext: {
|
|
1413
1341
|
optional?: boolean | undefined;
|
1414
1342
|
} | undefined): ContentPartContextValue | null;
|
1415
1343
|
};
|
1344
|
+
declare function useContentPartRuntime(options?: {
|
1345
|
+
optional?: false | undefined;
|
1346
|
+
}): ContentPartRuntime;
|
1347
|
+
declare function useContentPartRuntime(options?: {
|
1348
|
+
optional?: boolean | undefined;
|
1349
|
+
}): ContentPartRuntime | null;
|
1416
1350
|
declare const useContentPart: {
|
1417
|
-
():
|
1418
|
-
|
1419
|
-
part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
|
1420
|
-
}>;
|
1421
|
-
<TSelected>(selector: (state: Readonly<{
|
1422
|
-
status: ContentPartStatus | ToolCallContentPartStatus;
|
1423
|
-
part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
|
1424
|
-
}>) => TSelected): TSelected;
|
1351
|
+
(): ContentPartState;
|
1352
|
+
<TSelected>(selector: (state: ContentPartState) => TSelected): TSelected;
|
1425
1353
|
(options: {
|
1426
1354
|
optional: true;
|
1427
|
-
}):
|
1428
|
-
status: ContentPartStatus | ToolCallContentPartStatus;
|
1429
|
-
part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
|
1430
|
-
}> | null;
|
1355
|
+
}): ContentPartState | null;
|
1431
1356
|
<TSelected>(options: {
|
1432
1357
|
optional: true;
|
1433
|
-
selector?: (state:
|
1434
|
-
status: ContentPartStatus | ToolCallContentPartStatus;
|
1435
|
-
part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
|
1436
|
-
}>) => TSelected;
|
1358
|
+
selector?: (state: ContentPartState) => TSelected;
|
1437
1359
|
}): TSelected | null;
|
1438
1360
|
};
|
1439
1361
|
declare const useContentPartStore: {
|
1440
|
-
(): ReadonlyStore<
|
1441
|
-
status: ContentPartStatus | ToolCallContentPartStatus;
|
1442
|
-
part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
|
1443
|
-
}>>;
|
1362
|
+
(): ReadonlyStore<ContentPartState>;
|
1444
1363
|
(options: {
|
1445
1364
|
optional: true;
|
1446
|
-
}): ReadonlyStore<
|
1447
|
-
status: ContentPartStatus | ToolCallContentPartStatus;
|
1448
|
-
part: TextContentPart | ImageContentPart | UIContentPart | ToolCallContentPart;
|
1449
|
-
}>> | null;
|
1365
|
+
}): ReadonlyStore<ContentPartState> | null;
|
1450
1366
|
};
|
1451
1367
|
|
1452
1368
|
type ComposerContextValue = {
|
1453
|
-
useComposer: ReadonlyStore<
|
1369
|
+
useComposer: ReadonlyStore<ComposerState>;
|
1454
1370
|
type: "edit" | "new";
|
1455
1371
|
};
|
1456
1372
|
declare const useComposerContext: () => ComposerContextValue;
|
1457
1373
|
declare const useComposer: {
|
1458
|
-
():
|
1459
|
-
|
1460
|
-
value: string;
|
1461
|
-
setValue: (value: string) => void;
|
1462
|
-
text: string;
|
1463
|
-
setText: (value: string) => void;
|
1464
|
-
canCancel: boolean;
|
1465
|
-
isEditing: boolean;
|
1466
|
-
isEmpty: boolean;
|
1467
|
-
edit: () => void;
|
1468
|
-
send: () => void;
|
1469
|
-
cancel: () => void;
|
1470
|
-
}> | Readonly<{
|
1471
|
-
type: "thread";
|
1472
|
-
value: string;
|
1473
|
-
setValue: (value: string) => void;
|
1474
|
-
attachmentAccept: string;
|
1475
|
-
attachments: readonly ThreadComposerAttachment[];
|
1476
|
-
addAttachment: (file: File) => void;
|
1477
|
-
removeAttachment: (attachmentId: string) => void;
|
1478
|
-
text: string;
|
1479
|
-
setText: (value: string) => void;
|
1480
|
-
reset: () => void;
|
1481
|
-
canCancel: boolean;
|
1482
|
-
isEditing: true;
|
1483
|
-
isEmpty: boolean;
|
1484
|
-
send: () => void;
|
1485
|
-
cancel: () => void;
|
1486
|
-
focus: () => void;
|
1487
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1488
|
-
}>;
|
1489
|
-
<TSelected>(selector: (state: Readonly<{
|
1490
|
-
type: "edit";
|
1491
|
-
value: string;
|
1492
|
-
setValue: (value: string) => void;
|
1493
|
-
text: string;
|
1494
|
-
setText: (value: string) => void;
|
1495
|
-
canCancel: boolean;
|
1496
|
-
isEditing: boolean;
|
1497
|
-
isEmpty: boolean;
|
1498
|
-
edit: () => void;
|
1499
|
-
send: () => void;
|
1500
|
-
cancel: () => void;
|
1501
|
-
}> | Readonly<{
|
1502
|
-
type: "thread";
|
1503
|
-
value: string;
|
1504
|
-
setValue: (value: string) => void;
|
1505
|
-
attachmentAccept: string;
|
1506
|
-
attachments: readonly ThreadComposerAttachment[];
|
1507
|
-
addAttachment: (file: File) => void;
|
1508
|
-
removeAttachment: (attachmentId: string) => void;
|
1509
|
-
text: string;
|
1510
|
-
setText: (value: string) => void;
|
1511
|
-
reset: () => void;
|
1512
|
-
canCancel: boolean;
|
1513
|
-
isEditing: true;
|
1514
|
-
isEmpty: boolean;
|
1515
|
-
send: () => void;
|
1516
|
-
cancel: () => void;
|
1517
|
-
focus: () => void;
|
1518
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1519
|
-
}>) => TSelected): TSelected;
|
1374
|
+
(): ComposerState;
|
1375
|
+
<TSelected>(selector: (state: ComposerState) => TSelected): TSelected;
|
1520
1376
|
(options: {
|
1521
1377
|
optional: true;
|
1522
|
-
}):
|
1523
|
-
type: "edit";
|
1524
|
-
value: string;
|
1525
|
-
setValue: (value: string) => void;
|
1526
|
-
text: string;
|
1527
|
-
setText: (value: string) => void;
|
1528
|
-
canCancel: boolean;
|
1529
|
-
isEditing: boolean;
|
1530
|
-
isEmpty: boolean;
|
1531
|
-
edit: () => void;
|
1532
|
-
send: () => void;
|
1533
|
-
cancel: () => void;
|
1534
|
-
}> | Readonly<{
|
1535
|
-
type: "thread";
|
1536
|
-
value: string;
|
1537
|
-
setValue: (value: string) => void;
|
1538
|
-
attachmentAccept: string;
|
1539
|
-
attachments: readonly ThreadComposerAttachment[];
|
1540
|
-
addAttachment: (file: File) => void;
|
1541
|
-
removeAttachment: (attachmentId: string) => void;
|
1542
|
-
text: string;
|
1543
|
-
setText: (value: string) => void;
|
1544
|
-
reset: () => void;
|
1545
|
-
canCancel: boolean;
|
1546
|
-
isEditing: true;
|
1547
|
-
isEmpty: boolean;
|
1548
|
-
send: () => void;
|
1549
|
-
cancel: () => void;
|
1550
|
-
focus: () => void;
|
1551
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1552
|
-
}> | null;
|
1378
|
+
}): ComposerState | null;
|
1553
1379
|
<TSelected>(options: {
|
1554
1380
|
optional: true;
|
1555
|
-
selector?: (state:
|
1556
|
-
type: "edit";
|
1557
|
-
value: string;
|
1558
|
-
setValue: (value: string) => void;
|
1559
|
-
text: string;
|
1560
|
-
setText: (value: string) => void;
|
1561
|
-
canCancel: boolean;
|
1562
|
-
isEditing: boolean;
|
1563
|
-
isEmpty: boolean;
|
1564
|
-
edit: () => void;
|
1565
|
-
send: () => void;
|
1566
|
-
cancel: () => void;
|
1567
|
-
}> | Readonly<{
|
1568
|
-
type: "thread";
|
1569
|
-
value: string;
|
1570
|
-
setValue: (value: string) => void;
|
1571
|
-
attachmentAccept: string;
|
1572
|
-
attachments: readonly ThreadComposerAttachment[];
|
1573
|
-
addAttachment: (file: File) => void;
|
1574
|
-
removeAttachment: (attachmentId: string) => void;
|
1575
|
-
text: string;
|
1576
|
-
setText: (value: string) => void;
|
1577
|
-
reset: () => void;
|
1578
|
-
canCancel: boolean;
|
1579
|
-
isEditing: true;
|
1580
|
-
isEmpty: boolean;
|
1581
|
-
send: () => void;
|
1582
|
-
cancel: () => void;
|
1583
|
-
focus: () => void;
|
1584
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1585
|
-
}>) => TSelected;
|
1381
|
+
selector?: (state: ComposerState) => TSelected;
|
1586
1382
|
}): TSelected | null;
|
1587
1383
|
};
|
1588
1384
|
declare const useComposerStore: {
|
1589
|
-
(): ReadonlyStore<
|
1590
|
-
type: "edit";
|
1591
|
-
value: string;
|
1592
|
-
setValue: (value: string) => void;
|
1593
|
-
text: string;
|
1594
|
-
setText: (value: string) => void;
|
1595
|
-
canCancel: boolean;
|
1596
|
-
isEditing: boolean;
|
1597
|
-
isEmpty: boolean;
|
1598
|
-
edit: () => void;
|
1599
|
-
send: () => void;
|
1600
|
-
cancel: () => void;
|
1601
|
-
}> | Readonly<{
|
1602
|
-
type: "thread";
|
1603
|
-
value: string;
|
1604
|
-
setValue: (value: string) => void;
|
1605
|
-
attachmentAccept: string;
|
1606
|
-
attachments: readonly ThreadComposerAttachment[];
|
1607
|
-
addAttachment: (file: File) => void;
|
1608
|
-
removeAttachment: (attachmentId: string) => void;
|
1609
|
-
text: string;
|
1610
|
-
setText: (value: string) => void;
|
1611
|
-
reset: () => void;
|
1612
|
-
canCancel: boolean;
|
1613
|
-
isEditing: true;
|
1614
|
-
isEmpty: boolean;
|
1615
|
-
send: () => void;
|
1616
|
-
cancel: () => void;
|
1617
|
-
focus: () => void;
|
1618
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1619
|
-
}>>;
|
1385
|
+
(): ReadonlyStore<ComposerState>;
|
1620
1386
|
(options: {
|
1621
1387
|
optional: true;
|
1622
|
-
}): ReadonlyStore<
|
1623
|
-
type: "edit";
|
1624
|
-
value: string;
|
1625
|
-
setValue: (value: string) => void;
|
1626
|
-
text: string;
|
1627
|
-
setText: (value: string) => void;
|
1628
|
-
canCancel: boolean;
|
1629
|
-
isEditing: boolean;
|
1630
|
-
isEmpty: boolean;
|
1631
|
-
edit: () => void;
|
1632
|
-
send: () => void;
|
1633
|
-
cancel: () => void;
|
1634
|
-
}> | Readonly<{
|
1635
|
-
type: "thread";
|
1636
|
-
value: string;
|
1637
|
-
setValue: (value: string) => void;
|
1638
|
-
attachmentAccept: string;
|
1639
|
-
attachments: readonly ThreadComposerAttachment[];
|
1640
|
-
addAttachment: (file: File) => void;
|
1641
|
-
removeAttachment: (attachmentId: string) => void;
|
1642
|
-
text: string;
|
1643
|
-
setText: (value: string) => void;
|
1644
|
-
reset: () => void;
|
1645
|
-
canCancel: boolean;
|
1646
|
-
isEditing: true;
|
1647
|
-
isEmpty: boolean;
|
1648
|
-
send: () => void;
|
1649
|
-
cancel: () => void;
|
1650
|
-
focus: () => void;
|
1651
|
-
onFocus: (listener: () => void) => Unsubscribe;
|
1652
|
-
}>> | null;
|
1388
|
+
}): ReadonlyStore<ComposerState> | null;
|
1653
1389
|
};
|
1390
|
+
declare function useComposerRuntime(options?: {
|
1391
|
+
optional?: false | undefined;
|
1392
|
+
}): ComposerRuntime;
|
1393
|
+
declare function useComposerRuntime(options?: {
|
1394
|
+
optional?: boolean | undefined;
|
1395
|
+
}): ComposerRuntime | null;
|
1654
1396
|
|
1655
1397
|
declare const useAppendMessage: () => (message: CreateAppendMessage) => void;
|
1656
1398
|
|
@@ -1724,20 +1466,20 @@ declare const useComposerSend: () => (() => void) | null;
|
|
1724
1466
|
|
1725
1467
|
declare const useComposerAddAttachment: () => (() => void) | null;
|
1726
1468
|
|
1727
|
-
declare const useContentPartDisplay: () =>
|
1728
|
-
|
1729
|
-
|
1730
|
-
}
|
1469
|
+
declare const useContentPartDisplay: () => UIContentPart & {
|
1470
|
+
part: ThreadUserContentPart | ThreadAssistantContentPart;
|
1471
|
+
status: ContentPartStatus | ToolCallContentPartStatus;
|
1472
|
+
};
|
1731
1473
|
|
1732
|
-
declare const useContentPartImage: () =>
|
1733
|
-
|
1734
|
-
|
1735
|
-
}
|
1474
|
+
declare const useContentPartImage: () => ImageContentPart & {
|
1475
|
+
part: ThreadUserContentPart | ThreadAssistantContentPart;
|
1476
|
+
status: ContentPartStatus | ToolCallContentPartStatus;
|
1477
|
+
};
|
1736
1478
|
|
1737
|
-
declare const useContentPartText: () =>
|
1738
|
-
|
1739
|
-
|
1740
|
-
}
|
1479
|
+
declare const useContentPartText: () => TextContentPart & {
|
1480
|
+
part: ThreadUserContentPart | ThreadAssistantContentPart;
|
1481
|
+
status: ContentPartStatus | ToolCallContentPartStatus;
|
1482
|
+
};
|
1741
1483
|
|
1742
1484
|
type MessageIfFilters = {
|
1743
1485
|
user: boolean | undefined;
|
@@ -2463,7 +2205,7 @@ declare class ProxyConfigProvider implements ModelConfigProvider {
|
|
2463
2205
|
registerModelConfigProvider(provider: ModelConfigProvider): () => void;
|
2464
2206
|
}
|
2465
2207
|
|
2466
|
-
declare const useSmooth: (state:
|
2208
|
+
declare const useSmooth: (state: ContentPartState & TextContentPart, smooth?: boolean) => ContentPartState & TextContentPart;
|
2467
2209
|
|
2468
2210
|
declare const withSmoothContextProvider: <C extends ComponentType<any>>(Component: C) => C;
|
2469
2211
|
declare const useSmoothStatus: {
|
@@ -2528,8 +2270,8 @@ type internal_AssistantRuntime<TThreadRuntime extends ThreadRuntime = ThreadRunt
|
|
2528
2270
|
declare const internal_AssistantRuntime: typeof AssistantRuntime;
|
2529
2271
|
type internal_BaseAssistantRuntimeCore<TThreadRuntime extends ReactThreadRuntimeCore> = BaseAssistantRuntimeCore<TThreadRuntime>;
|
2530
2272
|
declare const internal_BaseAssistantRuntimeCore: typeof BaseAssistantRuntimeCore;
|
2531
|
-
type
|
2532
|
-
declare const
|
2273
|
+
type internal_DefaultThreadComposerRuntimeCore = DefaultThreadComposerRuntimeCore;
|
2274
|
+
declare const internal_DefaultThreadComposerRuntimeCore: typeof DefaultThreadComposerRuntimeCore;
|
2533
2275
|
type internal_MessageRepository = MessageRepository;
|
2534
2276
|
declare const internal_MessageRepository: typeof MessageRepository;
|
2535
2277
|
type internal_ProxyConfigProvider = ProxyConfigProvider;
|
@@ -2544,7 +2286,7 @@ declare const internal_useSmooth: typeof useSmooth;
|
|
2544
2286
|
declare const internal_useSmoothStatus: typeof useSmoothStatus;
|
2545
2287
|
declare const internal_withSmoothContextProvider: typeof withSmoothContextProvider;
|
2546
2288
|
declare namespace internal {
|
2547
|
-
export { internal_AssistantRuntime as AssistantRuntime, internal_BaseAssistantRuntimeCore as BaseAssistantRuntimeCore,
|
2289
|
+
export { internal_AssistantRuntime as AssistantRuntime, internal_BaseAssistantRuntimeCore as BaseAssistantRuntimeCore, internal_DefaultThreadComposerRuntimeCore as DefaultThreadComposerRuntimeCore, internal_MessageRepository as MessageRepository, internal_ProxyConfigProvider as ProxyConfigProvider, type internal_ReactThreadRuntimeCore as ReactThreadRuntimeCore, internal_ThreadRuntime as ThreadRuntime, type internal_ThreadRuntimeCoreBinding as ThreadRuntimeCoreBinding, internal_TooltipIconButton as TooltipIconButton, internal_generateId as generateId, internal_useSmooth as useSmooth, internal_useSmoothStatus as useSmoothStatus, internal_withSmoothContextProvider as withSmoothContextProvider };
|
2548
2290
|
}
|
2549
2291
|
|
2550
|
-
export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveFeedbackNegativeProps, type ActionBarPrimitiveFeedbackPositiveProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type ActionBarPrimitiveSpeakProps, type ActionBarPrimitiveStopSpeakingProps, type AddToolResultOptions, AppendMessage, _default$b as AssistantActionBar, type AssistantContextValue, _default$a as AssistantMessage, type AssistantMessageConfig, type AssistantMessageContentProps, _default$9 as AssistantModal, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, AssistantRuntime, AssistantRuntimeProvider, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type AssistantToolUIsState, type AttachmentAdapter, _default$8 as BranchPicker, index$4 as BranchPickerPrimitive, type BranchPickerPrimitiveCountProps, type BranchPickerPrimitiveNextProps, type BranchPickerPrimitiveNumberProps, type BranchPickerPrimitivePreviousProps, type BranchPickerPrimitiveRootProps, type ChatModelAdapter, type ChatModelRunOptions, type ChatModelRunResult, type ChatModelRunUpdate, _default$7 as Composer, _default$6 as ComposerAttachment, type ComposerContextValue, type ComposerInputProps, index$3 as ComposerPrimitive, type ComposerPrimitiveCancelProps, type ComposerPrimitiveIfProps, type ComposerPrimitiveInputProps, type ComposerPrimitiveRootProps, type ComposerPrimitiveSendProps, CompositeAttachmentAdapter, exports as ContentPart, type ContentPartContextValue, index$2 as ContentPartPrimitive, type ContentPartPrimitiveDisplayProps, type ContentPartPrimitiveImageProps, type ContentPartPrimitiveInProgressProps, type ContentPartPrimitiveTextProps, ContentPartRuntime,
|
2292
|
+
export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveFeedbackNegativeProps, type ActionBarPrimitiveFeedbackPositiveProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type ActionBarPrimitiveSpeakProps, type ActionBarPrimitiveStopSpeakingProps, type AddToolResultOptions, AppendMessage, _default$b as AssistantActionBar, type AssistantContextValue, _default$a as AssistantMessage, type AssistantMessageConfig, type AssistantMessageContentProps, _default$9 as AssistantModal, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, AssistantRuntime, AssistantRuntimeProvider, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type AssistantToolUIsState, type AttachmentAdapter, _default$8 as BranchPicker, index$4 as BranchPickerPrimitive, type BranchPickerPrimitiveCountProps, type BranchPickerPrimitiveNextProps, type BranchPickerPrimitiveNumberProps, type BranchPickerPrimitivePreviousProps, type BranchPickerPrimitiveRootProps, type ChatModelAdapter, type ChatModelRunOptions, type ChatModelRunResult, type ChatModelRunUpdate, _default$7 as Composer, _default$6 as ComposerAttachment, type ComposerContextValue, type ComposerInputProps, index$3 as ComposerPrimitive, type ComposerPrimitiveCancelProps, type ComposerPrimitiveIfProps, type ComposerPrimitiveInputProps, type ComposerPrimitiveRootProps, type ComposerPrimitiveSendProps, ComposerRuntime, type ComposerState, CompositeAttachmentAdapter, exports as ContentPart, type ContentPartContextValue, index$2 as ContentPartPrimitive, type ContentPartPrimitiveDisplayProps, type ContentPartPrimitiveImageProps, type ContentPartPrimitiveInProgressProps, type ContentPartPrimitiveTextProps, ContentPartRuntime, CoreMessage, type DangerousInBrowserRuntimeOptions, EdgeChatAdapter, type EdgeRuntimeOptions, _default$5 as EditComposer, type EditComposerState, type EmptyContentPartComponent, type EmptyContentPartProps, type ExternalStoreAdapter, type ExternalStoreMessageConverter, internal as INTERNAL, ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type LocalRuntimeOptions, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, MessageRuntime, type MessageState, MessageStatus, type MessageUtilsState, ModelConfig, ModelConfigProvider, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SpeechSynthesisAdapter, StreamUtils, type StringsConfig, type SubmitFeedbackOptions, type SuggestionConfig, TextContentPart, type TextContentPartComponent, type TextContentPartProps, TextContentPartProvider, _default$4 as Thread, ThreadAssistantContentPart, type ThreadConfig, ThreadConfigProvider, type ThreadConfigProviderProps, type ThreadContextValue, ThreadMessage, type ThreadMessageLike, index as ThreadPrimitive, type ThreadPrimitiveEmptyProps, type ThreadPrimitiveIfProps, type ThreadPrimitiveMessagesProps, type ThreadPrimitiveRootProps, type ThreadPrimitiveScrollToBottomProps, type ThreadPrimitiveSuggestionProps, type ThreadPrimitiveViewportProps, type ThreadRootProps, ThreadRuntime, type ThreadState, ThreadUserContentPart, type ThreadViewportState, _default as ThreadWelcome, type ThreadWelcomeConfig, type ThreadWelcomeMessageProps, type ThreadWelcomeSuggestionProps, Tool, ToolCallContentPart, type ToolCallContentPartComponent, type ToolCallContentPartProps, UIContentPart, type UIContentPartComponent, type UIContentPartProps, type Unsubscribe, type UseActionBarCopyProps, _default$2 as UserActionBar, _default$3 as UserMessage, _default$1 as UserMessageAttachment, type UserMessageConfig, type UserMessageContentProps, WebSpeechSynthesisAdapter, fromCoreMessage, fromCoreMessages, fromLanguageModelMessages, fromLanguageModelTools, getExternalStoreMessage, makeAssistantTool, makeAssistantToolUI, streamUtils, subscribeToMainThread, toCoreMessage, toCoreMessages, toLanguageModelMessages, toLanguageModelTools, useActionBarCopy, useActionBarEdit, useActionBarFeedbackNegative, useActionBarFeedbackPositive, useActionBarReload, useActionBarSpeak, useActionBarStopSpeaking, useAppendMessage, useAssistantActions, useAssistantActionsStore, useAssistantContext, useAssistantInstructions, useAssistantRuntime, useAssistantRuntimeStore, useAssistantTool, useAssistantToolUI, useBranchPickerCount, useBranchPickerNext, useBranchPickerNumber, useBranchPickerPrevious, useComposer, useComposerAddAttachment, useComposerCancel, useComposerContext, useComposerIf, useComposerRuntime, useComposerSend, useComposerStore, useContentPart, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartRuntime, useContentPartStore, useContentPartText, useDangerousInBrowserRuntime, useEdgeRuntime, useEditComposer, useEditComposerStore, useExternalMessageConverter, useExternalStoreRuntime, useLocalRuntime, useMessage, useMessageContext, useMessageIf, useMessageRuntime, useMessageStore, useMessageUtils, useMessageUtilsStore, useSwitchToNewThread, useThread, useThreadActions, useThreadActionsStore, useThreadComposer, useThreadComposerStore, useThreadConfig, useThreadContext, useThreadEmpty, useThreadIf, useThreadMessages, useThreadMessagesStore, useThreadRuntime, useThreadRuntimeStore, useThreadScrollToBottom, useThreadStore, useThreadSuggestion, useThreadViewport, useThreadViewportStore, useToolUIs, useToolUIsStore };
|