@yuntijs/ui 1.0.0-beta.97 → 1.0.0-beta.99
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.
|
@@ -17,7 +17,7 @@ var useStyles = createStyles(function (_ref) {
|
|
|
17
17
|
isDarkMode = _ref.isDarkMode;
|
|
18
18
|
return {
|
|
19
19
|
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n padding-block: 12px;\n color: ", ";\n "])), token.colorTextSecondary),
|
|
20
|
-
titlebox: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px;\n\n font-size: 12px;\n color: ", ";\n\n background: ", ";\n border-radius: 8px;\n "])), token.colorText, isDarkMode ? token.colorFillTertiary : '#f3f5fc')
|
|
20
|
+
titlebox: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px 12px;\n\n font-size: 12px;\n color: ", ";\n\n background: ", ";\n border-radius: 8px;\n "])), token.colorText, isDarkMode ? token.colorFillTertiary : '#f3f5fc')
|
|
21
21
|
};
|
|
22
22
|
});
|
|
23
23
|
var mProps = {
|
|
@@ -53,7 +53,7 @@ var Render = /*#__PURE__*/memo(function (_ref2) {
|
|
|
53
53
|
children: [/*#__PURE__*/_jsx(Icon, {
|
|
54
54
|
color: theme.purple,
|
|
55
55
|
icon: Sparkles
|
|
56
|
-
}), done ? "\u5DF2\u6DF1\u5EA6\u601D\u8003".concat(second ? '(用时' + second + '
|
|
56
|
+
}), done ? "\u5DF2\u6DF1\u5EA6\u601D\u8003".concat(second ? '(用时 ' + second + ' s)' : '', " ") : '思考中...']
|
|
57
57
|
}), /*#__PURE__*/_jsx(Icon, {
|
|
58
58
|
icon: showDetail ? ChevronDown : ChevronRight
|
|
59
59
|
})]
|
package/es/ChatMarkdown/utils.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// 预处理函数:确保 think 标签前后有两个换行符
|
|
2
2
|
export var normalizeThinkTags = function normalizeThinkTags(markdown) {
|
|
3
|
-
return markdown
|
|
3
|
+
return (markdown || ''
|
|
4
4
|
// 确保 <think> 标签前后有两个换行符
|
|
5
|
-
.replaceAll(/([^\n])\s*<think>/g, '$1\n\n<think>').replaceAll(/<think>\s*([^\n])/g, '<think>\n\n$1')
|
|
5
|
+
).replaceAll(/([^\n])\s*<think>/g, '$1\n\n<think>').replaceAll(/<think>\s*([^\n])/g, '<think>\n\n$1')
|
|
6
6
|
// 确保 </think> 标签前后有两个换行符
|
|
7
7
|
.replaceAll(/([^\n])\s*<\/think>/g, '$1\n\n</think>').replaceAll(/<\/think>\s*([^\n])/g, '</think>\n\n$1')
|
|
8
8
|
// 处理可能产生的多余换行符
|