From a7e31b94c7ea1e30c63979101474e1a74241ea2f Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 21 May 2025 10:58:00 +0800 Subject: [PATCH] fix: AI conversation jumps to 404 (#3118) --- ui/src/components/ai-chat/index.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 44b68beab..a3e3d3d36 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -529,14 +529,16 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean, other_para * @param row */ function getSourceDetail(row: any) { - logApi.getRecordDetail(id || props.appId, row.chat_id, row.record_id, loading).then((res) => { - const exclude_keys = ['answer_text', 'id', 'answer_text_list'] - Object.keys(res.data).forEach((key) => { - if (!exclude_keys.includes(key)) { - row[key] = res.data[key] - } + if (row.record_id) { + logApi.getRecordDetail(id || props.appId, row.chat_id, row.record_id, loading).then((res) => { + const exclude_keys = ['answer_text', 'id', 'answer_text_list'] + Object.keys(res.data).forEach((key) => { + if (!exclude_keys.includes(key)) { + row[key] = res.data[key] + } + }) }) - }) + } return true }