fix: requestOptions (#1188)

修复页面上重复执行onRegenerate操作,会丢失上下文的问题
This commit is contained in:
LeafSummer 2023-04-04 07:53:37 +08:00 committed by GitHub
parent abc4c3ad22
commit 9b66fed26e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -233,7 +233,7 @@ async function onRegenerate(index: number) {
error: false, error: false,
loading: true, loading: true,
conversationOptions: null, conversationOptions: null,
requestOptions: { prompt: message, ...options }, requestOptions: { prompt: message, options: { ...options } },
}, },
) )
@ -264,7 +264,7 @@ async function onRegenerate(index: number) {
error: false, error: false,
loading: true, loading: true,
conversationOptions: { conversationId: data.conversationId, parentMessageId: data.id }, conversationOptions: { conversationId: data.conversationId, parentMessageId: data.id },
requestOptions: { prompt: message, ...options }, requestOptions: { prompt: message, options: { ...options } },
}, },
) )
@ -308,7 +308,7 @@ async function onRegenerate(index: number) {
error: true, error: true,
loading: false, loading: false,
conversationOptions: null, conversationOptions: null,
requestOptions: { prompt: message, ...options }, requestOptions: { prompt: message, options: { ...options } },
}, },
) )
} }