@assistant-ui/react 0.5.59 → 0.5.60
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{chunk-33TPUWEZ.mjs → chunk-DC342I2Q.mjs} +16 -16
- package/dist/{chunk-33TPUWEZ.mjs.map → chunk-DC342I2Q.mjs.map} +1 -1
- package/dist/{chunk-CWAZOKEW.js → chunk-J2V7Y7JX.js} +14 -14
- package/dist/{chunk-CWAZOKEW.js.map → chunk-J2V7Y7JX.js.map} +1 -1
- package/dist/{edge-BJordJU0.d.mts → edge-eV0d_Sqj.d.mts} +101 -101
- package/dist/{edge-BJordJU0.d.ts → edge-eV0d_Sqj.d.ts} +101 -101
- package/dist/index.d.mts +129 -49
- package/dist/index.d.ts +129 -49
- package/dist/index.js +299 -98
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +494 -293
- package/dist/index.mjs.map +1 -1
- package/dist/styles/index.css +118 -92
- package/dist/styles/index.css.map +1 -1
- package/dist/styles/tailwindcss/thread.css +9 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as react from 'react';
|
2
2
|
import { ComponentType, PropsWithChildren, FC, ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
|
3
|
-
import {
|
4
|
-
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, n as ThreadUserContentPart, q as ThreadUserMessage } from './edge-
|
3
|
+
import { C as ContentPartStatus, T as TextContentPart, I as ImageContentPart, U as UIContentPart, a as ToolCallContentPart, b as ToolCallContentPartStatus, c as ThreadAssistantContentPart, M as MessageStatus, d as ThreadRoundtrip, e as ThreadMessage, f as ModelConfig, g as ModelConfigProvider, h as CoreMessage, i as ThreadComposerAttachment, j as MessageAttachment, A as AppendMessage, k as Tool, l as CoreToolCallContentPart, m as CreateEdgeRuntimeAPIOptions } from './edge-eV0d_Sqj.mjs';
|
4
|
+
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, n as ThreadUserContentPart, q as ThreadUserMessage } from './edge-eV0d_Sqj.mjs';
|
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';
|
@@ -14,6 +14,32 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
14
14
|
import 'json-schema';
|
15
15
|
import 'zod';
|
16
16
|
|
17
|
+
type EmptyContentPartProps = {
|
18
|
+
status: ContentPartStatus;
|
19
|
+
};
|
20
|
+
type EmptyContentPartComponent = ComponentType<EmptyContentPartProps>;
|
21
|
+
type TextContentPartProps = {
|
22
|
+
part: TextContentPart;
|
23
|
+
status: ContentPartStatus;
|
24
|
+
};
|
25
|
+
type TextContentPartComponent = ComponentType<TextContentPartProps>;
|
26
|
+
type ImageContentPartProps = {
|
27
|
+
part: ImageContentPart;
|
28
|
+
status: ContentPartStatus;
|
29
|
+
};
|
30
|
+
type ImageContentPartComponent = ComponentType<ImageContentPartProps>;
|
31
|
+
type UIContentPartProps = {
|
32
|
+
part: UIContentPart;
|
33
|
+
status: ContentPartStatus;
|
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>>;
|
42
|
+
|
17
43
|
type Unsubscribe = () => void;
|
18
44
|
|
19
45
|
type ReadonlyStore<T> = Omit<StoreApi<T>, "setState" | "destroy">;
|
@@ -62,32 +88,6 @@ declare abstract class BaseAssistantRuntime<TThreadRuntime extends ReactThreadRu
|
|
62
88
|
private subscriptionHandler;
|
63
89
|
}
|
64
90
|
|
65
|
-
type EmptyContentPartProps = {
|
66
|
-
status: ContentPartStatus;
|
67
|
-
};
|
68
|
-
type EmptyContentPartComponent = ComponentType<EmptyContentPartProps>;
|
69
|
-
type TextContentPartProps = {
|
70
|
-
part: TextContentPart;
|
71
|
-
status: ContentPartStatus;
|
72
|
-
};
|
73
|
-
type TextContentPartComponent = ComponentType<TextContentPartProps>;
|
74
|
-
type ImageContentPartProps = {
|
75
|
-
part: ImageContentPart;
|
76
|
-
status: ContentPartStatus;
|
77
|
-
};
|
78
|
-
type ImageContentPartComponent = ComponentType<ImageContentPartProps>;
|
79
|
-
type UIContentPartProps = {
|
80
|
-
part: UIContentPart;
|
81
|
-
status: ContentPartStatus;
|
82
|
-
};
|
83
|
-
type UIContentPartComponent = ComponentType<UIContentPartProps>;
|
84
|
-
type ToolCallContentPartProps<TArgs extends Record<string, unknown> = any, TResult = unknown> = {
|
85
|
-
part: ToolCallContentPart<TArgs, TResult>;
|
86
|
-
status: ToolCallContentPartStatus;
|
87
|
-
addResult: (result: any) => void;
|
88
|
-
};
|
89
|
-
type ToolCallContentPartComponent<TArgs extends Record<string, unknown> = any, TResult = any> = ComponentType<ToolCallContentPartProps<TArgs, TResult>>;
|
90
|
-
|
91
91
|
interface ExportedMessageRepository {
|
92
92
|
headId?: string | null;
|
93
93
|
messages: Array<{
|
@@ -146,6 +146,14 @@ declare class ThreadRuntimeComposer implements ThreadRuntime.Composer {
|
|
146
146
|
send(): Promise<void>;
|
147
147
|
}
|
148
148
|
|
149
|
+
type FeedbackAdapterFeedback = {
|
150
|
+
message: ThreadMessage;
|
151
|
+
type: "positive" | "negative";
|
152
|
+
};
|
153
|
+
type FeedbackAdapter = {
|
154
|
+
submit: (feedback: FeedbackAdapterFeedback) => void;
|
155
|
+
};
|
156
|
+
|
149
157
|
declare namespace SpeechSynthesisAdapter {
|
150
158
|
type Status = {
|
151
159
|
type: "starting" | "running";
|
@@ -170,6 +178,7 @@ type LocalRuntimeOptions = {
|
|
170
178
|
adapters?: {
|
171
179
|
attachments?: AttachmentAdapter | undefined;
|
172
180
|
speech?: SpeechSynthesisAdapter | undefined;
|
181
|
+
feedback?: FeedbackAdapter | undefined;
|
173
182
|
} | undefined;
|
174
183
|
};
|
175
184
|
|
@@ -177,6 +186,28 @@ declare class WebSpeechSynthesisAdapter implements SpeechSynthesisAdapter {
|
|
177
186
|
speak(message: ThreadMessage): SpeechSynthesisAdapter.Utterance;
|
178
187
|
}
|
179
188
|
|
189
|
+
type AddToolResultOptions = {
|
190
|
+
messageId: string;
|
191
|
+
toolName: string;
|
192
|
+
toolCallId: string;
|
193
|
+
result: any;
|
194
|
+
};
|
195
|
+
type SubmitFeedbackOptions = {
|
196
|
+
messageId: string;
|
197
|
+
type: "negative" | "positive";
|
198
|
+
};
|
199
|
+
type ThreadActionsState = Readonly<{
|
200
|
+
getBranches: (messageId: string) => readonly string[];
|
201
|
+
switchToBranch: (branchId: string) => void;
|
202
|
+
append: (message: AppendMessage) => void;
|
203
|
+
startRun: (parentId: string | null) => void;
|
204
|
+
cancelRun: () => void;
|
205
|
+
addToolResult: (options: AddToolResultOptions) => void;
|
206
|
+
speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
|
207
|
+
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
208
|
+
getModelConfig: () => ModelConfig;
|
209
|
+
}>;
|
210
|
+
|
180
211
|
declare class LocalThreadRuntime implements ThreadRuntime {
|
181
212
|
private configProvider;
|
182
213
|
adapter: ChatModelAdapter;
|
@@ -191,12 +222,14 @@ declare class LocalThreadRuntime implements ThreadRuntime {
|
|
191
222
|
unstable_copy: boolean;
|
192
223
|
speak: boolean;
|
193
224
|
attachments: boolean;
|
225
|
+
feedback: boolean;
|
194
226
|
};
|
195
227
|
readonly threadId: string;
|
196
228
|
readonly isDisabled = false;
|
197
229
|
get messages(): ThreadMessage[];
|
198
230
|
readonly composer: ThreadRuntimeComposer;
|
199
231
|
constructor(configProvider: ModelConfigProvider, adapter: ChatModelAdapter, { initialMessages, ...options }: LocalRuntimeOptions);
|
232
|
+
getModelConfig(): ModelConfig;
|
200
233
|
private _options;
|
201
234
|
get options(): LocalRuntimeOptions;
|
202
235
|
set options({ initialMessages, ...options }: LocalRuntimeOptions);
|
@@ -211,6 +244,7 @@ declare class LocalThreadRuntime implements ThreadRuntime {
|
|
211
244
|
addToolResult({ messageId, toolCallId, result, }: AddToolResultOptions): void;
|
212
245
|
private _utterance;
|
213
246
|
speak(messageId: string): SpeechSynthesisAdapter.Utterance;
|
247
|
+
submitFeedback({ messageId, type }: SubmitFeedbackOptions): void;
|
214
248
|
export(): ExportedMessageRepository;
|
215
249
|
import(data: ExportedMessageRepository): void;
|
216
250
|
}
|
@@ -348,6 +382,7 @@ type ExternalStoreAdapterBase<T> = {
|
|
348
382
|
convertMessage?: ExternalStoreMessageConverter<T> | undefined;
|
349
383
|
adapters?: {
|
350
384
|
attachments?: AttachmentAdapter | undefined;
|
385
|
+
feedback?: FeedbackAdapter | undefined;
|
351
386
|
};
|
352
387
|
unstable_capabilities?: {
|
353
388
|
copy?: boolean | undefined;
|
@@ -477,6 +512,7 @@ declare class ThreadMessageConverter {
|
|
477
512
|
}
|
478
513
|
|
479
514
|
declare class ExternalStoreThreadRuntime implements ReactThreadRuntime {
|
515
|
+
private configProvider;
|
480
516
|
private _subscriptions;
|
481
517
|
private repository;
|
482
518
|
private assistantOptimisticId;
|
@@ -488,9 +524,10 @@ declare class ExternalStoreThreadRuntime implements ReactThreadRuntime {
|
|
488
524
|
converter: ThreadMessageConverter;
|
489
525
|
private _store;
|
490
526
|
readonly composer: ThreadRuntimeComposer;
|
491
|
-
constructor(store: ExternalStoreAdapter<any>);
|
527
|
+
constructor(configProvider: ModelConfigProvider, store: ExternalStoreAdapter<any>);
|
492
528
|
get store(): ExternalStoreAdapter<any>;
|
493
529
|
set store(store: ExternalStoreAdapter<any>);
|
530
|
+
getModelConfig(): ModelConfig;
|
494
531
|
private notifySubscribers;
|
495
532
|
getBranches(messageId: string): string[];
|
496
533
|
switchToBranch(branchId: string): void;
|
@@ -499,6 +536,7 @@ declare class ExternalStoreThreadRuntime implements ReactThreadRuntime {
|
|
499
536
|
cancelRun(): void;
|
500
537
|
addToolResult(options: AddToolResultOptions): void;
|
501
538
|
speak(messageId: string): SpeechSynthesisAdapter.Utterance;
|
539
|
+
submitFeedback({ messageId, type }: SubmitFeedbackOptions): void;
|
502
540
|
subscribe(callback: () => void): Unsubscribe;
|
503
541
|
private updateMessages;
|
504
542
|
}
|
@@ -554,24 +592,9 @@ type RuntimeCapabilities = {
|
|
554
592
|
unstable_copy: boolean;
|
555
593
|
speak: boolean;
|
556
594
|
attachments: boolean;
|
595
|
+
feedback: boolean;
|
557
596
|
};
|
558
597
|
|
559
|
-
type AddToolResultOptions = {
|
560
|
-
messageId: string;
|
561
|
-
toolName: string;
|
562
|
-
toolCallId: string;
|
563
|
-
result: any;
|
564
|
-
};
|
565
|
-
type ThreadActionsState = Readonly<{
|
566
|
-
getBranches: (messageId: string) => readonly string[];
|
567
|
-
switchToBranch: (branchId: string) => void;
|
568
|
-
append: (message: AppendMessage) => void;
|
569
|
-
startRun: (parentId: string | null) => void;
|
570
|
-
cancelRun: () => void;
|
571
|
-
addToolResult: (options: AddToolResultOptions) => void;
|
572
|
-
speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
|
573
|
-
}>;
|
574
|
-
|
575
598
|
type ThreadRuntime = ThreadActionsState & Readonly<{
|
576
599
|
composer: ThreadRuntime.Composer;
|
577
600
|
capabilities: Readonly<RuntimeCapabilities>;
|
@@ -861,6 +884,8 @@ declare const useThreadActions: {
|
|
861
884
|
cancelRun: () => void;
|
862
885
|
addToolResult: (options: AddToolResultOptions) => void;
|
863
886
|
speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
|
887
|
+
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
888
|
+
getModelConfig: () => ModelConfig;
|
864
889
|
}>;
|
865
890
|
<TSelected>(selector: (state: Readonly<{
|
866
891
|
getBranches: (messageId: string) => readonly string[];
|
@@ -870,6 +895,8 @@ declare const useThreadActions: {
|
|
870
895
|
cancelRun: () => void;
|
871
896
|
addToolResult: (options: AddToolResultOptions) => void;
|
872
897
|
speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
|
898
|
+
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
899
|
+
getModelConfig: () => ModelConfig;
|
873
900
|
}>) => TSelected): TSelected;
|
874
901
|
(options: {
|
875
902
|
optional: true;
|
@@ -881,6 +908,8 @@ declare const useThreadActions: {
|
|
881
908
|
cancelRun: () => void;
|
882
909
|
addToolResult: (options: AddToolResultOptions) => void;
|
883
910
|
speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
|
911
|
+
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
912
|
+
getModelConfig: () => ModelConfig;
|
884
913
|
}> | null;
|
885
914
|
<TSelected>(options: {
|
886
915
|
optional: true;
|
@@ -892,6 +921,8 @@ declare const useThreadActions: {
|
|
892
921
|
cancelRun: () => void;
|
893
922
|
addToolResult: (options: AddToolResultOptions) => void;
|
894
923
|
speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
|
924
|
+
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
925
|
+
getModelConfig: () => ModelConfig;
|
895
926
|
}>) => TSelected;
|
896
927
|
}): TSelected | null;
|
897
928
|
};
|
@@ -904,6 +935,8 @@ declare const useThreadActionsStore: {
|
|
904
935
|
cancelRun: () => void;
|
905
936
|
addToolResult: (options: AddToolResultOptions) => void;
|
906
937
|
speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
|
938
|
+
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
939
|
+
getModelConfig: () => ModelConfig;
|
907
940
|
}>>;
|
908
941
|
(options: {
|
909
942
|
optional: true;
|
@@ -915,6 +948,8 @@ declare const useThreadActionsStore: {
|
|
915
948
|
cancelRun: () => void;
|
916
949
|
addToolResult: (options: AddToolResultOptions) => void;
|
917
950
|
speak: (messageId: string) => SpeechSynthesisAdapter.Utterance;
|
951
|
+
submitFeedback: (feedback: SubmitFeedbackOptions) => void;
|
952
|
+
getModelConfig: () => ModelConfig;
|
918
953
|
}>> | null;
|
919
954
|
};
|
920
955
|
declare const useThreadComposer: {
|
@@ -1115,6 +1150,8 @@ type MessageUtilsState = Readonly<{
|
|
1115
1150
|
isSpeaking: boolean;
|
1116
1151
|
stopSpeaking: () => void;
|
1117
1152
|
addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
|
1153
|
+
submittedFeedback: "positive" | "negative" | null;
|
1154
|
+
setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
|
1118
1155
|
}>;
|
1119
1156
|
|
1120
1157
|
type MessageContextValue = {
|
@@ -1186,6 +1223,8 @@ declare const useMessageUtils: {
|
|
1186
1223
|
isSpeaking: boolean;
|
1187
1224
|
stopSpeaking: () => void;
|
1188
1225
|
addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
|
1226
|
+
submittedFeedback: "positive" | "negative" | null;
|
1227
|
+
setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
|
1189
1228
|
}>;
|
1190
1229
|
<TSelected>(selector: (state: Readonly<{
|
1191
1230
|
isCopied: boolean;
|
@@ -1195,6 +1234,8 @@ declare const useMessageUtils: {
|
|
1195
1234
|
isSpeaking: boolean;
|
1196
1235
|
stopSpeaking: () => void;
|
1197
1236
|
addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
|
1237
|
+
submittedFeedback: "positive" | "negative" | null;
|
1238
|
+
setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
|
1198
1239
|
}>) => TSelected): TSelected;
|
1199
1240
|
(options: {
|
1200
1241
|
optional: true;
|
@@ -1206,6 +1247,8 @@ declare const useMessageUtils: {
|
|
1206
1247
|
isSpeaking: boolean;
|
1207
1248
|
stopSpeaking: () => void;
|
1208
1249
|
addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
|
1250
|
+
submittedFeedback: "positive" | "negative" | null;
|
1251
|
+
setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
|
1209
1252
|
}> | null;
|
1210
1253
|
<TSelected>(options: {
|
1211
1254
|
optional: true;
|
@@ -1217,6 +1260,8 @@ declare const useMessageUtils: {
|
|
1217
1260
|
isSpeaking: boolean;
|
1218
1261
|
stopSpeaking: () => void;
|
1219
1262
|
addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
|
1263
|
+
submittedFeedback: "positive" | "negative" | null;
|
1264
|
+
setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
|
1220
1265
|
}>) => TSelected;
|
1221
1266
|
}): TSelected | null;
|
1222
1267
|
};
|
@@ -1229,6 +1274,8 @@ declare const useMessageUtilsStore: {
|
|
1229
1274
|
isSpeaking: boolean;
|
1230
1275
|
stopSpeaking: () => void;
|
1231
1276
|
addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
|
1277
|
+
submittedFeedback: "positive" | "negative" | null;
|
1278
|
+
setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
|
1232
1279
|
}>>;
|
1233
1280
|
(options: {
|
1234
1281
|
optional: true;
|
@@ -1240,6 +1287,8 @@ declare const useMessageUtilsStore: {
|
|
1240
1287
|
isSpeaking: boolean;
|
1241
1288
|
stopSpeaking: () => void;
|
1242
1289
|
addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;
|
1290
|
+
submittedFeedback: "positive" | "negative" | null;
|
1291
|
+
setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
|
1243
1292
|
}>> | null;
|
1244
1293
|
};
|
1245
1294
|
declare const useEditComposer: {
|
@@ -1654,6 +1703,10 @@ declare const useActionBarSpeak: () => (() => Promise<void>) | null;
|
|
1654
1703
|
|
1655
1704
|
declare const useActionBarStopSpeaking: () => (() => Promise<void>) | null;
|
1656
1705
|
|
1706
|
+
declare const useActionBarFeedbackPositive: () => () => void;
|
1707
|
+
|
1708
|
+
declare const useActionBarFeedbackNegative: () => () => void;
|
1709
|
+
|
1657
1710
|
declare const useBranchPickerCount: () => number;
|
1658
1711
|
|
1659
1712
|
declare const useBranchPickerNext: () => (() => void) | null;
|
@@ -1702,6 +1755,7 @@ type MessageIfFilters = {
|
|
1702
1755
|
lastOrHover: boolean | undefined;
|
1703
1756
|
speaking: boolean | undefined;
|
1704
1757
|
hasAttachments: boolean | undefined;
|
1758
|
+
submittedFeedback: "positive" | "negative" | null | undefined;
|
1705
1759
|
};
|
1706
1760
|
type UseMessageIfProps = RequireAtLeastOne<MessageIfFilters>;
|
1707
1761
|
declare const useMessageIf: (props: UseMessageIfProps) => boolean;
|
@@ -1743,11 +1797,11 @@ type PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
1743
1797
|
type ActionButtonProps<THook> = PrimitiveButtonProps & (THook extends (props: infer TProps) => unknown ? TProps : never);
|
1744
1798
|
|
1745
1799
|
type ActionBarPrimitiveCopyProps = ActionButtonProps<typeof useActionBarCopy>;
|
1746
|
-
declare const ActionBarPrimitiveCopy: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
1800
|
+
declare const ActionBarPrimitiveCopy: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
1747
1801
|
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;
|
1748
1802
|
} & {
|
1749
1803
|
asChild?: boolean;
|
1750
|
-
}, "ref"> & UseActionBarCopyProps & react.RefAttributes<HTMLButtonElement>>;
|
1804
|
+
}, "ref"> & UseActionBarCopyProps> & react.RefAttributes<HTMLButtonElement>>;
|
1751
1805
|
|
1752
1806
|
type ActionBarPrimitiveReloadProps = ActionButtonProps<typeof useActionBarReload>;
|
1753
1807
|
declare const ActionBarPrimitiveReload: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
@@ -1777,8 +1831,22 @@ declare const ActionBarPrimitiveStopSpeaking: react.ForwardRefExoticComponent<Pa
|
|
1777
1831
|
asChild?: boolean;
|
1778
1832
|
}, "ref">> & react.RefAttributes<HTMLButtonElement>>;
|
1779
1833
|
|
1834
|
+
type ActionBarPrimitiveFeedbackPositiveProps = ActionButtonProps<typeof useActionBarFeedbackPositive>;
|
1835
|
+
declare const ActionBarPrimitiveFeedbackPositive: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
1836
|
+
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;
|
1837
|
+
} & {
|
1838
|
+
asChild?: boolean;
|
1839
|
+
}, "ref">> & react.RefAttributes<HTMLButtonElement>>;
|
1840
|
+
|
1841
|
+
type ActionBarPrimitiveFeedbackNegativeProps = ActionButtonProps<typeof useActionBarFeedbackNegative>;
|
1842
|
+
declare const ActionBarPrimitiveFeedbackNegative: react.ForwardRefExoticComponent<Partial<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
1843
|
+
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;
|
1844
|
+
} & {
|
1845
|
+
asChild?: boolean;
|
1846
|
+
}, "ref">> & react.RefAttributes<HTMLButtonElement>>;
|
1847
|
+
|
1780
1848
|
declare namespace index$6 {
|
1781
|
-
export { ActionBarPrimitiveCopy as Copy, ActionBarPrimitiveEdit as Edit, ActionBarPrimitiveReload as Reload, ActionBarPrimitiveRoot as Root, ActionBarPrimitiveSpeak as Speak, ActionBarPrimitiveStopSpeaking as StopSpeaking };
|
1849
|
+
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 };
|
1782
1850
|
}
|
1783
1851
|
|
1784
1852
|
type AssistantModalPrimitiveRootProps = PopoverPrimitive.PopoverProps;
|
@@ -2056,6 +2124,8 @@ type AssistantMessageConfig = {
|
|
2056
2124
|
allowReload?: boolean | undefined;
|
2057
2125
|
allowCopy?: boolean | undefined;
|
2058
2126
|
allowSpeak?: boolean | undefined;
|
2127
|
+
allowFeedbackPositive?: boolean | undefined;
|
2128
|
+
allowFeedbackNegative?: boolean | undefined;
|
2059
2129
|
components?: {
|
2060
2130
|
Text?: TextContentPartComponent | undefined;
|
2061
2131
|
ToolFallback?: ComponentType<ToolCallContentPartProps> | undefined;
|
@@ -2103,6 +2173,14 @@ type StringsConfig = {
|
|
2103
2173
|
tooltip?: string | undefined;
|
2104
2174
|
};
|
2105
2175
|
};
|
2176
|
+
feedback?: {
|
2177
|
+
positive?: {
|
2178
|
+
tooltip?: string | undefined;
|
2179
|
+
};
|
2180
|
+
negative?: {
|
2181
|
+
tooltip?: string | undefined;
|
2182
|
+
};
|
2183
|
+
};
|
2106
2184
|
};
|
2107
2185
|
branchPicker?: {
|
2108
2186
|
previous?: {
|
@@ -2174,6 +2252,8 @@ declare const exports$c: {
|
|
2174
2252
|
Speak: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
|
2175
2253
|
StopSpeaking: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
|
2176
2254
|
SpeechControl: FC;
|
2255
|
+
FeedbackPositive: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
|
2256
|
+
FeedbackNegative: react.ForwardRefExoticComponent<Partial<TooltipIconButtonProps> & react.RefAttributes<HTMLButtonElement>>;
|
2177
2257
|
};
|
2178
2258
|
declare const _default$b: typeof AssistantActionBar & typeof exports$c;
|
2179
2259
|
|
@@ -2352,4 +2432,4 @@ declare const exports: {
|
|
2352
2432
|
Text: FC;
|
2353
2433
|
};
|
2354
2434
|
|
2355
|
-
export { index$6 as ActionBarPrimitive, type ActionBarPrimitiveCopyProps, type ActionBarPrimitiveEditProps, type ActionBarPrimitiveReloadProps, type ActionBarPrimitiveRootProps, type ActionBarPrimitiveSpeakProps, type ActionBarPrimitiveStopSpeakingProps, type AddToolResultOptions, AppendMessage, _default$b as AssistantActionBar, type AssistantActionsState, type AssistantContextValue, _default$a as AssistantMessage, type AssistantMessageConfig, type AssistantMessageContentProps, _default$9 as AssistantModal, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, type 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, type ContentPartState, CoreMessage, type DangerousInBrowserRuntimeOptions, EdgeChatAdapter, type EdgeRuntimeOptions, _default$5 as EditComposer, type EditComposerState, type EmptyContentPartComponent, type EmptyContentPartProps, type ExternalStoreAdapter, type ExternalStoreMessageConverter, ExternalStoreRuntime, internal as INTERNAL, ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type LocalRuntimeOptions, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, type MessageState, MessageStatus, type MessageUtilsState, ModelConfig, ModelConfigProvider, type ReactThreadRuntime, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SpeechSynthesisAdapter, StreamUtils, type StringsConfig, type SuggestionConfig, TextContentPart, type TextContentPartComponent, type TextContentPartProps, TextContentPartProvider, _default$4 as Thread, type ThreadActionsState, ThreadAssistantContentPart, type ThreadComposerState, type ThreadConfig, ThreadConfigProvider, type ThreadConfigProviderProps, type ThreadContextValue, ThreadMessage, type ThreadMessageLike, type ThreadMessagesState, index as ThreadPrimitive, type ThreadPrimitiveEmptyProps, type ThreadPrimitiveIfProps, type ThreadPrimitiveMessagesProps, type ThreadPrimitiveRootProps, type ThreadPrimitiveScrollToBottomProps, type ThreadPrimitiveSuggestionProps, type ThreadPrimitiveViewportProps, type ThreadRootProps, ThreadRuntime, type ThreadState, 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, useActionBarReload, useActionBarSpeak, useActionBarStopSpeaking, useAppendMessage, useAssistantActions, useAssistantActionsStore, useAssistantContext, useAssistantInstructions, useAssistantRuntime, useAssistantRuntimeStore, useAssistantTool, useAssistantToolUI, useBranchPickerCount, useBranchPickerNext, useBranchPickerNumber, useBranchPickerPrevious, useComposer, useComposerAddAttachment, useComposerCancel, useComposerContext, useComposerIf, useComposerSend, useComposerStore, useContentPart, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartStore, useContentPartText, useDangerousInBrowserRuntime, useEdgeRuntime, useEditComposer, useEditComposerStore, useExternalMessageConverter, useExternalStoreRuntime, useLocalRuntime, useMessage, useMessageContext, useMessageIf, useMessageStore, useMessageUtils, useMessageUtilsStore, useSwitchToNewThread, useThread, useThreadActions, useThreadActionsStore, useThreadComposer, useThreadComposerStore, useThreadConfig, useThreadContext, useThreadEmpty, useThreadIf, useThreadMessages, useThreadMessagesStore, useThreadRuntime, useThreadRuntimeStore, useThreadScrollToBottom, useThreadStore, useThreadSuggestion, useThreadViewport, useThreadViewportStore, useToolUIs, useToolUIsStore };
|
2435
|
+
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 AssistantActionsState, type AssistantContextValue, _default$a as AssistantMessage, type AssistantMessageConfig, type AssistantMessageContentProps, _default$9 as AssistantModal, index$5 as AssistantModalPrimitive, type AssistantModalPrimitiveContentProps, type AssistantModalPrimitiveRootProps, type AssistantModalPrimitiveTriggerProps, type 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, type ContentPartState, CoreMessage, type DangerousInBrowserRuntimeOptions, EdgeChatAdapter, type EdgeRuntimeOptions, _default$5 as EditComposer, type EditComposerState, type EmptyContentPartComponent, type EmptyContentPartProps, type ExternalStoreAdapter, type ExternalStoreMessageConverter, ExternalStoreRuntime, internal as INTERNAL, ImageContentPart, type ImageContentPartComponent, type ImageContentPartProps, type LocalRuntimeOptions, type MessageContextValue, index$1 as MessagePrimitive, type MessagePrimitiveContentProps, type MessagePrimitiveIfProps, type MessagePrimitiveInProgressProps, type MessagePrimitiveRootProps, type MessageState, MessageStatus, type MessageUtilsState, ModelConfig, ModelConfigProvider, type ReactThreadRuntime, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SpeechSynthesisAdapter, StreamUtils, type StringsConfig, type SuggestionConfig, TextContentPart, type TextContentPartComponent, type TextContentPartProps, TextContentPartProvider, _default$4 as Thread, type ThreadActionsState, ThreadAssistantContentPart, type ThreadComposerState, type ThreadConfig, ThreadConfigProvider, type ThreadConfigProviderProps, type ThreadContextValue, ThreadMessage, type ThreadMessageLike, type ThreadMessagesState, index as ThreadPrimitive, type ThreadPrimitiveEmptyProps, type ThreadPrimitiveIfProps, type ThreadPrimitiveMessagesProps, type ThreadPrimitiveRootProps, type ThreadPrimitiveScrollToBottomProps, type ThreadPrimitiveSuggestionProps, type ThreadPrimitiveViewportProps, type ThreadRootProps, ThreadRuntime, type ThreadState, 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, useComposerSend, useComposerStore, useContentPart, useContentPartContext, useContentPartDisplay, useContentPartImage, useContentPartStore, useContentPartText, useDangerousInBrowserRuntime, useEdgeRuntime, useEditComposer, useEditComposerStore, useExternalMessageConverter, useExternalStoreRuntime, useLocalRuntime, useMessage, useMessageContext, useMessageIf, useMessageStore, useMessageUtils, useMessageUtilsStore, useSwitchToNewThread, useThread, useThreadActions, useThreadActionsStore, useThreadComposer, useThreadComposerStore, useThreadConfig, useThreadContext, useThreadEmpty, useThreadIf, useThreadMessages, useThreadMessagesStore, useThreadRuntime, useThreadRuntimeStore, useThreadScrollToBottom, useThreadStore, useThreadSuggestion, useThreadViewport, useThreadViewportStore, useToolUIs, useToolUIsStore };
|