client error handling, regen response without saving messages

This commit is contained in:
Danny Avila 2023-02-08 15:26:42 -05:00
parent 87685c3791
commit 217bdb4865
11 changed files with 261 additions and 62 deletions

View file

@ -2,13 +2,15 @@ import React from 'react';
import { useDispatch } from 'react-redux';
import { setConversation } from '~/store/convoSlice';
import { setMessages } from '~/store/messageSlice';
import { setText } from '~/store/textSlice';
export default function NewChat() {
const dispatch = useDispatch();
const clickHandler = () => {
dispatch(setText(''));
dispatch(setMessages([]));
dispatch(setConversation({ conversationId: null, parentMessageId: null }));
dispatch(setConversation({ error: false, conversationId: null, parentMessageId: null }));
};
return (