@assistant-ui/react 0.5.3 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
@@ -558,14 +558,15 @@ type ExternalStoreAdapterBase<T> = {
|
|
558
558
|
threadId?: string;
|
559
559
|
isRunning?: boolean;
|
560
560
|
messages: T[];
|
561
|
-
setMessages?: (messages: T[]) => void;
|
561
|
+
setMessages?: ((messages: T[]) => void) | undefined;
|
562
562
|
onNew: (message: AppendMessage) => Promise<void>;
|
563
563
|
onEdit?: ((message: AppendMessage) => Promise<void>) | undefined;
|
564
564
|
onReload?: ((parentId: string | null) => Promise<void>) | undefined;
|
565
565
|
onCancel?: (() => Promise<void>) | undefined;
|
566
|
-
|
567
|
-
|
568
|
-
|
566
|
+
onCopy?: (() => Promise<void>) | null | undefined;
|
567
|
+
onNewThread?: (() => Promise<void> | void) | undefined;
|
568
|
+
onAddToolResult?: ((options: AddToolResultOptions) => Promise<void> | void) | undefined;
|
569
|
+
onSwitchThread?: ((threadId: string | null) => Promise<void> | void) | undefined;
|
569
570
|
convertMessage?: ExternalStoreMessageConverter<T> | undefined;
|
570
571
|
};
|
571
572
|
type ExternalStoreAdapter<T = ThreadMessage> = ExternalStoreAdapterBase<T> & (T extends ThreadMessage ? object : ExternalStoreMessageConverterAdapter<T>);
|
@@ -1201,8 +1202,8 @@ type AvatarProps = {
|
|
1201
1202
|
};
|
1202
1203
|
|
1203
1204
|
type SuggestionConfig = {
|
1204
|
-
text
|
1205
|
-
prompt
|
1205
|
+
text?: ReactNode;
|
1206
|
+
prompt: string;
|
1206
1207
|
};
|
1207
1208
|
type ThreadWelcomeConfig = {
|
1208
1209
|
message?: string | null | undefined;
|
package/dist/index.d.ts
CHANGED
@@ -558,14 +558,15 @@ type ExternalStoreAdapterBase<T> = {
|
|
558
558
|
threadId?: string;
|
559
559
|
isRunning?: boolean;
|
560
560
|
messages: T[];
|
561
|
-
setMessages?: (messages: T[]) => void;
|
561
|
+
setMessages?: ((messages: T[]) => void) | undefined;
|
562
562
|
onNew: (message: AppendMessage) => Promise<void>;
|
563
563
|
onEdit?: ((message: AppendMessage) => Promise<void>) | undefined;
|
564
564
|
onReload?: ((parentId: string | null) => Promise<void>) | undefined;
|
565
565
|
onCancel?: (() => Promise<void>) | undefined;
|
566
|
-
|
567
|
-
|
568
|
-
|
566
|
+
onCopy?: (() => Promise<void>) | null | undefined;
|
567
|
+
onNewThread?: (() => Promise<void> | void) | undefined;
|
568
|
+
onAddToolResult?: ((options: AddToolResultOptions) => Promise<void> | void) | undefined;
|
569
|
+
onSwitchThread?: ((threadId: string | null) => Promise<void> | void) | undefined;
|
569
570
|
convertMessage?: ExternalStoreMessageConverter<T> | undefined;
|
570
571
|
};
|
571
572
|
type ExternalStoreAdapter<T = ThreadMessage> = ExternalStoreAdapterBase<T> & (T extends ThreadMessage ? object : ExternalStoreMessageConverterAdapter<T>);
|
@@ -1201,8 +1202,8 @@ type AvatarProps = {
|
|
1201
1202
|
};
|
1202
1203
|
|
1203
1204
|
type SuggestionConfig = {
|
1204
|
-
text
|
1205
|
-
prompt
|
1205
|
+
text?: ReactNode;
|
1206
|
+
prompt: string;
|
1206
1207
|
};
|
1207
1208
|
type ThreadWelcomeConfig = {
|
1208
1209
|
message?: string | null | undefined;
|
package/dist/index.js
CHANGED
@@ -3716,7 +3716,7 @@ var ExternalStoreThreadRuntime = class {
|
|
3716
3716
|
edit: this.store.onEdit !== void 0,
|
3717
3717
|
reload: this.store.onReload !== void 0,
|
3718
3718
|
cancel: this.store.onCancel !== void 0,
|
3719
|
-
copy:
|
3719
|
+
copy: this.store.onCopy !== null
|
3720
3720
|
};
|
3721
3721
|
}
|
3722
3722
|
messages = [];
|
@@ -4237,10 +4237,10 @@ var ThreadWelcomeSuggestion = ({
|
|
4237
4237
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
4238
4238
|
ThreadWelcomeSuggestionStyled,
|
4239
4239
|
{
|
4240
|
-
prompt
|
4240
|
+
prompt,
|
4241
4241
|
method: "replace",
|
4242
4242
|
autoSend: true,
|
4243
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "aui-thread-welcome-suggestion-text", children: text })
|
4243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "aui-thread-welcome-suggestion-text", children: text ?? prompt })
|
4244
4244
|
}
|
4245
4245
|
);
|
4246
4246
|
};
|