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

fix: sync prev config

parent e9ee1a1f
......@@ -205,12 +205,11 @@ const Main: FC<IMainProps> = () => {
}
}
else {
setModeId(DEFAULT_MODEL_ID)
setPlugins(DEFAULT_PLUGIN)
setDateSets([])
configSetDefaultValue()
}
}
else {
configSetDefaultValue()
notSyncToStateInputs = newConversationInputs
setCurrInputs(notSyncToStateInputs)
}
......@@ -290,9 +289,7 @@ const Main: FC<IMainProps> = () => {
introduction: conversationIntroduction,
})
}))
setModeId(DEFAULT_MODEL_ID)
setPlugins(DEFAULT_PLUGIN)
setDateSets([])
configSetDefaultValue()
}
// sometime introduction is not applied to state
......@@ -576,6 +573,11 @@ const Main: FC<IMainProps> = () => {
})
}
const [dataSets, setDateSets] = useState<DataSet[]>([])
const configSetDefaultValue = () => {
setModeId(DEFAULT_MODEL_ID)
setPlugins(DEFAULT_PLUGIN)
setDateSets([])
}
if (appUnavailable)
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