Skip to content

Commit

Permalink
Merge pull request #246 from Guocork/fixed-issue-206
Browse files Browse the repository at this point in the history
fix-issue-206
  • Loading branch information
jmbejar authored Sep 9, 2024
2 parents 6714258 + c47bab2 commit 32bed45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/data/chats/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ impl Chats {
pub fn cancel_chat_streaming(&mut self) {
if let Some(chat) = self.get_current_chat() {
chat.borrow_mut().cancel_streaming(self.backend.as_ref());
let mut chat = self.get_current_chat().unwrap().borrow_mut();
let message = chat.messages.last_mut().unwrap();
if message.content.trim().is_empty() {
chat.messages.pop();
}
}
}

Expand Down

0 comments on commit 32bed45

Please sign in to comment.