From 3ba5779f12258de8cc09e51f4d6ff469f5fc91c2 Mon Sep 17 00:00:00 2001 From: Ethan-Zhang Date: Mon, 20 Oct 2025 08:19:41 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E5=A4=9A=E7=BB=84=E4=BB=B6=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/appCenter/appCenterService.ts | 1 + src/apis/paths/mcp.ts | 1 + src/components/dialoguePanel/DialogueFlow.vue | 4 +- .../dialoguePanel/DialoguePanel.scss | 5 +- .../dialoguePanel/DialoguePanel.vue | 41 ++- src/views/api/index.vue | 64 +++- src/views/app/index.vue | 23 +- src/views/createapp/components/McpDrawer.vue | 29 +- .../workFlowConfig/PluginListPanel.vue | 24 +- .../components/workFlowConfig/PluginNode.vue | 24 +- .../dialogue/components/AppInitalPreview.vue | 8 +- .../dialogue/components/DialogueSession.vue | 285 +++++++++++++++--- src/views/dialogue/components/MessageItem.vue | 20 +- 13 files changed, 437 insertions(+), 92 deletions(-) diff --git a/src/apis/appCenter/appCenterService.ts b/src/apis/appCenter/appCenterService.ts index b5553932..c4cac03f 100644 --- a/src/apis/appCenter/appCenterService.ts +++ b/src/apis/appCenter/appCenterService.ts @@ -22,6 +22,7 @@ export const queryAppList = ( applications: { appId: string; author: string; + authorName: string; description: string; favorited: boolean; appType: 'flow' | 'agent'; diff --git a/src/apis/paths/mcp.ts b/src/apis/paths/mcp.ts index 19313797..b4bd9851 100644 --- a/src/apis/paths/mcp.ts +++ b/src/apis/paths/mcp.ts @@ -23,6 +23,7 @@ const getMcpList = (params: { description: string; icon: string; author: string; + authorName: string; isActive: boolean; status: 'installing' | 'ready' | 'failed'; }, diff --git a/src/components/dialoguePanel/DialogueFlow.vue b/src/components/dialoguePanel/DialogueFlow.vue index cfd18a8d..ba127f4d 100644 --- a/src/components/dialoguePanel/DialogueFlow.vue +++ b/src/components/dialoguePanel/DialogueFlow.vue @@ -264,7 +264,7 @@ watch( />
@@ -272,7 +272,7 @@ watch(
diff --git a/src/components/dialoguePanel/DialoguePanel.scss b/src/components/dialoguePanel/DialoguePanel.scss index 242b11d5..0fc93aee 100644 --- a/src/components/dialoguePanel/DialoguePanel.scss +++ b/src/components/dialoguePanel/DialoguePanel.scss @@ -333,7 +333,9 @@ &-content { padding: 24px 24px 16px 24px; - border-top-right-radius: 8px; + border-radius: 8px; + border-top-left-radius: 0px; + background-color: var(--o-bg-color-base); overflow-wrap: break-word; text-align: justify; line-height: 24px; @@ -354,6 +356,7 @@ &-bottom { padding: 0px 24px; border-radius: 0 0 8px 8px; + background-color: var(--o-bg-color-light); .action-buttons { border-top: 1px dashed var(--o-border-color-light); diff --git a/src/components/dialoguePanel/DialoguePanel.vue b/src/components/dialoguePanel/DialoguePanel.vue index dee3b066..138fae2f 100644 --- a/src/components/dialoguePanel/DialoguePanel.vue +++ b/src/components/dialoguePanel/DialoguePanel.vue @@ -643,6 +643,7 @@ watch( }, ); + onBeforeUnmount(() => { isComment.value = 'none'; index.value = 0; @@ -756,7 +757,6 @@ const chatWithParams = async () => { !thoughtContent, }" > -
@@ -774,7 +774,6 @@ const chatWithParams = async () => { :flowdata="props.flowdata" /> -
@@ -1083,30 +1082,52 @@ const chatWithParams = async () => { transition: 200ms; } +/* 🔑 loading-icon旋转动画 */ +.loading-icon { + animation: rotate 1s linear infinite; +} + +@keyframes rotate { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + /* 🔑 目标分支:文件显示区域样式 */ .dialogue-panel__robot-file{ display: inline-block; - background-color: var(--o-bg-color-light); - border-radius: 4px; - padding: 5px 8px; - margin-bottom: 8px; + background-color: var(--o-bg-color-base); + border: 1px solid var(--o-border-color-lighter); + border-radius: 6px; + padding: 8px 12px; + margin-bottom: 12px; font-size: 14px; - line-height: 22px; - color: var(--o-text-color-secondary); + line-height: 20px; + color: var(--o-text-color-primary); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); .file-title{ display: flex; align-items: center; - gap: 2px; + gap: 4px; cursor: pointer !important; &:hover{ color: #7AA5FF; } img{ - margin-right: 2px; + width: 16px; + height: 16px; + margin-right: 4px; + } + span{ + font-weight: 500; } .el-icon{ color: var(--o-text-color-tertiary); + margin-left: auto; } } } diff --git a/src/views/api/index.vue b/src/views/api/index.vue index 13b5e8e6..95207c0a 100644 --- a/src/views/api/index.vue +++ b/src/views/api/index.vue @@ -200,7 +200,17 @@ @@ -2096,4 +2140,157 @@ button[disabled]:hover { } } +// 🔑 el-drawer文件源样式 +:deep(.file-source-drawer) { + .el-drawer__header { + padding: 0; + margin-bottom: 0; + border-bottom: 1px solid var(--o-border-color-lighter); + } + + .el-drawer__body { + padding: 0; + } +} + +.file-source__header { + padding: 16px 20px; + display: flex; + justify-content: space-between; + align-items: center; + + .file-source__title { + display: flex; + align-items: center; + gap: 8px; + font-size: 16px; + font-weight: 600; + color: var(--o-text-color-primary); + + span:last-child { + background: var(--o-color-primary); + color: white; + padding: 2px 8px; + border-radius: 12px; + font-size: 12px; + font-weight: 500; + } + } + + .el-icon { + cursor: pointer; + color: var(--o-text-color-tertiary); + + &:hover { + color: var(--o-text-color-primary); + } + } +} + +.file-source__content { + padding: 0; + + .file-source__item { + padding: 16px 20px; + border-bottom: 1px solid var(--o-border-color-extralight); + + &:hover { + background: var(--o-bg-color-light); + } + + .file-source__item-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-bottom: 8px; + + .file-source__item-header-left { + display: flex; + align-items: flex-start; + gap: 12px; + flex: 1; + + .file-source__order { + display: inline-flex; + align-items: center; + justify-content: center; + width: 20px; + height: 20px; + background: var(--o-color-primary); + color: white; + border-radius: 50%; + font-size: 12px; + font-weight: 600; + flex-shrink: 0; + } + + .file-source__type-icon { + flex-shrink: 0; + + .el-icon { + width: 20px; + height: 20px; + + img { + width: 100%; + height: 100%; + object-fit: contain; + } + } + } + + .file-source__name { + font-size: 14px; + font-weight: 500; + color: var(--o-text-color-primary); + line-height: 20px; + word-break: break-all; + } + } + + .file-source__download { + width: 20px; + height: 20px; + background: url('@/assets/svgs/file_download.svg') no-repeat center; + background-size: 16px 16px; + cursor: pointer; + opacity: 0.6; + flex-shrink: 0; + + &:hover { + background-image: url('@/assets/svgs/file_download_hover.svg'); + opacity: 1; + } + + &:active { + background-image: url('@/assets/svgs/file_download_active.svg'); + } + } + } + + .file-source__desc { + font-size: 12px; + color: var(--o-text-color-secondary); + line-height: 18px; + margin-bottom: 8px; + display: block; + word-break: break-all; + } + + .file-source__footer { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 11px; + color: var(--o-text-color-tertiary); + + span { + &:first-child { + color: var(--o-text-color-secondary); + } + } + } + } +} + diff --git a/src/views/dialogue/components/MessageItem.vue b/src/views/dialogue/components/MessageItem.vue index 8a2497a6..1c396ab4 100644 --- a/src/views/dialogue/components/MessageItem.vue +++ b/src/views/dialogue/components/MessageItem.vue @@ -62,7 +62,7 @@