Skip to content

Commit a7e31b9

Browse files
authored
fix: AI conversation jumps to 404 (#3118)
1 parent 8498687 commit a7e31b9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

ui/src/components/ai-chat/index.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -529,14 +529,16 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean, other_para
529529
* @param row
530530
*/
531531
function getSourceDetail(row: any) {
532-
logApi.getRecordDetail(id || props.appId, row.chat_id, row.record_id, loading).then((res) => {
533-
const exclude_keys = ['answer_text', 'id', 'answer_text_list']
534-
Object.keys(res.data).forEach((key) => {
535-
if (!exclude_keys.includes(key)) {
536-
row[key] = res.data[key]
537-
}
532+
if (row.record_id) {
533+
logApi.getRecordDetail(id || props.appId, row.chat_id, row.record_id, loading).then((res) => {
534+
const exclude_keys = ['answer_text', 'id', 'answer_text_list']
535+
Object.keys(res.data).forEach((key) => {
536+
if (!exclude_keys.includes(key)) {
537+
row[key] = res.data[key]
538+
}
539+
})
538540
})
539-
})
541+
}
540542
return true
541543
}
542544

0 commit comments

Comments
 (0)