diff --git a/src/App.tsx b/src/App.tsx index 251028e78..c0baf0ed6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -635,7 +635,7 @@ function App() { } >
@@ -730,7 +730,7 @@ function App() {
{currentView === "prompts" && ( diff --git a/src/components/ui/sonner.tsx b/src/components/ui/sonner.tsx index 289e65654..9cd7cc1c3 100644 --- a/src/components/ui/sonner.tsx +++ b/src/components/ui/sonner.tsx @@ -1,11 +1,18 @@ import { Toaster as SonnerToaster } from "sonner"; +import { useTheme } from "@/components/theme-provider"; export function Toaster() { + const { theme } = useTheme(); + + // 将应用主题映射到 Sonner 的主题 + // 如果是 "system",Sonner 会自己处理 + const sonnerTheme = theme === "system" ? "system" : theme; + return (