Skip to content

Commit 9fb3959

Browse files
committed
fix: when the conversation is empty and Regenerate the answer after switching model is set, switching model will send useless requests, resulting in the problem of inability to input (#210)
1 parent 96bc80c commit 9fb3959

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/ConversationCard/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ function ConversationCard(props) {
225225
onChange={(e) => {
226226
const modelName = e.target.value
227227
const newSession = { ...session, modelName, aiName: Models[modelName].desc }
228-
if (config.autoRegenAfterSwitchModel) getRetryFn(newSession)()
228+
if (config.autoRegenAfterSwitchModel && conversationItemData.length > 0)
229+
getRetryFn(newSession)()
229230
else setSession(newSession)
230231
}}
231232
>

0 commit comments

Comments
 (0)