调整quickcommand.askAI接口,改为通过onFetch返回controller

This commit is contained in:
fofolee
2025-02-25 19:57:46 +08:00
parent 94bffd0375
commit 23c5cb77af
3 changed files with 37 additions and 25 deletions

View File

@@ -201,8 +201,10 @@ export default defineComponent({
this.selectedApi,
{
showProcessBar: false,
onStream: (text, controller, done) => {
onFetch: (controller) => {
this.currentRequest = controller;
},
onStream: (text, done) => {
if (text) {
this.chatHistory[this.chatHistory.length - 1].content += text;
}