Fix: window hide & show, toast error for llm (#249)

* fix window hide & show

* toast error when llm failed
This commit is contained in:
an-lee
2024-02-02 13:56:52 +08:00
committed by GitHub
parent 3ffc0746f3
commit f6dcf0366f
4 changed files with 23 additions and 11 deletions

View File

@@ -11,6 +11,7 @@ import {
SheetContent,
SheetHeader,
SheetClose,
toast,
} from "@renderer/components/ui";
import {
SpeechPlayer,
@@ -70,6 +71,9 @@ export const AssistantMessageComponent = (props: {
.then((speech) => {
setSpeech(speech);
})
.catch((err) => {
toast.error(err.message);
})
.finally(() => {
setSpeeching(false);
});