@assistant-ui/react 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- 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>);
|
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>);
|
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 = [];
|