@ai-matrx/print 0.8.6 → 0.8.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.7
4
+
5
+ - **Fixed: hidden reasoning merged two paragraphs.** `removeThinkingContent`
6
+ replaced every `<thinking>` / `<think>` / `<reasoning>` section with one line
7
+ break, so a section standing between two paragraphs (blank lines around it)
8
+ joined them into one on screen. A section with a blank line on either side
9
+ now leaves a paragraph break; one inside a paragraph still leaves a line
10
+ break (verify-RC-B5 round 3 F6).
11
+ - Consumer action: none — refresh to latest.
12
+
3
13
  ## 0.8.6
4
14
 
5
15
  Automatic changed-only republish (docs/metadata drift since the last tag — see
package/dist/document.cjs CHANGED
@@ -4897,7 +4897,8 @@ var import_micromark_extension_gfm = require("micromark-extension-gfm");
4897
4897
  var import_html_escape3 = require("@ai-matrx/kit/html-escape");
4898
4898
  function removeThinkingContent(content) {
4899
4899
  if (!content) return "";
4900
- let result = content.replace(/\n*<thinking>[\s\S]*?<\/thinking>\n*/gi, "\n").replace(/\n*<think>[\s\S]*?<\/think>\n*/gi, "\n").replace(/\n*<reasoning>[\s\S]*?<\/reasoning>\n*/gi, "\n");
4900
+ const hide = (_match, before, after) => before.length >= 2 || after.length >= 2 ? "\n\n" : "\n";
4901
+ let result = content.replace(/(\n*)<thinking>[\s\S]*?<\/thinking>(\n*)/gi, hide).replace(/(\n*)<think>[\s\S]*?<\/think>(\n*)/gi, hide).replace(/(\n*)<reasoning>[\s\S]*?<\/reasoning>(\n*)/gi, hide);
4901
4902
  result = result.replace(/\n{3,}/g, "\n\n");
4902
4903
  return result.trim();
4903
4904
  }