@shytv/ai-chart 0.0.13 → 0.0.14
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.
|
@@ -24823,19 +24823,17 @@ function GF(e, t, n, r) {
|
|
|
24823
24823
|
}), []), M = s(function() {
|
|
24824
24824
|
var e = W(function* (e) {
|
|
24825
24825
|
if (!e) return;
|
|
24826
|
-
let t = c.findIndex((t) => t.id === e && t.role === "
|
|
24826
|
+
let t = c.findIndex((t) => t.id === e && t.role === "user");
|
|
24827
24827
|
if (t === -1) return;
|
|
24828
|
-
let n = c
|
|
24829
|
-
|
|
24830
|
-
let r = c[t];
|
|
24831
|
-
yield O({
|
|
24828
|
+
let n = c[t], r = c[t + 1];
|
|
24829
|
+
r && r.role === "assistant" && (yield O({
|
|
24832
24830
|
content: n.content,
|
|
24833
24831
|
attachments: n.attachments,
|
|
24834
24832
|
parentId: n.id
|
|
24835
24833
|
}, "regenerate", {
|
|
24836
24834
|
userMessageId: n.id,
|
|
24837
24835
|
assistantMessageId: r.id
|
|
24838
|
-
});
|
|
24836
|
+
}));
|
|
24839
24837
|
});
|
|
24840
24838
|
return function(t) {
|
|
24841
24839
|
return e.apply(this, arguments);
|