Skip to content

Commit 3dc9b16

Browse files
authored
fix: 【应用】问答页面在回答中...时,点击停止回答不生效 #109 (#136)
1 parent 80ff9c5 commit 3dc9b16

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262
>
6363
抱歉,没有查找到相关内容,请重新描述您的问题或提供更多信息。
6464
</el-card>
65+
<el-card v-else-if="item.is_stop" shadow="always" class="dialog-card">
66+
已停止回答
67+
</el-card>
6568
<el-card v-else shadow="always" class="dialog-card">
6669
回答中 <span class="dotting"></span>
6770
</el-card>
@@ -434,6 +437,8 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean) {
434437
vote_status: '-1'
435438
})
436439
chatList.value.push(chat)
440+
ChatManagement.addChatRecord(chat, 50, loading)
441+
ChatManagement.write(chat.id)
437442
inputValue.value = ''
438443
nextTick(() => {
439444
// 将滚动条滚动到最下面
@@ -471,8 +476,6 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean) {
471476
// 将滚动条滚动到最下面
472477
scrollDiv.value.setScrollTop(getMaxHeight())
473478
})
474-
ChatManagement.addChatRecord(chat, 50, loading)
475-
ChatManagement.write(chat.id)
476479
const reader = response.body.getReader()
477480
// 处理流数据
478481
const write = getWrite(

0 commit comments

Comments
 (0)