🚀 refactor: Use Undici Instead of Node-Fetch, prevent Event Close, add Index (#3052)

* feat: Add index to conversationId field in messageSchema

* refactor: prevent immediate event close on error

* refactor: use undici instead of node-fetch in non-Bun environment
This commit is contained in:
Danny Avila 2024-06-13 13:38:15 -04:00 committed by GitHub
parent 29e71e98ad
commit 4416f69a9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View file

@ -604,7 +604,6 @@ export default function useSSE(submission: TSubmission | null, index = 0) {
events.onerror = function (e: MessageEvent) {
console.log('error in server stream.');
startupConfig?.checkBalance && balanceQuery.refetch();
events.close();
let data: TResData | undefined = undefined;
try {