mirror of
https://github.com/MustangYM/OSXChatGpt.git
synced 2025-11-25 11:29:43 +08:00
fix bug
This commit is contained in:
@@ -326,8 +326,7 @@ extension ViewModel {
|
||||
if newMsg == nil {
|
||||
return
|
||||
}
|
||||
self.scrollID = newMsg!.id!
|
||||
newMsg?.text = rsp.text
|
||||
|
||||
// stream += rsp.stream
|
||||
// if stream.contains("```") {//有代码块
|
||||
// let arr = stream.components(separatedBy: "```")
|
||||
@@ -379,6 +378,8 @@ extension ViewModel {
|
||||
|
||||
DispatchQueue.main.async {
|
||||
if self.currentConversation?.sesstionId == sesstionId {
|
||||
self.scrollID = newMsg!.id!
|
||||
newMsg?.text = rsp.text
|
||||
self.messages[self.messages.count - 1] = newMsg!//更新UI
|
||||
self.changeMsgText = rsp.text//更新滚动
|
||||
}
|
||||
|
||||
@@ -26,3 +26,12 @@ extension NSTextView {
|
||||
}
|
||||
}
|
||||
}
|
||||
//list背景透明
|
||||
extension NSTableView {
|
||||
open override func viewDidMoveToWindow() {
|
||||
super.viewDidMoveToWindow()
|
||||
|
||||
backgroundColor = NSColor.clear
|
||||
enclosingScrollView!.drawsBackground = false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user