@blockrun/clawrouter 0.8.13 → 0.8.14
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/cli.js +0 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2642,16 +2642,12 @@ function normalizeMessagesForThinking(messages) {
|
|
|
2642
2642
|
}
|
|
2643
2643
|
var KIMI_BLOCK_RE = /<[||][^<>]*begin[^<>]*[||]>[\s\S]*?<[||][^<>]*end[^<>]*[||]>/gi;
|
|
2644
2644
|
var KIMI_TOKEN_RE = /<[||][^<>]*[||]>/g;
|
|
2645
|
-
var DSML_BLOCK_RE = /<[||]DSML[||][^>]*>[\s\S]*?<\/[||]DSML[||][^>]*>/gi;
|
|
2646
|
-
var DSML_TAG_RE = /<\/?[||]DSML[||][^>]*>/gi;
|
|
2647
2645
|
var THINKING_TAG_RE = /<\s*\/?\s*(?:think(?:ing)?|thought|antthinking)\b[^>]*>/gi;
|
|
2648
2646
|
var THINKING_BLOCK_RE = /<\s*(?:think(?:ing)?|thought|antthinking)\b[^>]*>[\s\S]*?<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi;
|
|
2649
2647
|
function stripThinkingTokens(content) {
|
|
2650
2648
|
if (!content) return content;
|
|
2651
2649
|
let cleaned = content.replace(KIMI_BLOCK_RE, "");
|
|
2652
2650
|
cleaned = cleaned.replace(KIMI_TOKEN_RE, "");
|
|
2653
|
-
cleaned = cleaned.replace(DSML_BLOCK_RE, "");
|
|
2654
|
-
cleaned = cleaned.replace(DSML_TAG_RE, "");
|
|
2655
2651
|
cleaned = cleaned.replace(THINKING_BLOCK_RE, "");
|
|
2656
2652
|
cleaned = cleaned.replace(THINKING_TAG_RE, "");
|
|
2657
2653
|
return cleaned;
|