diff --git a/src/components/settings/post-processing/PostProcessingSettings.tsx b/src/components/settings/post-processing/PostProcessingSettings.tsx
index 0c521bd..2776931 100644
--- a/src/components/settings/post-processing/PostProcessingSettings.tsx
+++ b/src/components/settings/post-processing/PostProcessingSettings.tsx
@@ -3,13 +3,16 @@ import { useTranslation } from "react-i18next";
import { RefreshCcw } from "lucide-react";
import { commands } from "@/bindings";
-import { SettingsGroup } from "../../ui/SettingsGroup";
-import { SettingContainer } from "../../ui/SettingContainer";
+import { Alert } from "../../ui/Alert";
+import {
+ Dropdown,
+ SettingContainer,
+ SettingsGroup,
+ Textarea,
+} from "@/components/ui";
import { Button } from "../../ui/Button";
import { ResetButton } from "../../ui/ResetButton";
import { Input } from "../../ui/Input";
-import { Dropdown } from "../../ui/Dropdown";
-import { Textarea } from "../../ui/Textarea";
import { ProviderSelect } from "../PostProcessingSettingsApi/ProviderSelect";
import { BaseUrlField } from "../PostProcessingSettingsApi/BaseUrlField";
@@ -56,28 +59,12 @@ const PostProcessingSettingsApiComponent: React.FC = () => {
- {state.appleIntelligenceUnavailable ? (
-
-
- {t("settings.postProcessing.api.appleIntelligence.unavailable")}
-
-
- ) : null}
-
{state.isAppleProvider ? (
-
-
- {t("settings.postProcessing.api.appleIntelligence.requirements")}
-
-
+ state.appleIntelligenceUnavailable ? (
+
+ {t("settings.postProcessing.api.appleIntelligence.unavailable")}
+
+ ) : null
) : (
<>
{state.selectedProvider?.id === "custom" && (
@@ -124,51 +111,49 @@ const PostProcessingSettingsApiComponent: React.FC = () => {
>
)}
-
-
-
0
+ }
+ descriptionMode="tooltip"
+ layout="stacked"
+ grouped={true}
+ >
+
+ 0
? t(
"settings.postProcessing.api.model.placeholderWithOptions",
)
: t("settings.postProcessing.api.model.placeholderNoOptions")
- }
- onSelect={state.handleModelSelect}
- onCreate={state.handleModelCreate}
- onBlur={() => {}}
- className="flex-1 min-w-[380px]"
- />
-
- {}}
+ className="flex-1 min-w-[380px]"
/>
-
-
-
+
+
+
+
+
+ )}
>
);
};
diff --git a/src/components/ui/Alert.tsx b/src/components/ui/Alert.tsx
new file mode 100644
index 0000000..c5c98bc
--- /dev/null
+++ b/src/components/ui/Alert.tsx
@@ -0,0 +1,64 @@
+import React from "react";
+import { AlertCircle, AlertTriangle, Info, CheckCircle } from "lucide-react";
+
+type AlertVariant = "error" | "warning" | "info" | "success";
+
+interface AlertProps {
+ variant?: AlertVariant;
+ /** When true, removes rounded corners for use inside containers */
+ contained?: boolean;
+ children: React.ReactNode;
+ className?: string;
+}
+
+const variantStyles: Record<
+ AlertVariant,
+ { container: string; icon: string; text: string }
+> = {
+ error: {
+ container: "bg-red-500/10",
+ icon: "text-red-500",
+ text: "text-red-400",
+ },
+ warning: {
+ container: "bg-yellow-500/10",
+ icon: "text-yellow-500",
+ text: "text-yellow-400",
+ },
+ info: {
+ container: "bg-blue-500/10",
+ icon: "text-blue-500",
+ text: "text-blue-400",
+ },
+ success: {
+ container: "bg-green-500/10",
+ icon: "text-green-500",
+ text: "text-green-400",
+ },
+};
+
+const variantIcons: Record = {
+ error: AlertCircle,
+ warning: AlertTriangle,
+ info: Info,
+ success: CheckCircle,
+};
+
+export const Alert: React.FC = ({
+ variant = "error",
+ contained = false,
+ children,
+ className = "",
+}) => {
+ const styles = variantStyles[variant];
+ const Icon = variantIcons[variant];
+
+ return (
+
+ );
+};