@teodorruskvi/chat-core 0.1.52 → 0.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +5 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3486,16 +3486,18 @@ function wr(e, t) {
|
|
|
3486
3486
|
case "user_message": {
|
|
3487
3487
|
const { message: r, editingMessageId: o } = t.payload;
|
|
3488
3488
|
if (o) {
|
|
3489
|
-
const s = e.messages.findIndex((a) => a.id === o);
|
|
3490
|
-
if (s !== -1)
|
|
3489
|
+
const s = e.messages.findIndex((a) => (a.id || a.messageId) === o);
|
|
3490
|
+
if (s !== -1) {
|
|
3491
|
+
const a = { ...r, id: o };
|
|
3491
3492
|
return {
|
|
3492
3493
|
...e,
|
|
3493
3494
|
status: "streaming",
|
|
3494
|
-
messages: [...e.messages.slice(0, s),
|
|
3495
|
+
messages: [...e.messages.slice(0, s), a],
|
|
3495
3496
|
assemblingId: null,
|
|
3496
3497
|
lastCheckpointId: null,
|
|
3497
3498
|
error: null
|
|
3498
3499
|
};
|
|
3500
|
+
}
|
|
3499
3501
|
}
|
|
3500
3502
|
return {
|
|
3501
3503
|
...e,
|