From 5731c9d7cf59d946b6a94643244fdff5ed5fb284 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Thu, 14 May 2026 20:43:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A7=86=E8=A7=89=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/extensions/SkillCardList.vue | 3 +++ web/src/layouts/AppLayout.vue | 6 +++--- web/src/stores/agent.js | 15 ++++++++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/web/src/components/extensions/SkillCardList.vue b/web/src/components/extensions/SkillCardList.vue index 9806a96d..c37c22fd 100644 --- a/web/src/components/extensions/SkillCardList.vue +++ b/web/src/components/extensions/SkillCardList.vue @@ -448,6 +448,9 @@ defineExpose({ background: transparent; } +} + +.remote-install-panel { .panel-header-text { display: flex; flex-direction: column; diff --git a/web/src/layouts/AppLayout.vue b/web/src/layouts/AppLayout.vue index 1e1dd734..ff00aeb4 100644 --- a/web/src/layouts/AppLayout.vue +++ b/web/src/layouts/AppLayout.vue @@ -396,7 +396,7 @@ provide('settingsModal', { @sidebar-width: 252px; @sidebar-collapsed-width: 56px; @sidebar-padding: 6px 8px; -@sidebar-item-height: 40px; +@sidebar-item-height: 36px; @sidebar-item-padding-x: 10px; @sidebar-icon-size: 18px; @@ -545,7 +545,7 @@ div.header, background-color: transparent; color: var(--gray-700); font-size: 14px; - font-weight: 600; + font-weight: 450; transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, @@ -567,7 +567,7 @@ div.header, margin-left: 8px; overflow: hidden; line-height: 20px; - font-weight: 500; + font-weight: 450; text-overflow: ellipsis; white-space: nowrap; transition: diff --git a/web/src/stores/agent.js b/web/src/stores/agent.js index bc88aefa..9c894a9d 100644 --- a/web/src/stores/agent.js +++ b/web/src/stores/agent.js @@ -4,6 +4,19 @@ import { agentApi, databaseApi, mcpApi, skillApi } from '@/apis' import { handleChatError } from '@/utils/errorHandler' import { useUserStore } from '@/stores/user' +const CHATBOT_AGENT_ID = 'ChatbotAgent' + +function sortAgents(agents) { + return [...agents].sort((a, b) => { + const isAChatbotAgent = a.id === CHATBOT_AGENT_ID + const isBChatbotAgent = b.id === CHATBOT_AGENT_ID + + if (isAChatbotAgent && !isBChatbotAgent) return -1 + if (!isAChatbotAgent && isBChatbotAgent) return 1 + return a.id.localeCompare(b.id) + }) +} + export const useAgentStore = defineStore( 'agent', () => { @@ -184,7 +197,7 @@ export const useAgentStore = defineStore( try { const response = await agentApi.getAgents() - agents.value = response.agents + agents.value = sortAgents(response.agents || []) } catch (err) { console.error('Failed to fetch agents:', err) handleChatError(err, 'fetch')