From a2f35cbeb2b7edaeaa8e57ee3284e8e424a35739 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Thu, 26 Mar 2026 03:24:24 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=9B=B4=E6=96=B0=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=E6=A0=B7=E5=BC=8F=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E9=A2=9C=E8=89=B2=E5=92=8C=E5=B8=83=E5=B1=80=E4=BB=A5?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E5=8F=AF=E8=AF=BB=E6=80=A7=E5=92=8C=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/assets/css/extensions.less | 73 ++++++++++- web/src/components/AgentChatComponent.vue | 23 +++- web/src/components/SubAgentsComponent.vue | 126 +++++++++++-------- web/src/components/ToolsManagerComponent.vue | 36 +----- web/src/layouts/AppLayout.vue | 2 +- 5 files changed, 161 insertions(+), 99 deletions(-) diff --git a/web/src/assets/css/extensions.less b/web/src/assets/css/extensions.less index 0b0e603b..45b46a64 100644 --- a/web/src/assets/css/extensions.less +++ b/web/src/assets/css/extensions.less @@ -53,7 +53,7 @@ border-radius: @radius; cursor: pointer; transition: all 0.2s; - border: 1px solid var(--gray-50); + border: 1px solid var(--gray-100); background-color: var(--gray-0); &:hover { @@ -81,7 +81,7 @@ align-items: center; justify-content: center; flex-shrink: 0; - color: var(--gray-400); + color: var(--gray-700); font-size: 14px; // For emoji icons } @@ -104,7 +104,7 @@ .item-desc { font-size: 12px; - color: var(--gray-400); + color: var(--gray-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -117,7 +117,7 @@ } .item-name { - color: var(--gray-900); + color: var(--main-700); } } } @@ -131,7 +131,7 @@ .item-meta { font-size: 12px; - color: var(--gray-500); + color: var(--gray-700); } .list-separator { @@ -400,3 +400,66 @@ pointer-events: none; transition: opacity 0.2s; } + +/* Detail sections - shared between Tools and SubAgents */ +.detail-section-container { + padding: 16px; + flex: 1; + overflow-y: auto; + + .detail-section { + margin-bottom: 20px; + + &:last-child { + margin-bottom: 0; + } + + .section-header { + display: flex; + align-items: center; + gap: 6px; + font-size: 13px; + font-weight: 600; + color: var(--gray-700); + margin-bottom: 8px; + + svg { + color: var(--gray-500); + } + } + + .section-content { + font-size: 13px; + color: var(--gray-600); + line-height: 1.6; + + &.description { + white-space: pre-wrap; + word-break: break-word; + } + + &.meta-info { + .meta-item { + display: flex; + gap: 12px; + font-size: 13px; + color: var(--gray-600); + margin-bottom: 4px; + + &:last-child { + margin-bottom: 0; + } + + .meta-label { + color: var(--gray-500); + min-width: 60px; + } + + .meta-value { + color: var(--gray-700); + } + } + } + } + } +} diff --git a/web/src/components/AgentChatComponent.vue b/web/src/components/AgentChatComponent.vue index 3aeb060a..b9246a09 100644 --- a/web/src/components/AgentChatComponent.vue +++ b/web/src/components/AgentChatComponent.vue @@ -63,6 +63,10 @@ 新对话 +
-

👋 您好,我是{{ currentAgentName }}!

+

{{ randomGreeting }}

@@ -276,6 +280,7 @@ const { } = storeToRefs(agentStore) const { organization } = storeToRefs(infoStore) + // ==================== LOCAL CHAT & UI STATE ==================== const userInput = ref('') const sendCooldownActive = ref(false) @@ -285,6 +290,18 @@ const useRunsApi = import.meta.env.VITE_USE_RUNS_API === 'true' && localStorage.getItem('force_legacy_stream') !== 'true' +// 预设的打招呼文本 +const greetingMessages = [ + '👋 您好,有什么可以帮您?', + '👋 你好!有什么想聊的吗?', + '👋 嘿,有什么我可以帮助你的?', + '👋 欢迎!今天想讨论什么话题?', + '👋 你好呀,随时为你服务!' +] + +// 随机选择一个打招呼文本 +const randomGreeting = greetingMessages[Math.floor(Math.random() * greetingMessages.length)] + // 从智能体元数据获取示例问题 const exampleQuestions = computed(() => { const agentId = currentAgentId.value @@ -1630,8 +1647,8 @@ watch(currentChatId, (threadId, oldThreadId) => { } .conversation-title { - font-size: 14px; - font-weight: 500; + font-size: 15px; + font-weight: 400; color: var(--text-primary); max-width: 200px; overflow: hidden; diff --git a/web/src/components/SubAgentsComponent.vue b/web/src/components/SubAgentsComponent.vue index 5a6473fe..55356365 100644 --- a/web/src/components/SubAgentsComponent.vue +++ b/web/src/components/SubAgentsComponent.vue @@ -89,61 +89,80 @@
- - - - -
-
-
- - {{ currentAgent.description }} -
-
- - {{ currentAgent.model }} -
-
- - - - {{ tool }} - - -
-
- - 内置 -
-
- - {{ formatTime(currentAgent.created_at) }} -
-
- - {{ formatTime(currentAgent.updated_at) }} -
-
- - {{ currentAgent.created_by }} -
-
+
+
+
+ + 系统提示词
- - - - -
+
{{ currentAgent.system_prompt }}
- - +
+ +
+
+ + 描述 +
+
+ {{ currentAgent.description }} +
+
+ +
+
+ + 模型覆盖 +
+
+ {{ currentAgent.model }} +
+
+ +
+
+ + 工具 +
+
+ {{ tool }} +
+
+ +
+
+ + 类型 +
+
+ 内置 +
+
+ +
+
+ + 元信息 +
+
+
+ 创建时间 + {{ formatTime(currentAgent.created_at) }} +
+
+ 更新时间 + {{ formatTime(currentAgent.updated_at) }} +
+
+ 创建人 + {{ currentAgent.created_by }} +
+
+
+
@@ -207,7 +226,7 @@