@agentiffai/design 1.3.14 → 1.3.16
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/copilotkit/index.cjs +7 -3
- package/dist/copilotkit/index.cjs.map +1 -1
- package/dist/copilotkit/index.js +7 -3
- package/dist/copilotkit/index.js.map +1 -1
- package/dist/index.cjs +51 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +51 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/copilotkit/index.js
CHANGED
|
@@ -826,7 +826,7 @@ function AssistantThinking({
|
|
|
826
826
|
AssistantThinking.displayName = "AssistantThinking";
|
|
827
827
|
function parseMarkdown(text) {
|
|
828
828
|
if (!text) return [];
|
|
829
|
-
text = text.replace(/<!--TOOL_CALL:[
|
|
829
|
+
text = text.replace(/<!--TOOL_CALL:[^:]+:[\s\S]+?-->/g, "").replace(/__TOOL_CALL__:[^:]+:\{[^}]*(?:\{[^}]*\}[^}]*)*\}/g, "").replace(/<!--TOOL_CALL:[\s\S]*$/g, "").replace(/__TOOL_CALL__:[\s\S]*$/g, "");
|
|
830
830
|
const elements = [];
|
|
831
831
|
let key = 0;
|
|
832
832
|
const paragraphs = text.split(/\n\n+/);
|
|
@@ -1304,9 +1304,13 @@ var AssistantMessageBase = ({
|
|
|
1304
1304
|
};
|
|
1305
1305
|
var AssistantMessage = memo(AssistantMessageBase);
|
|
1306
1306
|
AssistantMessage.displayName = "AssistantMessage";
|
|
1307
|
-
var TOOL_CALL_MARKER_REGEX = /<!--TOOL_CALL:([^:]+):(.+?)-->/g;
|
|
1308
1307
|
function stripToolCallMarkers(content) {
|
|
1309
|
-
|
|
1308
|
+
let stripped = content;
|
|
1309
|
+
stripped = stripped.replace(/<!--TOOL_CALL:[^:]+:[\s\S]+?-->/g, "");
|
|
1310
|
+
stripped = stripped.replace(/__TOOL_CALL__:[^:]+:\{[^}]*(?:\{[^}]*\}[^}]*)*\}/g, "");
|
|
1311
|
+
stripped = stripped.replace(/<!--TOOL_CALL:[\s\S]*$/g, "");
|
|
1312
|
+
stripped = stripped.replace(/__TOOL_CALL__:[\s\S]*$/g, "");
|
|
1313
|
+
return stripped.trim();
|
|
1310
1314
|
}
|
|
1311
1315
|
var ERROR_PATTERNS = [
|
|
1312
1316
|
/\bfailed\b/i,
|