Skip to content

Commit 02fd472

Browse files
author
linyuan.yang
committed
调整UI样式
1 parent cf1ed27 commit 02fd472

6 files changed

Lines changed: 24 additions & 23 deletions

File tree

‎packages/admin/src/components/MessageList.vue‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ async function fetchFn(url: string) {
7373
通用 UI 色彩走 sui token;chat 业务专属色(human/think 等紫蓝)保留 hex,由本文件单点维护。 -->
7474
<style>
7575
body {
76-
--chatui-bg-human: var(--sui-fg);
77-
--chatui-fg-human: var(--sui-on-primary);
76+
--chatui-bg-human: var(--sui-bg-soft);
77+
--chatui-fg-human: var(--sui-fg);
78+
--chatui-border-human: var(--sui-border);
7879
--chatui-bg-ai: var(--sui-bg-soft);
7980
--chatui-fg-ai: var(--sui-fg);
8081
--chatui-bg-tool: var(--sui-tool-bg);
@@ -89,7 +90,9 @@ body {
8990
--chatui-think-border: #ddd6fe;
9091
}
9192
html[data-theme="dark"] body {
92-
--chatui-bg-human: #2d4a8a;
93+
--chatui-bg-human: #333333;
94+
--chatui-fg-human: #ededed;
95+
--chatui-border-human: rgba(255, 255, 255, 0.14);
9396
--chatui-bg-tool: rgba(120, 100, 40, 0.2);
9497
--chatui-fg-tool: #fbbf24;
9598
--chatui-bg-code: rgba(255, 255, 255, 0.06);

‎packages/admin/src/views/chat/ChatView.vue‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ html[data-theme="dark"] {
6666
--chatui-btn-hover: #4078e6;
6767
--chatui-btn-danger: #f87171;
6868
69-
--chatui-bg-human: #2d4a8a;
70-
--chatui-fg-human: #e0e0e0;
69+
--chatui-bg-human: #333333;
70+
--chatui-fg-human: #ededed;
71+
--chatui-border-human: rgba(255, 255, 255, 0.14);
7172
--chatui-bg-ai: #2a2a2a;
7273
--chatui-fg-ai: #e0e0e0;
7374
--chatui-bg-tool: rgba(120, 100, 40, 0.2);

‎packages/chat-ui/src/components/MessageList.vue‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function contentCharLen(content?: DisplayContent): number {
181181
<span v-if="isCommand(msg)" class="msg-kind-tag msg-kind-command">{{ L.commandTag }}</span>
182182
<span v-if="isException(msg)" class="msg-kind-tag msg-kind-exception">{{ L.exceptionTag }}</span>
183183
<span v-if="msg.createdAt" class="msg-time">{{ fmtTs(msg.createdAt) }}</span>
184-
<div v-if="msg.thinkId && thinksUrlPrefix" class="think-toggle think-toggle-human" @click="openThink(msg.thinkId!, msg.taskId)">
184+
<div v-if="msg.thinkId && thinksUrlPrefix" class="think-toggle" @click="openThink(msg.thinkId!, msg.taskId)">
185185
<span>▸</span><span>{{ L.think }}</span>
186186
</div>
187187
</div>
@@ -372,9 +372,11 @@ function contentCharLen(content?: DisplayContent): number {
372372
line-height: 1.5;
373373
overflow-wrap: break-word;
374374
}
375+
/* 底色是中性灰,与 AI 侧对比很弱 —— 靠一圈细边框把气泡边界撑出来 */
375376
.msg-bubble.human {
376377
background: var(--chatui-bg-human);
377378
color: var(--chatui-fg-human);
379+
border: 1px solid var(--chatui-border-human, var(--chatui-border));
378380
border-bottom-right-radius: 2px;
379381
}
380382
.msg-bubble.ai {
@@ -642,17 +644,6 @@ function contentCharLen(content?: DisplayContent): number {
642644
0%, 100% { opacity: 0.3; }
643645
50% { opacity: 1; }
644646
}
645-
.think-toggle-human {
646-
background: rgba(255, 255, 255, 0.15);
647-
border-color: rgba(255, 255, 255, 0.3);
648-
color: #e9d5ff;
649-
}
650-
.think-toggle-human:hover {
651-
background: rgba(255, 255, 255, 0.25);
652-
border-color: rgba(255, 255, 255, 0.4);
653-
color: #fff;
654-
}
655-
656647
/* Queued */
657648
.msg-bubble.queued { opacity: 0.6; }
658649
.msg-queued-tag {

‎packages/chat-ui/src/themes/theme-dark.css‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
--chatui-btn-danger: #f87171;
2121

2222
/* ── Messages ── */
23-
--chatui-bg-human: #2d4a8a;
24-
--chatui-fg-human: #e0e0e0;
23+
/* 用户气泡走中性灰而非饱和蓝:长对话里大色块太抢视线 */
24+
--chatui-bg-human: #333333;
25+
--chatui-fg-human: #ededed;
26+
--chatui-border-human: rgba(255, 255, 255, 0.14);
2527
--chatui-bg-ai: #2a2a2a;
2628
--chatui-fg-ai: #e0e0e0;
2729
--chatui-bg-tool: rgba(120, 100, 40, 0.2);

‎packages/chat-ui/src/themes/theme-light.css‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
--chatui-btn-danger: #ef4444;
2121

2222
/* ── Messages ── */
23-
--chatui-bg-human: #1c1c1c;
24-
--chatui-fg-human: #ffffff;
23+
/* 用户气泡走中性灰而非反色黑块:长对话里大色块太抢视线 */
24+
--chatui-bg-human: #ebe9e6;
25+
--chatui-fg-human: #1c1c1c;
26+
--chatui-border-human: #ddd9d4;
2527
--chatui-bg-ai: #f5f4f2;
2628
--chatui-fg-ai: #1c1c1c;
2729
--chatui-bg-tool: rgba(254, 252, 232, 0.35);

‎packages/chat-ui/src/themes/theme-vscode.css‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
--chatui-btn-danger: var(--vscode-errorForeground, #f48771);
2727

2828
/* ── Messages ── */
29-
--chatui-bg-human: var(--vscode-button-background, #0e639c);
30-
--chatui-fg-human: var(--vscode-button-foreground, #ffffff);
29+
/* 用户气泡取输入框底色(中性)而非按钮蓝:长对话里大色块太抢视线 */
30+
--chatui-bg-human: var(--vscode-input-background, rgba(255, 255, 255, 0.10));
31+
--chatui-fg-human: var(--vscode-input-foreground, var(--vscode-foreground, #d4d4d4));
32+
--chatui-border-human: var(--vscode-widget-border, rgba(255, 255, 255, 0.14));
3133
--chatui-bg-ai: var(--vscode-editor-inactiveSelectionBackground, rgba(255, 255, 255, 0.08));
3234
--chatui-fg-ai: var(--vscode-foreground, #d4d4d4);
3335
--chatui-bg-tool: rgba(120, 100, 40, 0.15);

0 commit comments

Comments
 (0)