diff --git a/src/pages/ChatMain/ChatLongAnswer/ParsedValueView.vue b/src/pages/ChatMain/ChatLongAnswer/ParsedValueView.vue index cbc73d6..1fd5cd4 100644 --- a/src/pages/ChatMain/ChatLongAnswer/ParsedValueView.vue +++ b/src/pages/ChatMain/ChatLongAnswer/ParsedValueView.vue @@ -33,7 +33,7 @@ const props = defineProps({ }, }); -const IGNORED_FIELD_KEYS = ["container_type", "content", "components"]; +const IGNORED_FIELD_KEYS = ["container_type", "content", "content_summary", "components"]; const isArrayValue = (value) => Array.isArray(value); diff --git a/src/pages/ChatMain/ChatLongAnswer/index.vue b/src/pages/ChatMain/ChatLongAnswer/index.vue index 46c3992..5b547e2 100644 --- a/src/pages/ChatMain/ChatLongAnswer/index.vue +++ b/src/pages/ChatMain/ChatLongAnswer/index.vue @@ -62,12 +62,18 @@ const longTextData = ref(null); let unsubscribe = null; +const HIDDEN_DETAIL_SECTION_KEYS = [ + LONG_TEXT_KEYS.containerType, + LONG_TEXT_KEYS.contentSummary, +]; + const shouldUseParsedValueView = (section) => { return ( section.fromLongTextData && section.contentKey !== LONG_TEXT_KEYS.tag && section.contentKey !== LONG_TEXT_KEYS.title && - section.contentKey !== LONG_TEXT_KEYS.content + section.contentKey !== LONG_TEXT_KEYS.content && + !HIDDEN_DETAIL_SECTION_KEYS.includes(section.contentKey) ); }; @@ -99,7 +105,8 @@ const contentSections = computed(() => { return renderSections.value.filter( (section) => section.contentKey !== LONG_TEXT_KEYS.title && - section.contentKey !== LONG_TEXT_KEYS.tag + section.contentKey !== LONG_TEXT_KEYS.tag && + !HIDDEN_DETAIL_SECTION_KEYS.includes(section.contentKey) ); }); @@ -267,6 +274,7 @@ onUnload(() => { align-items: flex-start; justify-content: space-between; gap: 10px; + margin-bottom: 6px; } .long-answer-tag { display: inline-flex; diff --git a/src/pages/ChatModule/AnswerComponent/index.vue b/src/pages/ChatModule/AnswerComponent/index.vue index dcf00a7..4fa3b8a 100644 --- a/src/pages/ChatModule/AnswerComponent/index.vue +++ b/src/pages/ChatModule/AnswerComponent/index.vue @@ -58,7 +58,7 @@ const props = defineProps({ const tag = computed(() => getLongTextValue(props.longTextData, "tag")); const title = computed(() => getLongTextValue(props.longTextData, "title")); const previewContent = computed(() => { - return getLongTextPreviewText(props.longTextData, ["content"]) || (props.content ? String(props.content) : ""); + return getLongTextPreviewText(props.longTextData, ["content_summary"]); }); // 处理文本内容:按行截断以保证预览最多显示三行(更贴近视觉行数) diff --git a/src/utils/longTextCard.js b/src/utils/longTextCard.js index 2d4bb94..c25e986 100644 --- a/src/utils/longTextCard.js +++ b/src/utils/longTextCard.js @@ -3,6 +3,7 @@ export const LONG_TEXT_KEYS = { tag: "tag", title: "title", content: "content", + contentSummary: "content_summary", guideConclusion: "guide_conclusion", keyFacts: "key_facts", sceneImage: "scene_image", @@ -41,6 +42,7 @@ export const LONG_TEXT_FIELD_CONFIG = [ { key: LONG_TEXT_KEYS.tag }, { key: LONG_TEXT_KEYS.title }, { key: LONG_TEXT_KEYS.content }, + { key: LONG_TEXT_KEYS.contentSummary }, { key: LONG_TEXT_KEYS.guideConclusion }, { key: LONG_TEXT_KEYS.keyFacts }, { key: LONG_TEXT_KEYS.sceneImage }, @@ -75,7 +77,7 @@ export const LONG_TEXT_FIELD_CONFIG = [ ]; export const LONG_TEXT_PREVIEW_KEYS = [ - LONG_TEXT_KEYS.content, + LONG_TEXT_KEYS.contentSummary, LONG_TEXT_KEYS.title, LONG_TEXT_KEYS.tag, ];