fix: After sending the message for the first time, the returned content is not streamed out #2067 #1832 (#2191)

### What problem does this PR solve?

fix: After sending the message for the first time, the returned content
is not streamed out #2067 #1832

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-09-02 14:31:00 +08:00
committed by GitHub
parent 9a85f83569
commit c04686d426
2 changed files with 13 additions and 127 deletions

View File

@ -264,9 +264,11 @@ export const useSendMessageWithSse = (
}
console.info('done?');
setDone(true);
setAnswer({} as IAnswer);
return { data: await res, response };
} catch (e) {
setDone(true);
setAnswer({} as IAnswer);
console.warn(e);
}
},