From f7588c0b28980e970de1917ebaaf655ef7c252a8 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Sat, 30 Nov 2024 23:33:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E4=B8=AD=E7=A6=81=E6=AD=A2=E8=A1=A8=E5=8D=95=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=20(#1718)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/application/flow/workflow_manage.py | 7 ++++--- ui/src/api/type/application.ts | 1 - ui/src/components/ai-chat/ExecutionDetailDialog.vue | 3 +-- .../ai-chat/component/answer-content/index.vue | 6 +++++- ui/src/components/ai-chat/index.vue | 1 - ui/src/components/markdown/FormRander.vue | 9 ++++++--- ui/src/components/markdown/MdRenderer.vue | 12 ++++++++++-- 7 files changed, 26 insertions(+), 13 deletions(-) diff --git a/apps/application/flow/workflow_manage.py b/apps/application/flow/workflow_manage.py index adbfd83af..b051f043e 100644 --- a/apps/application/flow/workflow_manage.py +++ b/apps/application/flow/workflow_manage.py @@ -460,11 +460,12 @@ class WorkflowManage: self.params['chat_record_id'], current_node.id, current_node.up_node_id_list, - str(e), False, 0, 0, {'node_is_end': True}) + str(e), False, 0, 0, + {'node_is_end': True, 'node_type': current_node.type, + 'view_type': current_node.view_type}) if not self.node_chunk_manage.contains(node_chunk): self.node_chunk_manage.add_node_chunk(node_chunk) - node_chunk.add_chunk(chunk) - node_chunk.end() + node_chunk.end(chunk) current_node.get_write_error_context(e) self.status = 500 diff --git a/ui/src/api/type/application.ts b/ui/src/api/type/application.ts index bc9412c03..bd4edeca8 100644 --- a/ui/src/api/type/application.ts +++ b/ui/src/api/type/application.ts @@ -293,7 +293,6 @@ export class ChatManagement { */ static write(chatRecordId: string) { const chatRecord = this.chatMessageContainer[chatRecordId] - console.log('chatRecord', chatRecordId, this.chatMessageContainer, chatRecord) if (chatRecord) { chatRecord.write() } diff --git a/ui/src/components/ai-chat/ExecutionDetailDialog.vue b/ui/src/components/ai-chat/ExecutionDetailDialog.vue index c39e95c60..fc89c08bd 100644 --- a/ui/src/components/ai-chat/ExecutionDetailDialog.vue +++ b/ui/src/components/ai-chat/ExecutionDetailDialog.vue @@ -341,7 +341,7 @@