@teodorruskvi/chat-core 0.1.53 → 0.1.54
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 +3 -5
- 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,18 +3486,16 @@ 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) =>
|
|
3490
|
-
if (s !== -1)
|
|
3491
|
-
const a = { ...r, id: o };
|
|
3489
|
+
const s = e.messages.findIndex((a) => a.id === o);
|
|
3490
|
+
if (s !== -1)
|
|
3492
3491
|
return {
|
|
3493
3492
|
...e,
|
|
3494
3493
|
status: "streaming",
|
|
3495
|
-
messages: [...e.messages.slice(0, s),
|
|
3494
|
+
messages: [...e.messages.slice(0, s), r],
|
|
3496
3495
|
assemblingId: null,
|
|
3497
3496
|
lastCheckpointId: null,
|
|
3498
3497
|
error: null
|
|
3499
3498
|
};
|
|
3500
|
-
}
|
|
3501
3499
|
}
|
|
3502
3500
|
return {
|
|
3503
3501
|
...e,
|