Skip to content

Commit

Permalink
fix: do not delete message on interrupt
Browse files Browse the repository at this point in the history
Signed-off-by: tylerslaton <[email protected]>
  • Loading branch information
tylerslaton committed Sep 11, 2024
1 parent ceefbf8 commit e9b873e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/chat/useChatSocket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ const useChatSocket = () => {
socket.on('interrupted', () => {
setGenerating(false);
setWaitingForUserResponse(false);
setMessages((prevMessages) => {
return [...prevMessages, latestAgentMessageRef.current];
});
setLatestAgentMessage({} as Message);
});
socket.on('progress', (data: { frame: Frame; name?: string }) =>
Expand Down

0 comments on commit e9b873e

Please sign in to comment.