From aeeb18581d2f37804677e4568b52b12d081ce421 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Mon, 20 Apr 2026 17:00:58 +0800 Subject: [PATCH] fix(web): change search_result type log result --- web/src/views/MemoryConversation/index.tsx | 31 ++++++---------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/web/src/views/MemoryConversation/index.tsx b/web/src/views/MemoryConversation/index.tsx index a5f3592e..94dac481 100644 --- a/web/src/views/MemoryConversation/index.tsx +++ b/web/src/views/MemoryConversation/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:09:03 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-31 12:21:56 + * @Last Modified time: 2026-04-20 16:59:25 */ /** * Memory Conversation Page @@ -78,8 +78,8 @@ interface DataItem { id: string; question: string; type: string; - reason: string; - } + reason?: string; +} /** * Log item for conversation analysis */ @@ -88,13 +88,15 @@ export interface LogItem { title: string; data?: DataItem[] | AnyObject; raw_results?: string | Record; + raw_result?: Array; summary?: string; query?: string; reason?: string; result?: string; - original_query: string; + original_query?: string; index?: number; result_count?: number; + total?: number; } /** @@ -242,7 +244,6 @@ const MemoryConversation: FC = () => { <>
{vo.id}. {vo.question}
-
{vo.reason}
))} @@ -260,25 +261,9 @@ const MemoryConversation: FC = () => { ))} - : log.type === 'search_result' && log.raw_results && typeof log.raw_results !== 'string' + : log.type === 'search_result' && log.result ? -
{log.query}
- {(log.raw_results.reranked_results as AnyObject)?.communities?.length > 0 && <> -
{t('memoryConversation.communities')}
-
    - {((log.raw_results.reranked_results as AnyObject)?.communities as { content: string }[]).map((item, index: number) => ( -
  • {item.content}
  • - ))} -
- } - {(log.raw_results.reranked_results as AnyObject)?.summaries?.length > 0 && <> -
{t('memoryConversation.summaries')}
-
    - {((log.raw_results.reranked_results as AnyObject)?.summaries as { content: string }[]).map((item, index: number) => ( -
  • {item.content}
  • - ))} -
- } +
: log.type === 'retrieval_summary' && log.summary ?