refactor: replace Toast with Sonner

This commit is contained in:
tao.chen
2026-09-02 10:10:41 +08:00
committed by tao.chen
parent 635d80e3cf
commit ed58344add
18 changed files with 126 additions and 320 deletions
@@ -8,7 +8,7 @@ import type {
WorkspaceBoundApi,
} from "~/services/api";
import { useUiStore } from "./uiStore";
import { toast } from "sonner";
// 缓存的会话类型(多 iframe 共存方案)
type CachedSession = {
@@ -173,7 +173,9 @@ export function pushToast(
tone: "success" | "error" | "info",
message: string,
): void {
useUiStore.getState().pushToast({ tone, message });
if (tone === "error") toast.error(message);
else if (tone === "info") toast.info(message);
else toast.success(message);
}
export async function sha256Hex(