@shun-js/aibaiban-server 1.5.2 → 1.5.4
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/package.json +2 -2
- package/server/service/CCService.js +7 -1
- package/views/index.html +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shun-js/aibaiban-server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"description": "aibaiban.com server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai aibaiban"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"access": "public",
|
|
47
47
|
"registry": "https://registry.npmjs.org/"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "7f7d8754ec587e3f6bdbf71a155d1bc3cea8c979"
|
|
50
50
|
}
|
|
@@ -53,7 +53,13 @@ exports.drawCC = async (req, res) => {
|
|
|
53
53
|
const duration = Date.now() - startTime;
|
|
54
54
|
|
|
55
55
|
// 解析 Claude Code 返回结果:[MERMAID]、[CLEAR_AND_MERMAID]、[REPLY]、[IRRELEVANT] 前缀
|
|
56
|
-
|
|
56
|
+
// 先剥离可能的外层包裹(反引号/代码块),防止 startsWith 匹配失败
|
|
57
|
+
let cleaned = result.trim();
|
|
58
|
+
cleaned = cleaned
|
|
59
|
+
.replace(/^```(?:mermaid)?\s*\n?/, "")
|
|
60
|
+
.replace(/\n?```\s*$/, "");
|
|
61
|
+
cleaned = cleaned.replace(/^`/, "").replace(/`$/, "");
|
|
62
|
+
const trimmed = cleaned.trim();
|
|
57
63
|
|
|
58
64
|
if (trimmed.startsWith("[CLEAR_AND_MERMAID]")) {
|
|
59
65
|
const code = trimmed.slice("[CLEAR_AND_MERMAID]".length).trim();
|
package/views/index.html
CHANGED
|
@@ -138,12 +138,12 @@
|
|
|
138
138
|
})(window, document, "clarity", "script", "t5b230u2zp");
|
|
139
139
|
}
|
|
140
140
|
</script>
|
|
141
|
-
<script type="module" crossorigin src="https://static-small.vincentqiao.com/aibaiban/static/index-
|
|
141
|
+
<script type="module" crossorigin src="https://static-small.vincentqiao.com/aibaiban/static/index-CcPpnpvD.js"></script>
|
|
142
142
|
<link rel="modulepreload" crossorigin href="https://static-small.vincentqiao.com/aibaiban/static/chunks/react-vendor-CaiCwcf5.js">
|
|
143
143
|
<link rel="modulepreload" crossorigin href="https://static-small.vincentqiao.com/aibaiban/static/chunks/antd-base-Bw-zHZ23.js">
|
|
144
144
|
<link rel="modulepreload" crossorigin href="https://static-small.vincentqiao.com/aibaiban/static/chunks/antd-icons-0xce1A8M.js">
|
|
145
145
|
<link rel="modulepreload" crossorigin href="https://static-small.vincentqiao.com/aibaiban/static/chunks/antd-x-CG94EGr-.js">
|
|
146
|
-
<link rel="modulepreload" crossorigin href="https://static-small.vincentqiao.com/aibaiban/static/chunks/excalidraw-
|
|
146
|
+
<link rel="modulepreload" crossorigin href="https://static-small.vincentqiao.com/aibaiban/static/chunks/excalidraw-DUA0iiyh.js">
|
|
147
147
|
<link rel="stylesheet" crossorigin href="https://static-small.vincentqiao.com/aibaiban/static/styles/index-TZrNw7dA.css">
|
|
148
148
|
</head>
|
|
149
149
|
<body>
|