Your Image Models
@@ -591,13 +598,13 @@ export function ModelSelector({
)}
>
-
- {getProviderIcon(config.provider)}
-
+
{getProviderIcon(config.provider)}
{config.name}
- {isSelected && }
+ {isSelected && (
+
+ )}
{config.model_name}
diff --git a/surfsense_web/components/public-chat-snapshots/public-chat-snapshot-row.tsx b/surfsense_web/components/public-chat-snapshots/public-chat-snapshot-row.tsx
index 1e7de9f23..568c52ded 100644
--- a/surfsense_web/components/public-chat-snapshots/public-chat-snapshot-row.tsx
+++ b/surfsense_web/components/public-chat-snapshots/public-chat-snapshot-row.tsx
@@ -50,9 +50,7 @@ export function PublicChatSnapshotRow({
day: "numeric",
});
- const member = snapshot.created_by_user_id
- ? memberMap.get(snapshot.created_by_user_id)
- : null;
+ const member = snapshot.created_by_user_id ? memberMap.get(snapshot.created_by_user_id) : null;
return (
@@ -77,11 +75,7 @@ export function PublicChatSnapshotRow({
asChild
className="h-7 w-7 text-muted-foreground hover:text-foreground"
>
-
+
@@ -110,51 +104,49 @@ export function PublicChatSnapshotRow({
- {/* Message count badge */}
-
-
-
- {snapshot.message_count} messages
-
-
+ {/* Message count badge */}
+
+
+
+ {snapshot.message_count} messages
+
+
- {/* Public URL – selectable fallback for manual copy */}
-
-
- {snapshot.public_url}
-
-
-
-
-
- {copied ? (
-
- ) : (
-
- )}
-
-
- {copied ? "Copied!" : "Copy link"}
-
-
-
+ {/* Public URL – selectable fallback for manual copy */}
+
+
+ {snapshot.public_url}
+
+
+
+
+
+ {copied ? (
+
+ ) : (
+
+ )}
+
+
+ {copied ? "Copied!" : "Copy link"}
+
+
+
- {/* Footer: Date + Creator */}
+ {/* Footer: Date + Creator */}
-
- {formattedDate}
-
+ {formattedDate}
{member && (
<>
·
@@ -182,9 +174,7 @@ export function PublicChatSnapshotRow({
-
- {member.email || member.name}
-
+
{member.email || member.name}
>
diff --git a/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx b/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx
index 5b872404d..24d801409 100644
--- a/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx
+++ b/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx
@@ -97,13 +97,13 @@ export function PublicChatSnapshotsManager({
- {/* Message count badge */}
-
-
-
- {/* URL skeleton */}
-
- {/* Footer: Date + Creator */}
+ {/* Message count badge */}
+
+
+
+ {/* URL skeleton */}
+
+ {/* Footer: Date + Creator */}
diff --git a/surfsense_web/components/settings/image-model-manager.tsx b/surfsense_web/components/settings/image-model-manager.tsx
index f2d010e10..ef1a20068 100644
--- a/surfsense_web/components/settings/image-model-manager.tsx
+++ b/surfsense_web/components/settings/image-model-manager.tsx
@@ -348,16 +348,16 @@ export function ImageModelManager({ searchSpaceId }: ImageModelManagerProps) {
{/* Global info */}
{globalConfigs.filter((g) => !("is_auto_mode" in g && g.is_auto_mode)).length > 0 && (
-
-
-
-
- {globalConfigs.filter((g) => !("is_auto_mode" in g && g.is_auto_mode)).length} global
- image model(s)
- {" "}
- available from your administrator.
-
-
+
+
+
+
+ {globalConfigs.filter((g) => !("is_auto_mode" in g && g.is_auto_mode)).length} global
+ image model(s)
+ {" "}
+ available from your administrator.
+
+
)}
{/* Loading Skeleton */}
@@ -417,7 +417,11 @@ export function ImageModelManager({ searchSpaceId }: ImageModelManagerProps) {
: "No image models have been added to this space yet. Contact a space owner to add one."}
{canCreate && (
-
+
Add First Image Model
@@ -457,43 +461,43 @@ export function ImageModelManager({ searchSpaceId }: ImageModelManagerProps) {
)}
{(canUpdate || canDelete) && (
-
- {canUpdate && (
-
-
-
- openEditDialog(config)}
- className="h-7 w-7 text-muted-foreground hover:text-foreground"
- >
-
-
-
- Edit
-
-
- )}
- {canDelete && (
-
-
-
- setConfigToDelete(config)}
- className="h-7 w-7 text-muted-foreground hover:text-destructive"
- >
-
-
-
- Delete
-
-
- )}
-
- )}
+
+ {canUpdate && (
+
+
+
+ openEditDialog(config)}
+ className="h-7 w-7 text-muted-foreground hover:text-foreground"
+ >
+
+
+
+ Edit
+
+
+ )}
+ {canDelete && (
+
+
+
+ setConfigToDelete(config)}
+ className="h-7 w-7 text-muted-foreground hover:text-destructive"
+ >
+
+
+
+ Delete
+
+
+ )}
+
+ )}
{/* Provider + Model */}
@@ -507,14 +511,11 @@ export function ImageModelManager({ searchSpaceId }: ImageModelManagerProps) {
{/* Footer: Date + Creator */}
+ {/* Assigned Config Summary */}
+ {assignedConfig && (
+
{isAutoMode ? (
-
- {assignedConfig.name}
-
- {"is_global" in assignedConfig &&
- assignedConfig.is_global && (
-
- 🌐 Global
-
- )}
+ {assignedConfig.name}
+ {"is_global" in assignedConfig && assignedConfig.is_global && (
+
+ 🌐 Global
+
+ )}
- {getProviderIcon(assignedConfig.provider, { className: "size-3 shrink-0" })}
+ {getProviderIcon(assignedConfig.provider, {
+ className: "size-3 shrink-0",
+ })}
{assignedConfig.model_name}
@@ -552,9 +538,9 @@ export function LLMRoleManager({ searchSpaceId }: LLMRoleManagerProps) {
)}
-
- )}
-
+
+ )}
+
);
@@ -572,9 +558,7 @@ export function LLMRoleManager({ searchSpaceId }: LLMRoleManagerProps) {
transition={{ duration: 0.2 }}
className="flex items-center justify-between gap-3 rounded-lg border border-border bg-muted/50 p-3 md:p-4"
>
-
- You have unsaved changes
-
+
You have unsaved changes
{(canUpdate || canDelete) && (
-
- {canUpdate && (
-
-
-
- openEditDialog(config)}
- className="h-7 w-7 text-muted-foreground hover:text-foreground"
- >
-
-
-
- Edit
-
-
- )}
- {canDelete && (
-
-
-
- setConfigToDelete(config)}
- className="h-7 w-7 text-muted-foreground hover:text-destructive"
- >
-
-
-
- Delete
-
-
- )}
-
- )}
+
+ {canUpdate && (
+
+
+
+ openEditDialog(config)}
+ className="h-7 w-7 text-muted-foreground hover:text-foreground"
+ >
+
+
+
+ Edit
+
+
+ )}
+ {canDelete && (
+
+
+
+ setConfigToDelete(config)}
+ className="h-7 w-7 text-muted-foreground hover:text-destructive"
+ >
+
+
+
+ Delete
+
+
+ )}
+
+ )}
{/* Provider + Model */}
@@ -453,14 +450,11 @@ export function ModelConfigManager({ searchSpaceId }: ModelConfigManagerProps) {
{/* Footer: Date + Creator */}
- {new Date(config.created_at).toLocaleDateString(
- undefined,
- {
- year: "numeric",
- month: "short",
- day: "numeric",
- }
- )}
+ {new Date(config.created_at).toLocaleDateString(undefined, {
+ year: "numeric",
+ month: "short",
+ day: "numeric",
+ })}
{member && (
<>
diff --git a/surfsense_web/contracts/types/new-llm-config.types.ts b/surfsense_web/contracts/types/new-llm-config.types.ts
index 7b3fca8b0..0885fa7f5 100644
--- a/surfsense_web/contracts/types/new-llm-config.types.ts
+++ b/surfsense_web/contracts/types/new-llm-config.types.ts
@@ -218,7 +218,9 @@ export const getImageGenConfigsResponse = z.array(imageGenerationConfig);
export const updateImageGenConfigRequest = z.object({
id: z.number(),
- data: imageGenerationConfig.omit({ id: true, created_at: true, search_space_id: true, user_id: true }).partial(),
+ data: imageGenerationConfig
+ .omit({ id: true, created_at: true, search_space_id: true, user_id: true })
+ .partial(),
});
export const updateImageGenConfigResponse = imageGenerationConfig;
diff --git a/surfsense_web/lib/provider-icons.tsx b/surfsense_web/lib/provider-icons.tsx
index 4a32f0df0..11cef5bce 100644
--- a/surfsense_web/lib/provider-icons.tsx
+++ b/surfsense_web/lib/provider-icons.tsx
@@ -1,7 +1,4 @@
-import {
- Bot,
- Shuffle,
-} from "lucide-react";
+import { Bot, Shuffle } from "lucide-react";
import { cn } from "@/lib/utils";
import { Ai21Icon } from "@/components/icons/providers";
import { AnthropicIcon } from "@/components/icons/providers";
@@ -41,10 +38,7 @@ import { ZhipuIcon } from "@/components/icons/providers";
*/
export function getProviderIcon(
provider: string,
- {
- isAutoMode,
- className = "size-4",
- }: { isAutoMode?: boolean; className?: string } = {}
+ { isAutoMode, className = "size-4" }: { isAutoMode?: boolean; className?: string } = {}
) {
if (isAutoMode || provider?.toUpperCase() === "AUTO") {
return ;
@@ -123,4 +117,3 @@ export function getProviderIcon(
return ;
}
}
-
diff --git a/surfsense_web/next.config.ts b/surfsense_web/next.config.ts
index 55a9296fd..3278b9f3d 100644
--- a/surfsense_web/next.config.ts
+++ b/surfsense_web/next.config.ts
@@ -41,9 +41,7 @@ const nextConfig: NextConfig = {
}
// SVGR: import *.svg as React components
- const fileLoaderRule = config.module.rules.find(
- (rule: any) => rule.test?.test?.(".svg"),
- );
+ const fileLoaderRule = config.module.rules.find((rule: any) => rule.test?.test?.(".svg"));
config.module.rules.push(
// Re-apply the existing file loader for *.svg?url imports
{
@@ -57,7 +55,7 @@ const nextConfig: NextConfig = {
issuer: fileLoaderRule.issuer,
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] },
use: ["@svgr/webpack"],
- },
+ }
);
fileLoaderRule.exclude = /\.svg$/i;
diff --git a/surfsense_web/svgr.d.ts b/surfsense_web/svgr.d.ts
index 79922fb0f..ada7f47c5 100644
--- a/surfsense_web/svgr.d.ts
+++ b/surfsense_web/svgr.d.ts
@@ -3,4 +3,3 @@ declare module "*.svg" {
const content: FC>;
export default content;
}
-