diff --git a/ui/src/api/type/application.ts b/ui/src/api/type/application.ts index 6e5bd0b0700..a8fac6d1f89 100644 --- a/ui/src/api/type/application.ts +++ b/ui/src/api/type/application.ts @@ -1,5 +1,6 @@ import { type Dict } from '@/api/type/common' import { type Ref } from 'vue' +import bus from '@/bus' interface ApplicationFormType { name?: string desc?: string @@ -144,8 +145,8 @@ export class ChatRecordManage { }) } } - this.chat.answer_text = this.chat.answer_text + chunk_answer + bus.emit('change:answer', { record_id: this.chat.record_id, is_end: false }) } get_current_up_node(run_node: any) { const index = this.node_list.findIndex((item) => item == run_node) @@ -232,6 +233,7 @@ export class ChatRecordManage { if (this.loading) { this.loading.value = false } + bus.emit('change:answer', { record_id: this.chat.record_id, is_end: true }) if (this.id) { clearInterval(this.id) } diff --git a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue index 187bc6a3c5b..3c510a3bf68 100644 --- a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue +++ b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue @@ -8,20 +8,35 @@ - - + + - - - + + + + @@ -82,6 +97,7 @@ +