From 34c0df53209d2503a61017860aecbf3e81f099c5 Mon Sep 17 00:00:00 2001 From: jing <1683105490@qq.com> Date: Fri, 9 Oct 2026 14:34:14 +0800 Subject: [PATCH 1/5] =?UTF-8?q?chore=EF=BC=9A=E5=BF=AB=E6=8D=B7=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E6=A0=87=E9=A2=98=EF=BC=8C=E6=8D=A2=E4=B8=80?= =?UTF-8?q?=E6=8D=A2=E6=8C=89=E9=92=AE=EF=BC=8C=E5=9B=BE=E7=89=87=E4=B9=8B?= =?UTF-8?q?=E9=97=B4=E7=A9=BA=E9=9A=99=E5=8F=98=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .local.config.js | 2 +- pages_tool/ai-chat/ai-chat-message.vue | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.local.config.js b/.local.config.js index 2342dda..69e0dc0 100644 --- a/.local.config.js +++ b/.local.config.js @@ -257,7 +257,7 @@ const localDevConfig = ({ // })['2811']; // 本地 // })['5g-317']; // 电磁兼容 // })['5g-351']; // - })['2843']; // 本地 + })['2881']; // 本地 // })['local-2']; // 本地 // })['local-11']; // 本地 // })['1-test']; // test diff --git a/pages_tool/ai-chat/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue index 38e75f3..06e0292 100644 --- a/pages_tool/ai-chat/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -4780,11 +4780,24 @@ _handleStreamError(msg) { background: #ffffff !important; } + // 欢迎语消息: 图片(机器人)与下方标题的间距加大, 对齐 WorkBuddy 参考稿 + // 图片是 v-html 插入的 , 不带 scoped 的 data-v 属性, + // 普通 img 选择器编译后会匹配不到, 必须用 ::v-deep 穿透 + &.is-welcome .ai-message .message-bubble ::v-deep img { + margin-bottom: 48rpx !important; + } + // 欢迎语消息: 隐藏上方时间戳 &.is-welcome .ai-message .message-nickname.ai-nickname { display: none; } + // 欢迎语消息: 标题与快捷问题的间距, 与"图片→标题"保持一致 (48rpx) + // 下方 5326 行的 .quick-questions-row 嵌套链更长、特异性更高, 必须 !important 覆盖 + &.is-welcome .quick-questions-row { + margin-top: 48rpx !important; + } + // 搜索定位 - 当前结果: 用柔和的浅绿底色提示 (WorkBuddy 风格, 无气泡 box-shadow) &.search-current { position: relative; @@ -5753,6 +5766,7 @@ _handleStreamError(msg) { height: 56rpx; padding: 0 20rpx; gap: 8rpx; + margin-top: 20rpx; .refresh-icon { width: 28rpx; From 0a0ce88d82d6cfd55b74518846d6f1e423eff151 Mon Sep 17 00:00:00 2001 From: jing <1683105490@qq.com> Date: Fri, 9 Oct 2026 14:45:08 +0800 Subject: [PATCH 2/5] =?UTF-8?q?chore=EF=BC=9A=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E7=AA=81=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages_tool/ai-chat/ai-chat-message.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pages_tool/ai-chat/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue index 06e0292..cdd1e62 100644 --- a/pages_tool/ai-chat/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -5336,7 +5336,7 @@ _handleStreamError(msg) { margin-bottom: 16rpx; padding: 12rpx 28rpx; background: #ffffff; - border: 1rpx solid #e4e6eb; + border: 1rpx solid #eef0f3; border-radius: 999rpx; font-size: 26rpx; color: #1a1a1a; @@ -5344,7 +5344,7 @@ _handleStreamError(msg) { transition: all 0.2s ease; max-width: 100%; line-height: 1.4; - box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08); + box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.14); &:last-child { margin-bottom: 0; @@ -5826,7 +5826,8 @@ _handleStreamError(msg) { border-radius: 999rpx; padding: 18rpx 14rpx 18rpx 32rpx; min-height: 108rpx; - box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06); + /* 与快捷问题按钮(.quick-question-chip)同款阴影, 白底更突出 */ + box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.14); /* 无文字时左侧语音图标,点击打开语音面板 PR-INPUT-LAYOUT-SYMMETRY (2026-09-28): 容器从 52rpx 扩大到 76rpx, @@ -5965,7 +5966,8 @@ _handleStreamError(msg) { background: #ffffff; border-radius: 28rpx; padding: 14rpx 16rpx 6rpx; - box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06); + /* 与快捷问题按钮(.quick-question-chip)同款阴影 */ + box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.14); } &.is-voice-mode .input-row-top, @@ -5978,20 +5980,21 @@ _handleStreamError(msg) { } } - /* 语音模式: 按住说话 */ + /* 语音模式: 按住说话 (白底 + 快捷问题同款阴影, 与输入胶囊风格统一) */ .voice-hold-btn { display: flex; align-items: center; justify-content: center; height: 96rpx; margin: 4rpx 0 8rpx; - border-radius: 16rpx; - background: #f2f2f3; + border-radius: 28rpx; + background: #ffffff; + box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.14); position: relative; // PR-FRONTEND-VOICE-INPUT: 让 .voice-cancel-hint 锚定到这里 transition: background-color 0.15s ease-out; &.is-holding { - background: #e2e2e4; + background: #f2f2f3; } // PR-FRONTEND-VOICE-INPUT (2026-09-24): 上滑到 80px+ 视为取消手势 From 817d2081d7b1b63114f53ffbcdf25aa809e7a204 Mon Sep 17 00:00:00 2001 From: jing <1683105490@qq.com> Date: Fri, 9 Oct 2026 16:21:27 +0800 Subject: [PATCH 3/5] =?UTF-8?q?chore=EF=BC=9A=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E8=BE=93=E5=85=A5=E6=97=B6=EF=BC=8C=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages_tool/ai-chat/ai-chat-message.vue | 86 +++++++++++++++++++------- 1 file changed, 62 insertions(+), 24 deletions(-) diff --git a/pages_tool/ai-chat/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue index cdd1e62..456471a 100644 --- a/pages_tool/ai-chat/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -529,17 +529,30 @@ ① 默认(未输入/未聚焦): 单行胶囊 —— 语音图标 + 输入框 + 加号 ② 语音模式(点语音图标进入): 「按住说话」按钮 + 底部工具栏(表情/模型/加号) ③ 文字输入(聚焦或有文字): 输入框独占一行 + 底部工具栏(语音/模型/加号/发送) --> - + - {{ voiceHoldText }} + class="voice-mode-row" + :class="{ 'is-holding': voiceHolding, 'is-cancelling': voiceHoldCancelling }"> + + + + + + + {{ voiceHoldText }} + + + {{ voiceHoldCancelling ? $lang('ai-chat.index.slideUpToCancelHint') : $lang('ai-chat.index.slideUpToCancel') }} @@ -587,14 +600,10 @@ - - - - - - + + - + @@ -5959,9 +5968,9 @@ _handleStreamError(msg) { background-size: contain; } - /* 展开态: 卡片变白底圆角容器, 内部输入行不再单独成胶囊 */ + /* 展开态: 文字输入时卡片变白底圆角容器; + 语音模式卡片保持透明, 白色胶囊由 .voice-mode-row 自身呈现 (避免双层白底) */ .input-card { - &.is-voice-mode, &.is-text-mode { background: #ffffff; border-radius: 28rpx; @@ -5970,7 +5979,13 @@ _handleStreamError(msg) { box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.14); } - &.is-voice-mode .input-row-top, + &.is-voice-mode { + background: transparent; + border-radius: 0; + padding: 0; + box-shadow: none; + } + &.is-text-mode .input-row-top { background: transparent; border-radius: 0; @@ -5980,17 +5995,18 @@ _handleStreamError(msg) { } } - /* 语音模式: 按住说话 (白底 + 快捷问题同款阴影, 与输入胶囊风格统一) */ - .voice-hold-btn { + /* 语音模式单行 (PR-VOICE-MODE-ONE-ROW-V2): 整行即白色胶囊(flex布局,不依赖绝对定位) + 键盘图标在左 / 按住说话占中间 / + 在右, 与参考稿一致 */ + .voice-mode-row { + position: relative; /* 「上滑取消」提示 .voice-cancel-hint 锚定到这里 */ display: flex; align-items: center; - justify-content: center; height: 96rpx; margin: 4rpx 0 8rpx; - border-radius: 28rpx; + padding: 0 10rpx 0 24rpx; + border-radius: 999rpx; background: #ffffff; box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.14); - position: relative; // PR-FRONTEND-VOICE-INPUT: 让 .voice-cancel-hint 锚定到这里 transition: background-color 0.15s ease-out; &.is-holding { @@ -6000,11 +6016,33 @@ _handleStreamError(msg) { // PR-FRONTEND-VOICE-INPUT (2026-09-24): 上滑到 80px+ 视为取消手势 &.is-cancelling { background: #fdecec; + .voice-hold-text { color: #d23f3f; } } + .voice-side-btn { + flex-shrink: 0; + display: flex; + align-items: center; + justify-content: center; + } + + .voice-side-right { + margin-left: 8rpx; + } + + /* 按住说话区域: 透明, 占据中间剩余全部空间 */ + .voice-hold-btn { + flex: 1; + height: 100%; + min-width: 0; + display: flex; + align-items: center; + justify-content: center; + } + .voice-hold-text { font-size: 30rpx; color: #1f1f1f; From 8488aa39bc4070f65f75c238b14ec62a289a744a Mon Sep 17 00:00:00 2001 From: jing <1683105490@qq.com> Date: Fri, 9 Oct 2026 16:33:42 +0800 Subject: [PATCH 4/5] =?UTF-8?q?chore=EF=BC=9A=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages_tool/ai-chat/ai-chat-message.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages_tool/ai-chat/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue index 456471a..ecaffa6 100644 --- a/pages_tool/ai-chat/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -5833,8 +5833,10 @@ _handleStreamError(msg) { justify-content: space-between; background: #ffffff; border-radius: 999rpx; - padding: 18rpx 14rpx 18rpx 32rpx; - min-height: 108rpx; + /* 高度与语音模式胶囊(.voice-mode-row: height 96rpx)保持一致: + 内部图标容器 76rpx + 上下 padding 10rpx*2 = 96rpx */ + padding: 10rpx 14rpx 10rpx 32rpx; + min-height: 96rpx; /* 与快捷问题按钮(.quick-question-chip)同款阴影, 白底更突出 */ box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.14); From e7dd6aff62c3d6b335ee2e8a424be8e59ef4537f Mon Sep 17 00:00:00 2001 From: jing <1683105490@qq.com> Date: Fri, 9 Oct 2026 16:56:05 +0800 Subject: [PATCH 5/5] =?UTF-8?q?chore=EF=BC=9A=E5=BE=AE=E4=BF=A1=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=9A=84AI=E6=99=BA=E8=83=BD=E5=AE=A2?= =?UTF-8?q?=E6=9C=8D=E6=A0=87=E9=A2=98=E5=92=8C=E5=9B=BE=E7=89=87=E4=B9=8B?= =?UTF-8?q?=E9=97=B4=E6=9C=89=E8=B7=9D=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages_tool/ai-chat/ai-chat-message.vue | 31 ++++++++++++++++---------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pages_tool/ai-chat/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue index ecaffa6..fe0ee3b 100644 --- a/pages_tool/ai-chat/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -234,10 +234,10 @@ - + - + @@ -250,10 +250,10 @@ - + - + @@ -3937,17 +3937,24 @@ _handleStreamError(msg) { }, // AI 消息渲染(含关键词高亮) - getAIDisplayContent(content) { + // isWelcome: 欢迎语消息 — 小程序端 mp-html 组件有样式隔离, 页面样式(::v-deep)进不去, + // 图片间距只能在内容层面改内联样式(机器人图片与下方标题的间距, 对齐 WorkBuddy 参考稿) + getAIDisplayContent(content, isWelcome) { + let html if (!this.searchKeyword || !content) { - return this.parseMarkdown(content) + html = this.parseMarkdown(content) + } else if (content.toLowerCase().indexOf(this.searchKeyword.toLowerCase()) === -1) { + html = this.parseMarkdown(content) + } else { + // 先做 markdown 渲染,再做关键词高亮 + const mdHtml = this.parseMarkdown(content) + html = this._wrapHighlightInHtml(mdHtml, this.searchKeyword) } - // 仅当内容包含关键词时才执行高亮,避免非匹配消息的额外处理 - if (content.toLowerCase().indexOf(this.searchKeyword.toLowerCase()) === -1) { - return this.parseMarkdown(content) + if (isWelcome && html) { + // 仅替换 img 的 margin(机器人图片), 不影响列表等其他元素的 margin:8rpx 0 + html = html.replace(/(]*style="[^"]*?)margin:\s*8rpx 0;/, '$1margin:0 0 48rpx 0;') } - // 先做 markdown 渲染,再做关键词高亮 - const mdHtml = this.parseMarkdown(content) - return this._wrapHighlightInHtml(mdHtml, this.searchKeyword) + return html }, // 在纯文本中高亮关键词(用于用户消息)