Commit 7c42b4d6 authored by Steven杜宇's avatar Steven杜宇

// AI

parent 32a7a052
...@@ -193,7 +193,6 @@ class YHAIMainChatViewController: YHBaseViewController { ...@@ -193,7 +193,6 @@ class YHAIMainChatViewController: YHBaseViewController {
} }
func stopAutoResponse(completion:((Bool)->())? = nil) { func stopAutoResponse(completion:((Bool)->())? = nil) {
YHHUD.flash(message: "加载中...")
self.manager.stopChat(chatId: self.manager.chatId, conversationId: self.conversationId) { success, error in self.manager.stopChat(chatId: self.manager.chatId, conversationId: self.conversationId) { success, error in
self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend
if success { if success {
...@@ -201,7 +200,6 @@ class YHAIMainChatViewController: YHBaseViewController { ...@@ -201,7 +200,6 @@ class YHAIMainChatViewController: YHBaseViewController {
self.manager.request?.cancel() self.manager.request?.cancel()
self.chatConfig.disableHandleMessage = true self.chatConfig.disableHandleMessage = true
DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
YHHUD.hide()
self.chatConfig.removeThinkingMessageFromChatList(&self.messages) self.chatConfig.removeThinkingMessageFromChatList(&self.messages)
self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend
self.tableView.reloadData() self.tableView.reloadData()
......
...@@ -277,7 +277,6 @@ class YHAIRobotChatViewController: YHBaseViewController { ...@@ -277,7 +277,6 @@ class YHAIRobotChatViewController: YHBaseViewController {
} }
func stopAutoResponse(completion:((Bool)->())? = nil) { func stopAutoResponse(completion:((Bool)->())? = nil) {
YHHUD.flash(message: "加载中...")
self.manager.stopChat(chatId: self.manager.chatId, conversationId: self.conversationId) { success, error in self.manager.stopChat(chatId: self.manager.chatId, conversationId: self.conversationId) { success, error in
self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend
if success { if success {
...@@ -285,7 +284,6 @@ class YHAIRobotChatViewController: YHBaseViewController { ...@@ -285,7 +284,6 @@ class YHAIRobotChatViewController: YHBaseViewController {
self.manager.request?.cancel() self.manager.request?.cancel()
self.chatConfig.disableHandleMessage = true self.chatConfig.disableHandleMessage = true
DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
YHHUD.hide()
self.chatConfig.removeThinkingMessageFromChatList(&self.messages) self.chatConfig.removeThinkingMessageFromChatList(&self.messages)
self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend
self.tableView.reloadData() self.tableView.reloadData()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment