fix: new chat set input

This commit is contained in:
Joel
2023-08-29 13:42:32 +08:00
parent a96399ee15
commit 754b77657b

View File

@ -63,6 +63,8 @@ const Main: FC = () => {
const [conversationIdChangeBecauseOfNew, setConversationIdChangeBecauseOfNew, getConversationIdChangeBecauseOfNew] = useGetState(false) const [conversationIdChangeBecauseOfNew, setConversationIdChangeBecauseOfNew, getConversationIdChangeBecauseOfNew] = useGetState(false)
const [isChatStarted, { setTrue: setChatStarted, setFalse: setChatNotStarted }] = useBoolean(false) const [isChatStarted, { setTrue: setChatStarted, setFalse: setChatNotStarted }] = useBoolean(false)
const handleStartChat = (inputs: Record<string, any>) => { const handleStartChat = (inputs: Record<string, any>) => {
createNewChat()
setConversationIdChangeBecauseOfNew(true)
setCurrInputs(inputs) setCurrInputs(inputs)
setChatStarted() setChatStarted()
// parse variables in introduction // parse variables in introduction