diff --git a/ui/src/components/global/mk-source-card/index.vue b/ui/src/components/global/mk-source-card/index.vue index d178abb7ac6..c88e2ade722 100644 --- a/ui/src/components/global/mk-source-card/index.vue +++ b/ui/src/components/global/mk-source-card/index.vue @@ -69,7 +69,7 @@ function handleSelectedChange(selected: boolean | string | number) { :class="{ 'cursor-pointer': props.selectable && !props.disabled, active: props.selectable && props.selected }" :role="props.selectable ? 'checkbox' : undefined" :tabindex="props.selectable ? 0 : undefined" - :shadow="props.disabled ? 'always' : 'hover'" + :shadow="props.disabled ? 'never' : 'hover'" class="mk-source-card group relative" body-class="flex-column h-full" @click="handleSelect" diff --git a/ui/src/conversation-panel/loading/index.vue b/ui/src/conversation-panel/loading/index.vue deleted file mode 100644 index 33da0326bdd..00000000000 --- a/ui/src/conversation-panel/loading/index.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - diff --git a/ui/src/styles/element-plus.scss b/ui/src/styles/element-plus.scss index cb15a772941..df5126b34fd 100644 --- a/ui/src/styles/element-plus.scss +++ b/ui/src/styles/element-plus.scss @@ -428,6 +428,7 @@ .el-dialog { --el-dialog-padding-primary: 24px; --el-dialog-title-font-size: 16px; + --el-dialog-border-radius: 12px; padding: 0; &__header { padding: var(--el-dialog-padding-primary); diff --git a/ui/src/views/knowledge-detail/hit-test/index.vue b/ui/src/views/knowledge-detail/hit-test/index.vue index 50e9617880e..a46e6e4aa15 100644 --- a/ui/src/views/knowledge-detail/hit-test/index.vue +++ b/ui/src/views/knowledge-detail/hit-test/index.vue @@ -53,13 +53,17 @@ const paragraphDialogRef = useTemplateRef>( function canReadParagraph(paragraph: KnowledgeHitTestResult) { const isImage = paragraph.document_resource_type === DOCUMENT_RESOURCE_TYPE.IMAGE if (isSystemResource()) return isImage ? perm.knowledge.system.image.read() : perm.knowledge.system.docRead() - return !isWorkspaceResource() || (isImage ? perm.knowledge.workspace.image.read(knowledgeId.value) : perm.knowledge.workspace.docRead(knowledgeId.value)) + return ( + !isWorkspaceResource() || (isImage ? perm.knowledge.workspace.image.read(knowledgeId.value) : perm.knowledge.workspace.docRead(knowledgeId.value)) + ) } function canEditParagraph(paragraph: KnowledgeHitTestResult) { const isImage = paragraph.document_resource_type === DOCUMENT_RESOURCE_TYPE.IMAGE if (isSystemResource()) return isImage ? perm.knowledge.system.image.edit() : perm.knowledge.system.docEdit() - return !isWorkspaceResource() || (isImage ? perm.knowledge.workspace.image.edit(knowledgeId.value) : perm.knowledge.workspace.docEdit(knowledgeId.value)) + return ( + !isWorkspaceResource() || (isImage ? perm.knowledge.workspace.image.edit(knowledgeId.value) : perm.knowledge.workspace.docEdit(knowledgeId.value)) + ) } async function handleOpenParagraph(paragraph: KnowledgeHitTestResult) { @@ -198,14 +202,18 @@ function testKnowledge(query: Required - {{ `#${paragraphIndex + 1}` }} + {{ `#${paragraphIndex + 1}` }} - {{ title }} + {{ title }} - {{ paragraph.hit_unit_type === KNOWLEDGE_HIT_UNIT_TYPE.IMAGE ? '图片向量' : '文本向量' }} - {{ paragraph.similarity.toFixed(3) }} + + + {{ paragraph.hit_unit_type === KNOWLEDGE_HIT_UNIT_TYPE.IMAGE ? '图片向量' : '文本向量' }} + + {{ paragraph.similarity.toFixed(3) }} + 本次对话 - - - + 图片: + + + - - + + + 视频: + + + + - 视频 + {{ videoItem.url || videoItem }} - {{ item.text }} - {{ item }} - - - - {{ data.question || '-' }} - + + + + diff --git a/ui/src/workflow-canvas/nodes/ai-chat-node/details/knowledge.vue b/ui/src/workflow-canvas/nodes/ai-chat-node/details/knowledge.vue index 7c43a262b08..e1af8c9c3a4 100644 --- a/ui/src/workflow-canvas/nodes/ai-chat-node/details/knowledge.vue +++ b/ui/src/workflow-canvas/nodes/ai-chat-node/details/knowledge.vue @@ -25,37 +25,39 @@ defineProps<{ {{ data.system || '-' }} - + - 用户提示词 + 本次对话 - - - + 图片: + + + - - + + + 视频: + + + + - 视频 + {{ videoItem.url || videoItem }} - {{ item.text }} - {{ item }} - - - - {{ data.question || '-' }} - + + + + diff --git a/ui/src/workflow-canvas/nodes/application-node/details/index.vue b/ui/src/workflow-canvas/nodes/application-node/details/index.vue index 5382301b59c..8bd4c74d381 100644 --- a/ui/src/workflow-canvas/nodes/application-node/details/index.vue +++ b/ui/src/workflow-canvas/nodes/application-node/details/index.vue @@ -50,16 +50,15 @@ defineProps<{ 图片: - + + + diff --git a/ui/src/workflow-canvas/nodes/image-to-video-node/details/index.vue b/ui/src/workflow-canvas/nodes/image-to-video-node/details/index.vue index 615087b986b..770bd1cc2f5 100644 --- a/ui/src/workflow-canvas/nodes/image-to-video-node/details/index.vue +++ b/ui/src/workflow-canvas/nodes/image-to-video-node/details/index.vue @@ -39,22 +39,21 @@ defineProps<{ v-if="typeof data.first_frame_url === 'string'" :file="{ name: '首帧', status: 'success' }" :src="data.first_frame_url" - :size="32" + :size="58" :show-remove="false" :preview-src-list="[data.first_frame_url]" /> - + + + - @@ -68,22 +67,21 @@ defineProps<{ v-if="typeof data.last_frame_url === 'string'" :file="{ name: '末帧', status: 'success' }" :src="data.last_frame_url" - :size="32" + :size="58" :show-remove="false" :preview-src-list="[data.last_frame_url]" /> - + + + - diff --git a/ui/src/workflow-canvas/nodes/image-understand-node/details/application.vue b/ui/src/workflow-canvas/nodes/image-understand-node/details/application.vue index 9ae7f9534e9..870fcf75e95 100644 --- a/ui/src/workflow-canvas/nodes/image-understand-node/details/application.vue +++ b/ui/src/workflow-canvas/nodes/image-understand-node/details/application.vue @@ -35,7 +35,7 @@ defineProps<{ v-if="h.type === 'image_url'" :file="{ name: '图片', status: 'success' }" :src="h.image_url.url" - :size="104" + :size="58" :show-remove="false" :preview-src-list="[h.image_url.url]" /> @@ -62,10 +62,9 @@ defineProps<{ :key="i" :file="{ ...f, name: f.name || '图片', status: 'success' }" :src="f.url || (f.file_id ? `./oss/file/${f.file_id}` : '')" - :size="104" + :size="58" :show-remove="false" :preview-src-list="data.image_list.map((img: any) => img.url || (img.file_id ? `./oss/file/${img.file_id}` : ''))" - :initial-index="Number(i)" /> {{ data.question || '-' }} diff --git a/ui/src/workflow-canvas/nodes/image-understand-node/details/knowledge.vue b/ui/src/workflow-canvas/nodes/image-understand-node/details/knowledge.vue index 14d38a1b7e5..4fe32bbe464 100644 --- a/ui/src/workflow-canvas/nodes/image-understand-node/details/knowledge.vue +++ b/ui/src/workflow-canvas/nodes/image-understand-node/details/knowledge.vue @@ -23,7 +23,7 @@ defineProps<{ - 用户提示词 + 本次对话 @@ -32,10 +32,9 @@ defineProps<{ :key="i" :file="{ ...f, name: f.name || '图片', status: 'success' }" :src="f.url || (f.file_id ? `./oss/file/${f.file_id}` : '')" - :size="104" + :size="58" :show-remove="false" :preview-src-list="data.image_list.map((img: any) => img.url || (img.file_id ? `./oss/file/${img.file_id}` : ''))" - :initial-index="Number(i)" /> {{ data.question || '-' }} diff --git a/ui/src/workflow-canvas/nodes/reranker-node/details/index.vue b/ui/src/workflow-canvas/nodes/reranker-node/details/index.vue index 9ef0de7ef71..83c8be1d7f3 100644 --- a/ui/src/workflow-canvas/nodes/reranker-node/details/index.vue +++ b/ui/src/workflow-canvas/nodes/reranker-node/details/index.vue @@ -3,6 +3,7 @@ import DetailContainer from '@/workflow-canvas/execution-details/DetailContainer import BaseHeader from '@/workflow-canvas/execution-details/BaseHeader.vue' import { getFileUrl } from '@/utils/common' import { getFileIconUrl } from '@/utils/icon' +import { DOCUMENT_RESOURCE_TYPE } from '@/api/enums' import type { ExecutionNodeDetail } from '@/workflow-canvas/execution-details/types' defineOptions({ name: 'RerankerNodeDetail' }) @@ -25,85 +26,110 @@ defineProps<{ 重排内容 - - - - - - - #{{ Number(paragraphIndex) + 1 }} {{ paragraph.metadata?.title || '-' }} - + + + + + + {{ `#${Number(paragraphIndex) + 1}` }} + + {{ title }} + + + + + + {{ paragraph.metadata?.document_resource_type === DOCUMENT_RESOURCE_TYPE.IMAGE ? '图片向量' : '文本向量' }} + + {{ paragraph.metadata?.similarity != null ? Number(paragraph.metadata.similarity).toFixed(3) : '' }} - + - - - - - - - {{ paragraph.metadata.document_name }} - - - {{ paragraph.metadata.document_name.trim() }} - - - - + + + + + + + + + + {{ paragraph.metadata.document_name.trim() }} + + + + + + + {{ paragraph.metadata?.knowledge_name || '-' }} - - + + - - + - 重排结果 - - - - - - {{ Number(paragraphIndex) + 1 }}.{{ paragraph.metadata?.title || '-' }} - + + + + + + {{ `#${Number(paragraphIndex) + 1}` }} + + {{ title }} + + + + + + {{ paragraph.metadata?.document_resource_type === DOCUMENT_RESOURCE_TYPE.IMAGE ? '图片向量' : '文本向量' }} + + {{ paragraph.metadata?.relevance_score != null ? Number(paragraph.metadata.relevance_score).toFixed(3) : '' }} - + - - - - - - - {{ paragraph.metadata.document_name }} - - - {{ paragraph.metadata.document_name.trim() }} - - - - + + + + + + + + + + {{ paragraph.metadata.document_name.trim() }} + + + + + + + {{ paragraph.metadata?.knowledge_name || '-' }} - - + + - - + - diff --git a/ui/src/workflow-canvas/nodes/search-knowledge-node/details/index.vue b/ui/src/workflow-canvas/nodes/search-knowledge-node/details/index.vue index b903e5de094..b1889952d5a 100644 --- a/ui/src/workflow-canvas/nodes/search-knowledge-node/details/index.vue +++ b/ui/src/workflow-canvas/nodes/search-knowledge-node/details/index.vue @@ -4,9 +4,8 @@ import DetailContainer from '@/workflow-canvas/execution-details/DetailContainer import BaseHeader from '@/workflow-canvas/execution-details/BaseHeader.vue' import { getFileUrl } from '@/utils/common' import { getFileIconUrl } from '@/utils/icon' -import { DOCUMENT_RESOURCE_TYPE } from '@/api/enums' +import { DOCUMENT_RESOURCE_TYPE, KNOWLEDGE_HIT_UNIT_TYPE } from '@/api/enums' import type { DocumentResourceType, KnowledgeHitTestAsset } from '@/api/types' -import fileImageIcon from '@/assets/file-type/file-image-icon.svg' import type { ExecutionNodeDetail } from '@/workflow-canvas/execution-details/types' defineOptions({ name: 'SearchKnowledgeNodeDetail' }) @@ -56,58 +55,66 @@ function getParagraphImageUrl(paragraph: SearchParagraph) { 检索结果 - - - - - - #{{ paragraphIndex + 1 }} {{ paragraph.title || '-' }} - - {{ paragraph.similarity?.toFixed(3) }} + + + + + + {{ `#${paragraphIndex + 1}` }} + + {{ title }} - - - - - - - - - - {{ paragraph.document_name }} - - - {{ paragraph.document_name.trim() }} - - - - - {{ paragraph.knowledge_name || '-' }} - - + + + + + {{ paragraph.document_resource_type === KNOWLEDGE_HIT_UNIT_TYPE.IMAGE ? '图片向量' : '文本向量' }} + + {{ paragraph.similarity?.toFixed(3) }} + + + + + + + + + + + + + + + {{ paragraph.document_name.trim() }} + + + + + + + + {{ paragraph.knowledge_name || '-' }} + + + - - + -
图片:
视频: