From a2ffbb04ba05a866fe069c4bc70b680d8343a2f3 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Thu, 19 Mar 2026 18:32:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=A0=B7=E5=BC=8F=E5=92=8C=E7=BB=93=E6=9E=84=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=BC=BA=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/assets/css/extensions.less | 159 +++++++++++++++++- web/src/assets/icons/subagents.svg | 26 --- web/src/components/McpServersComponent.vue | 114 +------------ web/src/components/SkillsManagerComponent.vue | 39 +---- web/src/components/SubAgentsComponent.vue | 111 +----------- web/src/components/ToolsManagerComponent.vue | 35 +--- web/src/views/ExtensionsView.vue | 10 +- 7 files changed, 177 insertions(+), 317 deletions(-) delete mode 100644 web/src/assets/icons/subagents.svg diff --git a/web/src/assets/css/extensions.less b/web/src/assets/css/extensions.less index 267f130d..e4ba07d6 100644 --- a/web/src/assets/css/extensions.less +++ b/web/src/assets/css/extensions.less @@ -1,6 +1,7 @@ @border-color: var(--gray-150); @bg-secondary: var(--gray-10); @radius: 8px; +@mono-font: 'Monaco', 'Consolas', monospace; // Root container for extension pages to ensure 100% height .extension-page-root { @@ -43,7 +44,7 @@ padding: 12px; display: flex; flex-direction: column; - gap: 4px; + gap: 8px; } } @@ -52,16 +53,18 @@ border-radius: @radius; cursor: pointer; transition: all 0.2s; - border: 1px solid transparent; + border: 1px solid var(--gray-50); + background-color: var(--gray-0); &:hover { - background-color: var(--gray-100); + border-color: @border-color; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } &.active { background-color: var(--gray-0); border-color: @border-color; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); } .item-header { @@ -93,6 +96,20 @@ } } + .item-details { + display: flex; + flex-direction: column; + gap: 4px; + } + + .item-desc { + font-size: 12px; + color: var(--gray-400); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + &.active { .item-icon, @@ -106,12 +123,20 @@ } } +.list-item .item-details-inline { + flex-direction: row; + justify-content: space-between; + align-items: center; + gap: 8px; +} + +.item-meta { + font-size: 12px; + color: var(--gray-500); +} + .list-separator { - height: 1px; - background-color: var(--gray-150); - margin: 2px 12px; - opacity: 0.8; // Deepened from 0.5 to 0.8 - flex-shrink: 0; + display: none; } /* Main Panel */ @@ -155,6 +180,36 @@ align-items: center; gap: 10px; } + + .panel-title-row { + min-height: 32px; + } + + .panel-title-stack { + min-height: 32px; + display: flex; + flex-direction: column; + justify-content: center; + } + + .panel-title-meta { + font-size: 12px; + color: var(--gray-500); + border-radius: 4px; + margin-top: 4px; + display: inline-block; + user-select: text; + } + + .panel-title-icon { + color: var(--gray-700); + flex-shrink: 0; + } + + .panel-actions { + display: flex; + align-items: center; + } } } @@ -192,6 +247,22 @@ } } +.detail-tabs { + .tab-content { + padding: 16px; + min-height: 300px; + height: 100%; + overflow: auto; + } + + .empty-tab { + display: flex; + align-items: center; + justify-content: center; + min-height: 200px; + } +} + .tab-title { display: flex; align-items: center; @@ -199,6 +270,76 @@ font-size: 14px; } +.info-grid { + display: grid; + gap: 16px; + + .info-item { + display: flex; + flex-direction: column; + gap: 4px; + + label { + font-size: 12px; + color: var(--gray-500); + font-weight: 500; + } + + > span { + font-size: 14px; + color: var(--gray-900); + } + } +} + +.extension-form { + .form-item { + margin-bottom: 16px; + } +} + +.mono-text { + font-family: @mono-font; +} + +.code-inline { + font-family: @mono-font; + font-size: 13px; + background: var(--gray-50); + padding: 8px 12px; + border-radius: 4px; +} + +.code-pre { + font-family: @mono-font; + font-size: 12px; + background: var(--gray-50); + padding: 12px; + border-radius: 4px; + margin: 0; + overflow-x: auto; +} + +.code-panel { + background: var(--gray-50); + border: 1px solid var(--gray-150); + border-radius: @radius; + padding: 16px; +} + +.code-panel-pre { + margin: 0; + font-family: @mono-font; + font-size: 13px; + white-space: pre-wrap; + word-break: break-word; + color: var(--gray-700); +} + +.text-break-all { + word-break: break-all; +} + /* Common helpers */ .text-muted { color: var(--gray-400); diff --git a/web/src/assets/icons/subagents.svg b/web/src/assets/icons/subagents.svg deleted file mode 100644 index 3ffd446d..00000000 --- a/web/src/assets/icons/subagents.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/web/src/components/McpServersComponent.vue b/web/src/components/McpServersComponent.vue index 50b649d6..2707795c 100644 --- a/web/src/components/McpServersComponent.vue +++ b/web/src/components/McpServersComponent.vue @@ -67,7 +67,7 @@