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