diff --git a/web/src/components/AgentArtifactsCard.vue b/web/src/components/AgentArtifactsCard.vue index 71cd9ab2..117b9960 100644 --- a/web/src/components/AgentArtifactsCard.vue +++ b/web/src/components/AgentArtifactsCard.vue @@ -7,11 +7,7 @@ :title="`打开 ${file.name}`" @click="openPreview(file)" > - +
{{ file.name }}
{{ getFileMetaLabel(file.path) }}
@@ -41,7 +37,7 @@ import { computed, ref } from 'vue' import { message } from 'ant-design-vue' import { Download, LoaderCircle, Save } from 'lucide-vue-next' import { threadApi } from '@/apis/agent_api' -import { getFileIcon, getFileIconColor } from '@/utils/file_utils' +import FileTypeIcon from '@/components/common/FileTypeIcon.vue' import { downloadViewerFile } from '@/apis/viewer_filesystem' const props = defineProps({ diff --git a/web/src/components/AgentChatComponent.vue b/web/src/components/AgentChatComponent.vue index fffd9885..0dfd106f 100644 --- a/web/src/components/AgentChatComponent.vue +++ b/web/src/components/AgentChatComponent.vue @@ -246,10 +246,10 @@
-
{{ file.name }}
@@ -274,10 +274,10 @@ :title="`打开 ${file.name}`" @click="openPanelPreview(file)" > -
{{ file.name }}
@@ -362,7 +362,8 @@ import { } from 'vue' import { message } from 'ant-design-vue' import { RefreshCw, SquareCheck } from 'lucide-vue-next' -import { getFileIcon, getFileIconColor, formatFileSize } from '@/utils/file_utils' +import { formatFileSize } from '@/utils/file_utils' +import FileTypeIcon from '@/components/common/FileTypeIcon.vue' import { generatePixelAvatar } from '@/utils/pixelAvatar' import { CheckCircleOutlined, @@ -720,9 +721,7 @@ const currentArtifactFiles = computed(() => .map((path) => ({ path, name: getPanelFileName({ path }), - meta: getArtifactMetaLabel(path), - icon: getFileIcon(path), - iconColor: getFileIconColor(path) + meta: getArtifactMetaLabel(path) })) ) const currentTodos = computed(() => { @@ -780,9 +779,7 @@ const currentStateFiles = computed(() => { key: path, path, name, - meta: [status, sizeLabel === '-' ? '' : sizeLabel, path].filter(Boolean).join(' · '), - icon: getFileIcon(name || path), - iconColor: getFileIconColor(name || path) + meta: [status, sizeLabel === '-' ? '' : sizeLabel, path].filter(Boolean).join(' · ') }) } diff --git a/web/src/components/AgentFilePreview.vue b/web/src/components/AgentFilePreview.vue index c3678426..a7fa9bcb 100644 --- a/web/src/components/AgentFilePreview.vue +++ b/web/src/components/AgentFilePreview.vue @@ -5,11 +5,7 @@ >
- + {{ filePath }}