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/dist/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/alan.mjs +9 -5
- package/lib/manifest.mjs +1 -1
- package/package.json +1 -1
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
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
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