@blockrun/clawrouter 0.8.12 → 0.8.13
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 +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2503,12 +2503,16 @@ 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;
|
|
2506
2508
|
var THINKING_TAG_RE = /<\s*\/?\s*(?:think(?:ing)?|thought|antthinking)\b[^>]*>/gi;
|
|
2507
2509
|
var THINKING_BLOCK_RE = /<\s*(?:think(?:ing)?|thought|antthinking)\b[^>]*>[\s\S]*?<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi;
|
|
2508
2510
|
function stripThinkingTokens(content) {
|
|
2509
2511
|
if (!content) return content;
|
|
2510
2512
|
let cleaned = content.replace(KIMI_BLOCK_RE, "");
|
|
2511
2513
|
cleaned = cleaned.replace(KIMI_TOKEN_RE, "");
|
|
2514
|
+
cleaned = cleaned.replace(DSML_BLOCK_RE, "");
|
|
2515
|
+
cleaned = cleaned.replace(DSML_TAG_RE, "");
|
|
2512
2516
|
cleaned = cleaned.replace(THINKING_BLOCK_RE, "");
|
|
2513
2517
|
cleaned = cleaned.replace(THINKING_TAG_RE, "");
|
|
2514
2518
|
return cleaned;
|