diff --git a/aiChat/mixins/chatMixins.js b/aiChat/mixins/chatMixins.js index 4183d2c..ee04849 100644 --- a/aiChat/mixins/chatMixins.js +++ b/aiChat/mixins/chatMixins.js @@ -156,28 +156,28 @@ export const chatMixins = { handleLoginFailure() return } - _this.initWebSocket(() => { - const prompt = params.prompt - if (params.init !== 1) { - _this.chatMessageList.push({ - prompt, - type: -1 - }) - } - _this.$nextTick(() => { - _this.scrollToBottomHandle() - }) + const prompt = params.prompt + if (params.init !== 1) { _this.chatMessageList.push({ - content: '', - nodes: '', - isError: false, - showCursor: false, - conversationId: '', prompt, - listQuestion: [], - type: -2 + type: -1 }) - _this.loading = true + } + _this.$nextTick(() => { + _this.scrollToBottomHandle() + }) + _this.chatMessageList.push({ + content: '', + nodes: '', + isError: false, + showCursor: false, + conversationId: '', + prompt, + listQuestion: [], + type: -2 + }) + _this.loading = true + _this.initWebSocket(() => { _this.showCursor = false getSseConfigV1({ 'chatNumber': _this.chatNumber,