@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/cli.js
CHANGED
|
@@ -2503,16 +2503,12 @@ function normalizeMessagesForThinking(messages) {
|
|
|
2503
2503
|
}
|
|
2504
2504
|
var KIMI_BLOCK_RE = /<[||][^<>]*begin[^<>]*[||]>[\s\S]*?<[||][^<>]*end[^<>]*[||]>/gi;
|
|
2505
2505
|
var KIMI_TOKEN_RE = /<[||][^<>]*[||]>/g;
|
|
2506
|
-
var DSML_BLOCK_RE = /<[||]DSML[||][^>]*>[\s\S]*?<\/[||]DSML[||][^>]*>/gi;
|
|
2507
|
-
var DSML_TAG_RE = /<\/?[||]DSML[||][^>]*>/gi;
|
|
2508
2506
|
var THINKING_TAG_RE = /<\s*\/?\s*(?:think(?:ing)?|thought|antthinking)\b[^>]*>/gi;
|
|
2509
2507
|
var THINKING_BLOCK_RE = /<\s*(?:think(?:ing)?|thought|antthinking)\b[^>]*>[\s\S]*?<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi;
|
|
2510
2508
|
function stripThinkingTokens(content) {
|
|
2511
2509
|
if (!content) return content;
|
|
2512
2510
|
let cleaned = content.replace(KIMI_BLOCK_RE, "");
|
|
2513
2511
|
cleaned = cleaned.replace(KIMI_TOKEN_RE, "");
|
|
2514
|
-
cleaned = cleaned.replace(DSML_BLOCK_RE, "");
|
|
2515
|
-
cleaned = cleaned.replace(DSML_TAG_RE, "");
|
|
2516
2512
|
cleaned = cleaned.replace(THINKING_BLOCK_RE, "");
|
|
2517
2513
|
cleaned = cleaned.replace(THINKING_TAG_RE, "");
|
|
2518
2514
|
return cleaned;
|