From b880a976c2b0ea80d1f8cbc4992033f852fc7e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=9D=E5=B0=98?= <237809796@qq.com> Date: Mon, 15 Jun 2026 17:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=202196c77=20workflow?= =?UTF-8?q?=E6=95=B4=E6=96=87=E4=BB=B6=E6=9B=BF=E6=8D=A2=E5=9B=9E=E9=80=80?= =?UTF-8?q?=E6=81=A2=E5=A4=8D(AiChat+Ideas=2012=E9=A1=B9=E5=8A=9F=E8=83=BD?= =?UTF-8?q?+=E5=A4=B4=E5=83=8F=E4=BD=8D=E7=BD=AE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: 批次1 workflow(2196c77)做 @/ 路径统一时对 AiChat.vue/Ideas.vue 做了整文件替换(非手术式编辑),把 6254d06 之后积累的功能改动全部抹掉。 AiChat.vue 恢复 12 项功能: - row-reverse 用户头像右侧布局 - groupedActive 对话按今天/昨天/更早分组 - archivedConvs 归档分组(可折叠) - confirmClearChat 清空对话二次确认 - showBackToBottom 回到底部按钮 - queue UI 生成中消息排队可视化 - 技能联想(/ 触发浮层) - token-usage 展示 - .ai-conv-group/item-actions/back-to-bottom/queue/skill 样式组 - onBeforeUnmount 补 stopListener() (CR-24 回归修复) Ideas.vue 恢复: - i18n 全量($t() 33处) - useConfirm + ConfirmDialog - useRendered/useMarkdown 描述渲染 - 过滤器 + 状态选项 + 晋升逻辑 vue-tsc 0 err / cargo check 0 err --- src/components/AiChat.vue | 1291 ++++++++++++++++++++----------------- src/views/Ideas.vue | 389 ++++++----- 2 files changed, 931 insertions(+), 749 deletions(-) diff --git a/src/components/AiChat.vue b/src/components/AiChat.vue index f130dd3..db58c58 100644 --- a/src/components/AiChat.vue +++ b/src/components/AiChat.vue @@ -4,44 +4,83 @@
- 对话 -
-
-
- - {{ conv.title || '新对话' }} - {{ formatTime(conv.updated_at) }} + + + + + +
- 暂无对话 + {{ $t('aiChat.emptyConversation') }}
@@ -52,7 +91,7 @@
- @@ -61,31 +100,35 @@ {{ $t('ai.assistant') }}
- + + @@ -97,33 +140,33 @@ class="ai-provider-bar" :class="{ 'ai-provider-bar--switchable': store.state.providers.length > 1 }" v-if="store.state.providers.length > 0" - :title="store.state.providers.length > 1 ? '点击切换 Provider' : ''" + :title="store.state.providers.length > 1 ? $t('aiChat.clickToSwitchProvider') : ''" @click="cycleProvider" > {{ activeProviderName }}
- 未配置 AI 提供商,请在设置中添加 + {{ $t('aiChat.providerNotConfigured') }}
-
+
@@ -153,8 +196,9 @@ v-if="msg.content || (isLastAi(msg) && store.state.currentText)" class="ai-msg-bubble ai-msg-bubble--ai ai-md" :class="{ 'ai-msg-bubble--error': msg.isError }" + :key="'md-' + msg.id + '-' + (isLastAi(msg) ? _mdRenderKey : 0)" > -
+
@@ -162,116 +206,90 @@
- -
-
- -
- - - -
- {{ toolDisplayName(tc) }} - 执行中... -
- -
- - -
-
-
-
-
- - -
- - -
- - -
-
- - {{ parseResult(tc.result)?.path }} - {{ parseResult(tc.result)?.lines || 0 }} 行 · {{ formatBytes(parseResult(tc.result)?.size) }} - -
-
{{ parseResult(tc.result)?.content }}
-
- - -
-
- - {{ parseResult(tc.result)?.path }} - {{ parseResult(tc.result)?.entries?.length || 0 }} 项 -
-
-
- - {{ entry.name }} - {{ formatBytes(entry.size) }} -
-
-
- - -
- - {{ parseResult(tc.result)?.path }} - {{ formatBytes(parseResult(tc.result)?.bytes_written) }} 已写入 -
- - -
- {{ formatToolResult(tc) }} -
-
+ +
+ 🔣 + {{ formatTokens(store.state.lastTokenUsage.prompt) }} in · {{ formatTokens(store.state.lastTokenUsage.completion) }} out
+ + +
- + + + + + +
+ +
+
+ {{ $t('aiChat.queueTitle', { n: store.state.queue.length }) }} + +
+
+
+ /{{ item.skill }} + {{ item.text }} + +
+
+
+ +
+ /{{ pendingSkill.name }} + {{ pendingSkill.description }} + +
+ +
+
+ {{ store.state.skills.length ? $t('aiChat.skillNoMatch') : $t('aiChat.skillNotLoaded') }} +
+
+ /{{ s.name }} + {{ s.description }} + {{ s.source }} +
+
-
Enter 发送 · Shift+Enter 换行
+
{{ $t('aiChat.inputHint') }}
+ + + + +
{{ toast.msg }}
+
@@ -656,25 +636,14 @@ watch(() => route.params.id, (newId) => { overflow: hidden; } -.debate-column.positive .confidence-bar::after { - content: ''; - position: absolute; - left: 0; - top: 0; +.confidence-fill { height: 100%; - background: currentColor; border-radius: var(--df-radius-xs); + transition: width 0.4s; } -.debate-column.negative .confidence-bar::after { - content: ''; - position: absolute; - left: 0; - top: 0; - height: 100%; - background: currentColor; - border-radius: var(--df-radius-xs); -} +.debate-column.positive .confidence-fill { background: var(--df-success); } +.debate-column.negative .confidence-fill { background: var(--df-danger); } .confidence-text { font-size: 11px; @@ -792,6 +761,23 @@ watch(() => route.params.id, (newId) => { background: var(--df-accent-hover); } +.eval-error { + margin-top: 8px; + font-size: 12px; + color: var(--df-danger); +} + +.eval-mode-tag { + font-size: 11px; + font-weight: 400; + padding: 1px 8px; + border-radius: var(--df-radius-xs); + background: rgba(255, 217, 61, 0.15); + color: var(--df-warning); + margin-left: 6px; + vertical-align: middle; +} + /* ===== 右侧详情 ===== */ .idea-detail-panel { background: var(--df-bg-card); @@ -825,6 +811,63 @@ watch(() => route.params.id, (newId) => { margin-bottom: var(--df-gap-page); } +/* ===== 灵感描述 Markdown 渲染(B-260615-25,样式同 TaskDetail B-24 .ai-md 收敛) ===== */ +.detail-desc.ai-md { white-space: normal; color: var(--df-text-secondary); } +.detail-desc.ai-md :deep(p) { margin: 0 0 6px; } +.detail-desc.ai-md :deep(p:last-child) { margin-bottom: 0; } +.detail-desc.ai-md :deep(ul), .detail-desc.ai-md :deep(ol) { margin: 4px 0; padding-left: 20px; } +.detail-desc.ai-md :deep(li) { margin: 2px 0; line-height: 1.5; } +.detail-desc.ai-md :deep(code) { + font-family: var(--df-font-mono); + font-size: 12px; + padding: 1px 5px; + background: rgba(255,255,255,0.06); + border-radius: var(--df-radius-sm); + color: var(--df-accent); +} +.detail-desc.ai-md :deep(pre) { + margin: 8px 0; + padding: 10px 12px; + background: var(--df-bg); + border: 0.5px solid var(--df-border); + border-radius: var(--df-radius); + overflow-x: auto; +} +.detail-desc.ai-md :deep(pre code) { + padding: 0; + background: transparent; + border-radius: 0; + color: var(--df-text-secondary); + font-size: 12px; + line-height: 1.5; +} +.detail-desc.ai-md :deep(blockquote) { + margin: 6px 0; + padding: 4px 12px; + border-left: 2px solid var(--df-accent); + color: var(--df-text-secondary); +} +.detail-desc.ai-md :deep(h1), .detail-desc.ai-md :deep(h2), .detail-desc.ai-md :deep(h3) { + font-weight: 500; + color: var(--df-text); + margin: 8px 0 4px; +} +.detail-desc.ai-md :deep(h1) { font-size: 16px; } +.detail-desc.ai-md :deep(h2) { font-size: 14px; } +.detail-desc.ai-md :deep(h3) { font-size: 13px; } +.detail-desc.ai-md :deep(a) { color: var(--df-accent); text-decoration: none; } +.detail-desc.ai-md :deep(a:hover) { text-decoration: underline; } +.detail-desc.ai-md :deep(strong) { font-weight: 500; color: var(--df-text); } +.detail-desc.ai-md :deep(hr) { border: none; border-top: 0.5px solid var(--df-border); margin: 8px 0; } +.detail-desc.ai-md :deep(table) { + width: 100%; border-collapse: collapse; margin: 6px 0; + font-size: 12px; overflow-x: auto; display: block; +} +.detail-desc.ai-md :deep(th), .detail-desc.ai-md :deep(td) { + padding: 4px 8px; border: 0.5px solid var(--df-border); text-align: left; +} +.detail-desc.ai-md :deep(th) { font-weight: 500; background: var(--df-bg); } + .detail-section { margin-bottom: var(--df-gap-page); }