utilitas 1998.2.7 → 1998.2.8

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/lib/alan.mjs CHANGED
@@ -543,11 +543,15 @@ const packResp = async (resp, options) => {
543
543
  // DeepSeek R1 {
544
544
  let lines = (richText || txt).split('\n');
545
545
  const indexOfEnd = lines.indexOf(THINK_END);
546
- if (lines[0] === THINK_STR && indexOfEnd !== -1) {
547
- lines[0] = MD_CODE + THINK;
548
- lines[indexOfEnd] = MD_CODE;
549
- lines.slice(1, indexOfEnd).join('').trim()
550
- || (lines = lines.slice(indexOfEnd + 1));
546
+ if (lines[0] === THINK_STR) {
547
+ if (indexOfEnd === -1) {
548
+ lines.shift();
549
+ } else {
550
+ lines[0] = MD_CODE + THINK;
551
+ lines[indexOfEnd] = MD_CODE;
552
+ lines.slice(1, indexOfEnd).join('').trim()
553
+ || (lines = lines.slice(indexOfEnd + 1));
554
+ }
551
555
  richText = lines.join('\n').trim();
552
556
  }
553
557
  // }
package/lib/manifest.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1998.2.7",
4
+ "version": "1998.2.8",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1998.2.7",
4
+ "version": "1998.2.8",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",