@agentiffai/design 1.3.13 → 1.3.15

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.
@@ -832,6 +832,7 @@ function AssistantThinking({
832
832
  AssistantThinking.displayName = "AssistantThinking";
833
833
  function parseMarkdown(text) {
834
834
  if (!text) return [];
835
+ text = text.replace(/<!--TOOL_CALL:[^:]+:[\s\S]+?-->/g, "").replace(/__TOOL_CALL__:[^:]+:\{[^}]*(?:\{[^}]*\}[^}]*)*\}/g, "").replace(/<!--TOOL_CALL:[\s\S]*$/g, "").replace(/__TOOL_CALL__:[\s\S]*$/g, "");
835
836
  const elements = [];
836
837
  let key = 0;
837
838
  const paragraphs = text.split(/\n\n+/);
@@ -1309,9 +1310,13 @@ var AssistantMessageBase = ({
1309
1310
  };
1310
1311
  var AssistantMessage = react.memo(AssistantMessageBase);
1311
1312
  AssistantMessage.displayName = "AssistantMessage";
1312
- var TOOL_CALL_MARKER_REGEX = /<!--TOOL_CALL:([^:]+):(.+?)-->/g;
1313
1313
  function stripToolCallMarkers(content) {
1314
- return content.replace(TOOL_CALL_MARKER_REGEX, "").trim();
1314
+ let stripped = content;
1315
+ stripped = stripped.replace(/<!--TOOL_CALL:[^:]+:[\s\S]+?-->/g, "");
1316
+ stripped = stripped.replace(/__TOOL_CALL__:[^:]+:\{[^}]*(?:\{[^}]*\}[^}]*)*\}/g, "");
1317
+ stripped = stripped.replace(/<!--TOOL_CALL:[\s\S]*$/g, "");
1318
+ stripped = stripped.replace(/__TOOL_CALL__:[\s\S]*$/g, "");
1319
+ return stripped.trim();
1315
1320
  }
1316
1321
  var ERROR_PATTERNS = [
1317
1322
  /\bfailed\b/i,