chore:智能用户和回答都字号都25,不加粗

This commit is contained in:
2026-09-30 10:49:08 +08:00
parent ce705d9d61
commit f555b8a946

View File

@@ -2967,7 +2967,7 @@ _handleStreamError(msg) {
// 之前行内代码是粉色(#d63384)、删除线是灰色(#999), 回答里颜色太杂。
t = t
.replace(/`([^`]+)`/g, '<code style="background:#f2f3f5;padding:2rpx 10rpx;border-radius:6rpx;font-size:24rpx;font-family:monospace;color:' + TEXT + ';">$1</code>')
.replace(/\*\*(.+?)\*\*/g, '<strong style="font-weight:700;color:' + TEXT + ';">$1</strong>')
.replace(/\*\*(.+?)\*\*/g, '<span style="color:' + TEXT + ';">$1</span>')
.replace(/\*(.+?)\*/g, '<em style="font-style:italic;color:' + TEXT + ';">$1</em>')
.replace(/~~(.+?)~~/g, '<del style="text-decoration:line-through;color:' + TEXT + ';">$1</del>')
@@ -3018,7 +3018,7 @@ _handleStreamError(msg) {
const flushTable = () => {
if (!inTable || tableRows.length === 0) return
const thead = tableRows[0].map(c =>
`<th style="padding:8rpx 12rpx;border:1rpx solid #eaecef;font-weight:600;background:#f6f8fa;text-align:left;font-size:24rpx;color:${TEXT};">${parseInline(c)}</th>`
`<th style="padding:8rpx 12rpx;border:1rpx solid #eaecef;font-weight:400;background:#f6f8fa;text-align:left;font-size:24rpx;color:${TEXT};">${parseInline(c)}</th>`
).join('')
const tbody = tableRows.slice(1).map(row =>
'<tr>' + row.map(c =>
@@ -3066,7 +3066,7 @@ _handleStreamError(msg) {
flushBuf(); out.push(closeList())
const lv = hMatch[1].length
const size = ['', '36rpx', '32rpx', '30rpx', '28rpx', '26rpx', '24rpx'][lv]
const wgt = ['', '700', '700', '600', '600', '500', '500'][lv]
const wgt = ['', '400', '400', '400', '400', '400', '400'][lv]
const mg = COMPACT ? ['', '14rpx 0 7rpx', '12rpx 0 6rpx', '10rpx 0 5rpx', '8rpx 0 5rpx', '7rpx 0 3rpx', '6rpx 0 3rpx'][lv] : ['', '20rpx 0 10rpx', '16rpx 0 8rpx', '14rpx 0 6rpx', '12rpx 0 6rpx', '10rpx 0 4rpx', '8rpx 0 4rpx'][lv]
out.push(`<h${lv} style="font-size:${size};font-weight:${wgt};margin:${mg};line-height:1.35;color:${TEXT};">${parseInline(hMatch[2])}</h${lv}>`)
continue
@@ -4869,7 +4869,7 @@ _handleStreamError(msg) {
color: #1a1a1a;
strong {
font-weight: 600;
font-weight: 400;
color: #1a1a1a;
}
@@ -5436,7 +5436,7 @@ _handleStreamError(msg) {
max-width: 100%;
.message-text {
font-size: 20rpx !important; // 还原为用户消息原字号
font-size: 25rpx !important; // 还原为用户消息原字号
}
&::before {
@@ -5520,10 +5520,17 @@ _handleStreamError(msg) {
}
}
// AI 回答文字字号统一为 25rpx
.message-text,
.ai-message-text {
font-size: 25rpx !important;
line-height: 1.7;
}
// 微信端 AI 富文本(豆包风格)容器: 行高/字号/字色统一兜底
.ai-message-rich {
display: block;
font-size: 30rpx;
font-size: 25rpx;
line-height: 1.75;
color: #1a1a1a;
letter-spacing: 0.2rpx;
@@ -6567,6 +6574,20 @@ _handleStreamError(msg) {
line-height: 1.7;
letter-spacing: 0.8rpx;
}
// AI 回答不加粗(兜底),同时统一 H5 markdown 容器字号为 25rpx
.ai-message {
.message-bubble,
.selectable-md {
strong, b, h1, h2, h3, h4, h5, h6, th {
font-weight: normal !important;
}
}
.selectable-md {
font-size: 25rpx !important;
}
}
}
/* ========== AI 回答: 无气泡 ==========