@icos-react/largemodel 1.0.26 → 1.0.27
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.js +18 -18
- package/dist/index.mjs +18 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3809,6 +3809,17 @@ function parseCustomTagsFromFullText(text, genSegmentId) {
|
|
|
3809
3809
|
}
|
|
3810
3810
|
return finalized;
|
|
3811
3811
|
}
|
|
3812
|
+
function appendAnchorToCustomTagStream(stream, anchorMark) {
|
|
3813
|
+
if (!stream.length || !anchorMark)
|
|
3814
|
+
return false;
|
|
3815
|
+
const exists = stream.some(
|
|
3816
|
+
(p) => p.kind === "text" && p.text.includes(anchorMark)
|
|
3817
|
+
);
|
|
3818
|
+
if (exists)
|
|
3819
|
+
return false;
|
|
3820
|
+
stream.push({ kind: "text", text: anchorMark });
|
|
3821
|
+
return true;
|
|
3822
|
+
}
|
|
3812
3823
|
function rootPlainFromStream(stream) {
|
|
3813
3824
|
return stream.filter((p) => p.kind === "text").map((p) => p.text).join("");
|
|
3814
3825
|
}
|
|
@@ -4021,15 +4032,12 @@ var processStreamData = (aiMessageId, jsonData, setChatMessages, conversationId,
|
|
|
4021
4032
|
};
|
|
4022
4033
|
}
|
|
4023
4034
|
if (customTagUpdate && customTagUpdate.stream.length > 0) {
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
}
|
|
4031
|
-
break;
|
|
4032
|
-
}
|
|
4035
|
+
const inserted = appendAnchorToCustomTagStream(
|
|
4036
|
+
customTagUpdate.stream,
|
|
4037
|
+
anchorMark
|
|
4038
|
+
);
|
|
4039
|
+
if (inserted) {
|
|
4040
|
+
hasChanges = true;
|
|
4033
4041
|
}
|
|
4034
4042
|
}
|
|
4035
4043
|
}
|
|
@@ -4247,15 +4255,7 @@ var processHistoryRecords = (history, chatMessages, setChatMessages, setConversa
|
|
|
4247
4255
|
if (actionItem.anchorId && historyCustomTagState.stream.length > 0) {
|
|
4248
4256
|
const anchorMark = `
|
|
4249
4257
|
[ANCHOR:${actionItem.anchorId}]`;
|
|
4250
|
-
|
|
4251
|
-
const part = historyCustomTagState.stream[j];
|
|
4252
|
-
if (part.kind === "text") {
|
|
4253
|
-
if (!part.text.includes(anchorMark)) {
|
|
4254
|
-
part.text += anchorMark;
|
|
4255
|
-
}
|
|
4256
|
-
break;
|
|
4257
|
-
}
|
|
4258
|
-
}
|
|
4258
|
+
appendAnchorToCustomTagStream(historyCustomTagState.stream, anchorMark);
|
|
4259
4259
|
}
|
|
4260
4260
|
});
|
|
4261
4261
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3760,6 +3760,17 @@ function parseCustomTagsFromFullText(text, genSegmentId) {
|
|
|
3760
3760
|
}
|
|
3761
3761
|
return finalized;
|
|
3762
3762
|
}
|
|
3763
|
+
function appendAnchorToCustomTagStream(stream, anchorMark) {
|
|
3764
|
+
if (!stream.length || !anchorMark)
|
|
3765
|
+
return false;
|
|
3766
|
+
const exists = stream.some(
|
|
3767
|
+
(p) => p.kind === "text" && p.text.includes(anchorMark)
|
|
3768
|
+
);
|
|
3769
|
+
if (exists)
|
|
3770
|
+
return false;
|
|
3771
|
+
stream.push({ kind: "text", text: anchorMark });
|
|
3772
|
+
return true;
|
|
3773
|
+
}
|
|
3763
3774
|
function rootPlainFromStream(stream) {
|
|
3764
3775
|
return stream.filter((p) => p.kind === "text").map((p) => p.text).join("");
|
|
3765
3776
|
}
|
|
@@ -3972,15 +3983,12 @@ var processStreamData = (aiMessageId, jsonData, setChatMessages, conversationId,
|
|
|
3972
3983
|
};
|
|
3973
3984
|
}
|
|
3974
3985
|
if (customTagUpdate && customTagUpdate.stream.length > 0) {
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
}
|
|
3982
|
-
break;
|
|
3983
|
-
}
|
|
3986
|
+
const inserted = appendAnchorToCustomTagStream(
|
|
3987
|
+
customTagUpdate.stream,
|
|
3988
|
+
anchorMark
|
|
3989
|
+
);
|
|
3990
|
+
if (inserted) {
|
|
3991
|
+
hasChanges = true;
|
|
3984
3992
|
}
|
|
3985
3993
|
}
|
|
3986
3994
|
}
|
|
@@ -4198,15 +4206,7 @@ var processHistoryRecords = (history, chatMessages, setChatMessages, setConversa
|
|
|
4198
4206
|
if (actionItem.anchorId && historyCustomTagState.stream.length > 0) {
|
|
4199
4207
|
const anchorMark = `
|
|
4200
4208
|
[ANCHOR:${actionItem.anchorId}]`;
|
|
4201
|
-
|
|
4202
|
-
const part = historyCustomTagState.stream[j];
|
|
4203
|
-
if (part.kind === "text") {
|
|
4204
|
-
if (!part.text.includes(anchorMark)) {
|
|
4205
|
-
part.text += anchorMark;
|
|
4206
|
-
}
|
|
4207
|
-
break;
|
|
4208
|
-
}
|
|
4209
|
-
}
|
|
4209
|
+
appendAnchorToCustomTagStream(historyCustomTagState.stream, anchorMark);
|
|
4210
4210
|
}
|
|
4211
4211
|
});
|
|
4212
4212
|
}
|