From 16f6bf9aacaff9bed98a59dd8a1d71ca94ab8f5d Mon Sep 17 00:00:00 2001 From: yuqei Date: Mon, 22 Jun 2026 12:32:01 +0800 Subject: [PATCH] fix: reduce duplicate chat answer summary --- frontend/src/app/chat/page.tsx | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/frontend/src/app/chat/page.tsx b/frontend/src/app/chat/page.tsx index eddf7b23..59b2915f 100644 --- a/frontend/src/app/chat/page.tsx +++ b/frontend/src/app/chat/page.tsx @@ -1080,6 +1080,7 @@ export default function ChatPage() { const sourcePanelMeta = useMemo(() => buildSourceState(sources, reviewContext), [reviewContext, sources]); const answerSummaryText = summarySection?.items.join("\n") ?? latestAssistantMessage?.content ?? ""; + const showAnswerSummaryCard = hasStructuredReview && Boolean(answerText); const loadConversationDetail = useCallback(async (targetConversationId: string) => { setDetailLoading(true); @@ -1624,24 +1625,20 @@ export default function ChatPage() { - {answerText ? ( + {showAnswerSummaryCard ? ( - {hasStructuredReview ? ( -
-
- {reviewContext ? "Review Snapshot" : "Summary Snapshot"} - {summarySection?.title ?? "当前回答摘要"} -
{answerSummaryText}
-
-
- {reviewContext ? "Context Snapshot" : "Source Snapshot"} - {primarySource?.title ?? "暂无来源"} -
{sourceSummary}
-
-
- ) : ( -
{answerSummaryText}
- )} +
+
+ {reviewContext ? "Review Snapshot" : "Summary Snapshot"} + {summarySection?.title ?? "当前回答摘要"} +
{answerSummaryText}
+
+
+ {reviewContext ? "Context Snapshot" : "Source Snapshot"} + {primarySource?.title ?? "暂无来源"} +
{sourceSummary}
+
+
) : null}