前端优化

This commit is contained in:
2026-06-12 13:36:39 +08:00
parent f92ad5fab4
commit 522e88a6a2
11 changed files with 42 additions and 19 deletions
+1
View File
@@ -94,6 +94,7 @@
<MessageBubble
v-for="m in chat.messages"
:key="m.id"
v-memo="[m.id, m.content, m.status]"
:message="m"
@retry="onRetry"
/>
@@ -93,13 +93,10 @@
<script setup lang="ts">
import { computed } from 'vue'
import { NCollapse, NCollapseItem, NButton } from 'naive-ui'
import MarkdownIt from 'markdown-it'
import type { ChatMessage } from '@/api/chat'
import { md } from '@/utils/markdown'
import { parseInteractiveMessage, type InteractiveQuestionAnswer } from '@/utils/interactiveMessage'
import QuestionCard from './QuestionCard.vue'
const md = new MarkdownIt({ html: false, breaks: true, linkify: true })
// savable:仅需求阶段对话面板传 true,对成功的 assistant 回复显示「保存为产物」。
const props = defineProps<{ message: ChatMessage; savable?: boolean; answerDisabled?: boolean }>()
const emit = defineEmits<{