feat: 组件的数据结构调整

This commit is contained in:
2026-06-05 11:35:06 +08:00
parent 1be97986df
commit 3e06ae544b
7 changed files with 575 additions and 231 deletions

View File

@@ -33,6 +33,7 @@ import ChatMarkdown from "../../ChatMain/ChatMarkdown/index.vue";
import ChatLoading from "../../ChatMain/ChatLoading/index.vue";
import StreamManager from '@/utils/StreamManager.js';
import {
LONG_TEXT_KEYS,
getLongTextPreviewText,
getLongTextValue,
hasLongTextExtraSections,
@@ -55,12 +56,12 @@ const props = defineProps({
},
});
const tag = computed(() => getLongTextValue(props.longTextData, "tag"));
const title = computed(() => getLongTextValue(props.longTextData, "title"));
const tag = computed(() => getLongTextValue(props.longTextData, LONG_TEXT_KEYS.tag));
const title = computed(() => getLongTextValue(props.longTextData, LONG_TEXT_KEYS.title));
const longAnswerTagColor = ref(pickRandomTagToneColor());
const longAnswerTagStyle = computed(() => buildTagToneStyle(longAnswerTagColor.value));
const previewContent = computed(() => {
return getLongTextPreviewText(props.longTextData, ["content_summary"]);
return getLongTextPreviewText(props.longTextData, [LONG_TEXT_KEYS.contentSummary]);
});
// 处理文本内容:按行截断以保证预览最多显示两行(更贴近视觉行数)