@assistant-ui/react 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.js
CHANGED
@@ -1812,15 +1812,17 @@ var LocalRuntime = class {
|
|
1812
1812
|
this.abortController = new AbortController();
|
1813
1813
|
this.notifySubscribers();
|
1814
1814
|
try {
|
1815
|
-
|
1815
|
+
const updateHandler = ({ content }) => {
|
1816
|
+
message.content = content;
|
1817
|
+
this.repository.addOrUpdateMessage(parentId, { ...message });
|
1818
|
+
this.notifySubscribers();
|
1819
|
+
};
|
1820
|
+
const result = await this.adapter.run({
|
1816
1821
|
messages,
|
1817
1822
|
abortSignal: this.abortController.signal,
|
1818
|
-
onUpdate:
|
1819
|
-
message.content = content;
|
1820
|
-
this.repository.addOrUpdateMessage(parentId, { ...message });
|
1821
|
-
this.notifySubscribers();
|
1822
|
-
}
|
1823
|
+
onUpdate: updateHandler
|
1823
1824
|
});
|
1825
|
+
updateHandler(result);
|
1824
1826
|
message.status = "done";
|
1825
1827
|
this.repository.addOrUpdateMessage(parentId, { ...message });
|
1826
1828
|
} catch (e) {
|