Skip to content

Commit

Permalink
fix: requestOptions (Chanzhaoyu#1188)
Browse files Browse the repository at this point in the history
修复页面上重复执行onRegenerate操作,会丢失上下文的问题
  • Loading branch information
leafsummer authored and yinqf committed Apr 14, 2023
1 parent b20c1db commit 7dfa3f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ async function onRegenerate(index: number) {
error: false,
loading: true,
conversationOptions: null,
requestOptions: { prompt: message, ...options },
requestOptions: { prompt: message, options: { ...options } },
},
)
Expand Down Expand Up @@ -270,7 +270,7 @@ async function onRegenerate(index: number) {
error: false,
loading: true,
conversationOptions: { conversationId: data.conversationId, parentMessageId: data.id },
requestOptions: { prompt: message, ...options },
requestOptions: { prompt: message, options: { ...options } },
},
)
Expand Down Expand Up @@ -314,7 +314,7 @@ async function onRegenerate(index: number) {
error: true,
loading: false,
conversationOptions: null,
requestOptions: { prompt: message, ...options },
requestOptions: { prompt: message, options: { ...options } },
},
)
}
Expand Down

0 comments on commit 7dfa3f6

Please sign in to comment.