diff --git a/ui/src/conversation-panel/components/content/items/failure.vue b/ui/src/conversation-panel/components/content/items/failure.vue index d5b5b87c7f9..aac779b9a9c 100644 --- a/ui/src/conversation-panel/components/content/items/failure.vue +++ b/ui/src/conversation-panel/components/content/items/failure.vue @@ -1,34 +1,16 @@ - - - + diff --git a/ui/src/conversation-panel/components/content/items/form.vue b/ui/src/conversation-panel/components/content/items/form.vue index 3876bd7d0b2..569a3dda552 100644 --- a/ui/src/conversation-panel/components/content/items/form.vue +++ b/ui/src/conversation-panel/components/content/items/form.vue @@ -59,8 +59,8 @@ const submit = async () => {
diff --git a/ui/src/conversation-panel/components/content/items/group-tool/index.vue b/ui/src/conversation-panel/components/content/items/group-tool/index.vue index ea121a6eed0..e5832420d06 100644 --- a/ui/src/conversation-panel/components/content/items/group-tool/index.vue +++ b/ui/src/conversation-panel/components/content/items/group-tool/index.vue @@ -19,6 +19,7 @@ const props = defineProps<{ content: ChatContent }>() // 相邻工具由 content-list 聚合,分组内按工具名选择专用展示。 const toolItems = computed(() => props.content.children ?? []) +const failedToolCount = computed(() => toolItems.value.filter((toolItem) => toolItem.status === 'FAIL' || toolItem.status === 'FAILURE').length) // 工具名(小写)→ 专用渲染器;新增工具时与 tool/index.vue 同步 const toolRenderers: Dict = { @@ -87,6 +88,11 @@ const isExpanded = computed({
diff --git a/ui/src/conversation-panel/components/content/items/group/index.vue b/ui/src/conversation-panel/components/content/items/group/index.vue index 78b1d832fd8..a669eb7d669 100644 --- a/ui/src/conversation-panel/components/content/items/group/index.vue +++ b/ui/src/conversation-panel/components/content/items/group/index.vue @@ -1,23 +1,6 @@ - - - + diff --git a/ui/src/conversation-panel/components/content/items/question.vue b/ui/src/conversation-panel/components/content/items/question.vue index d016a1dfaac..274a6e87cdb 100644 --- a/ui/src/conversation-panel/components/content/items/question.vue +++ b/ui/src/conversation-panel/components/content/items/question.vue @@ -23,7 +23,7 @@ type QuestionContent = { content?: string } & Partial() -// 合并各类已发送附件,统一换行排列;不依赖输入区的上传状态。 +// 非图片附件统一排列在上方,图片单独放在下方。 const attachmentFields = ['document_list', 'image_list', 'audio_list', 'video_list', 'other_list'] as const const attachments = computed(() => attachmentFields.flatMap((field) => @@ -36,6 +36,12 @@ const attachments = computed(() => })), ), ) +const attachmentGroups = computed(() => + [ + { type: 'file', files: attachments.value.filter((file) => file.field !== 'image_list') }, + { type: 'image', files: attachments.value.filter((file) => file.field === 'image_list') }, + ].filter((group) => group.files.length > 0), +) const imageSources = computed(() => attachments.value.filter((file) => file.field === 'image_list' && file.src).map((file) => file.src)) function getAttachmentDescription(file: QuestionAttachment) { @@ -46,42 +52,46 @@ function getAttachmentDescription(file: QuestionAttachment) {