mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-29 16:03:45 +03:00
fix: should not swallow copilot errors (#6609)
This commit is contained in:
parent
19f8407d7f
commit
e232b0b285
@ -84,7 +84,7 @@ export class CopilotClient {
|
||||
return res.currentUser?.copilot?.histories;
|
||||
}
|
||||
|
||||
chatText({
|
||||
async chatText({
|
||||
sessionId,
|
||||
messageId,
|
||||
message,
|
||||
@ -113,13 +113,8 @@ export class CopilotClient {
|
||||
});
|
||||
}
|
||||
|
||||
return new Promise(resolve => {
|
||||
fetch(url.toString())
|
||||
.then(res => {
|
||||
resolve(res.text());
|
||||
})
|
||||
.catch(console.error);
|
||||
});
|
||||
const response = await fetch(url.toString());
|
||||
return response.text();
|
||||
}
|
||||
|
||||
// Text or image to text
|
||||
|
Loading…
Reference in New Issue
Block a user