Commit c258287c authored by 金伟强's avatar 金伟强

fix: sync prev config

parent e9ee1a1f
...@@ -205,12 +205,11 @@ const Main: FC<IMainProps> = () => { ...@@ -205,12 +205,11 @@ const Main: FC<IMainProps> = () => {
} }
} }
else { else {
setModeId(DEFAULT_MODEL_ID) configSetDefaultValue()
setPlugins(DEFAULT_PLUGIN)
setDateSets([])
} }
} }
else { else {
configSetDefaultValue()
notSyncToStateInputs = newConversationInputs notSyncToStateInputs = newConversationInputs
setCurrInputs(notSyncToStateInputs) setCurrInputs(notSyncToStateInputs)
} }
...@@ -290,9 +289,7 @@ const Main: FC<IMainProps> = () => { ...@@ -290,9 +289,7 @@ const Main: FC<IMainProps> = () => {
introduction: conversationIntroduction, introduction: conversationIntroduction,
}) })
})) }))
setModeId(DEFAULT_MODEL_ID) configSetDefaultValue()
setPlugins(DEFAULT_PLUGIN)
setDateSets([])
} }
// sometime introduction is not applied to state // sometime introduction is not applied to state
...@@ -576,6 +573,11 @@ const Main: FC<IMainProps> = () => { ...@@ -576,6 +573,11 @@ const Main: FC<IMainProps> = () => {
}) })
} }
const [dataSets, setDateSets] = useState<DataSet[]>([]) const [dataSets, setDateSets] = useState<DataSet[]>([])
const configSetDefaultValue = () => {
setModeId(DEFAULT_MODEL_ID)
setPlugins(DEFAULT_PLUGIN)
setDateSets([])
}
if (appUnavailable) if (appUnavailable)
return <AppUnavailable isUnknwonReason={isUnknwonReason} /> return <AppUnavailable isUnknwonReason={isUnknwonReason} />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment