Skip to content

OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.

Python

refactor: Refactor settings to use a tab structure (#1563)

Mike Fortmane4bbece156e4
diff --git a/frontend/app/onboarding/_components/model-selector.tsx b/frontend/app/onboarding/_components/model-selector.tsx
index 189b2cafd..ad6df7374 100644
--- a/frontend/app/onboarding/_components/model-selector.tsx
+++ b/frontend/app/onboarding/_components/model-selector.tsx
@@ -1,3 +1,5 @@
+"use client";
+
import { CheckIcon, ChevronsUpDownIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { Badge } from "@/components/ui/badge";
diff --git a/frontend/app/settings/[tab]/page.tsx b/frontend/app/settings/[tab]/page.tsx
new file mode 100644
index 000000000..11177f8a2
--- /dev/null
+++ b/frontend/app/settings/[tab]/page.tsx
@@ -0,0 +1,132 @@
+import { dehydrate, HydrationBoundary } from "@tanstack/react-query";
+import { redirect } from "next/navigation";
+import { getQueryClient } from "@/app/api/get-query-client";
+import { fetchFromBackend } from "@/lib/fetch-server";
+import { AgentSettingsSection } from "../_components/agent-settings-section";
+import { ApiKeysSection } from "../_components/api-keys-section";
+import { ConnectorsTab } from "../_components/connectors-tab";
+import { IngestSettingsSection } from "../_components/ingest-settings-section";
+import ModelProviders from "../_components/model-providers";
+import { UsersAndRolesSection } from "../_components/users-and-roles-section";
+
+const VALID_TABS = [
+ "connectors",
+ "providers",
+ "langflow",
+ "api-keys",
+ "roles",
+] as const;
+
+type Tab = (typeof VALID_TABS)[number];
+
+async function getTabAuthContext() {
+ const [authRes, meRes] = await Promise.allSettled([
+ fetchFromBackend("auth/me"),
+ fetchFromBackend("users/me"),
+ ]);
+
+ const authData =
+ authRes.status === "fulfilled" && authRes.value.ok
+ ? await authRes.value.json()
+ : {};
+ const meData =
+ meRes.status === "fulfilled" && meRes.value.ok
+ ? await meRes.value.json()
+ : {};
+
+ return {
+ isNoAuthMode: Boolean(authData.no_auth_mode),
+ isIbmAuthMode: Boolean(authData.ibm_auth_mode),
+ isAuthenticated: Boolean(authData.authenticated),
+ rbacEnforced:
+ typeof meData.rbac_enforced === "boolean" ? meData.rbac_enforced : true,
+ permissions: new Set<string>(
+ Array.isArray(meData.permissions) ? meData.permissions : [],
+ ),
+ };
+}
+
+export default async function SettingsTabPage({
+ params,
+}: {
+ params: Promise<{ tab: string }>;
+}) {
+ const { tab } = await params;
+
+ if (!VALID_TABS.includes(tab as Tab)) {
+ redirect("/settings/connectors");
+ }
+
+ const {
+ isNoAuthMode,
+ isIbmAuthMode,
+ isAuthenticated,
+ rbacEnforced,
+ permissions,
+ } = await getTabAuthContext();
+
+ // Mirror the visibility logic from settings-nav.tsx
+ if (
+ tab === "roles" &&
+ (!rbacEnforced || (!isNoAuthMode && !permissions.has("users:list")))
+ ) {
+ redirect("/settings/connectors");
+ }
+ if (
+ tab === "api-keys" &&
+ (isIbmAuthMode || (!isAuthenticated && !isNoAuthMode))
+ ) {
+ redirect("/settings/connectors");
+ }
+ if (
+ tab === "providers" &&
+ !isNoAuthMode &&
+ !permissions.has("providers:write")
+ ) {
+ redirect("/settings/connectors");
+ }
+
+ const queryClient = getQueryClient();
+ try {
+ await queryClient.prefetchQuery({
+ queryKey: ["settings"],
+ queryFn: async () => {
+ const res = await fetchFromBackend("settings");
+ if (!res.ok) throw new Error("Failed to fetch settings");
+ return res.json();
+ },
+ });
+ } catch {
+ // Backend unavailable — client handles loading normally
+ }
+
+ if (tab === "api-keys") {
+ try {
+ await queryClient.prefetchQuery({
+ queryKey: ["api-keys"],
+ queryFn: async () => {
+ const res = await fetchFromBackend("keys");
+ if (!res.ok) throw new Error("Failed to fetch api keys");
+ return res.json();
+ },
+ });
+ } catch {
+ // Backend unavailable — client handles loading normally
+ }
+ }
+
+ return (
+ <HydrationBoundary state={dehydrate(queryClient)}>
+ {tab === "connectors" && <ConnectorsTab />}
+ {tab === "providers" && <ModelProviders />}
+ {tab === "langflow" && (
+ <div className="space-y-6">
+ <AgentSettingsSection />
+ <IngestSettingsSection />
+ </div>
+ )}
+ {tab === "api-keys" && <ApiKeysSection />}
+ {tab === "roles" && <UsersAndRolesSection />}
+ </HydrationBoundary>
+ );
+}
diff --git a/frontend/app/settings/_components/agent-settings-section.tsx b/frontend/app/settings/_components/agent-settings-section.tsx
new file mode 100644
index 000000000..7c71f889f
--- /dev/null
+++ b/frontend/app/settings/_components/agent-settings-section.tsx
@@ -0,0 +1,346 @@
+"use client";
+
+import { ArrowUpRight, Loader2 } from "lucide-react";
+import { usePathname, useRouter, useSearchParams } from "next/navigation";
+import { useEffect, useState } from "react";
+import { toast } from "sonner";
+import {
+ useGetAnthropicModelsQuery,
+ useGetIBMModelsQuery,
+ useGetOllamaModelsQuery,
+ useGetOpenAIModelsQuery,
+} from "@/app/api/queries/useGetModelsQuery";
+import { useGetSettingsQuery } from "@/app/api/queries/useGetSettingsQuery";
+import { ConfirmationDialog } from "@/components/confirmation-dialog";
+import { LabelWrapper } from "@/components/label-wrapper";
+import { RequirePermission } from "@/components/require-permission";
+import { Button } from "@/components/ui/button";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Textarea } from "@/components/ui/textarea";
+import { useAuth } from "@/contexts/auth-context";
+import { useIsCloudBrand } from "@/contexts/brand-context";
+import { DEFAULT_AGENT_SETTINGS, UI_CONSTANTS } from "@/lib/constants";
+import { deriveCloudLangflowUrl } from "@/lib/url-utils";
+import { cn } from "@/lib/utils";
+import { useUpdateSettingsMutation } from "../../api/mutations/useUpdateSettingsMutation";
+import { ModelSelector } from "../../onboarding/_components/model-selector";
+import { getModelLogo } from "../_helpers/model-helpers";
+import { LangflowIcon } from "./langflow-icon";
+
+const { MAX_SYSTEM_PROMPT_CHARS } = UI_CONSTANTS;
+
+export function AgentSettingsSection() {
+ const isCloudBrand = useIsCloudBrand();
+ const { isAuthenticated, isNoAuthMode, isIbmAuthMode } = useAuth();
+ const searchParams = useSearchParams();
+ const router = useRouter();
+ const pathname = usePathname();
+
+ const focusLlmModel = searchParams.get("focusLlmModel") === "true";
+ const [openLlmSelector, setOpenLlmSelector] = useState(false);
+ const [systemPrompt, setSystemPrompt] = useState<string>("");
+
+ const { data: settings = {} } = useGetSettingsQuery({
+ enabled: isAuthenticated || isNoAuthMode,
+ });
+
+ const { data: openaiModels, isLoading: openaiLoading } =
+ useGetOpenAIModelsQuery(
+ { apiKey: "" },
+ { enabled: settings?.providers?.openai?.configured === true },
+ );
+ const { data: anthropicModels, isLoading: anthropicLoading } =
+ useGetAnthropicModelsQuery(
+ { apiKey: "" },
+ { enabled: settings?.providers?.anthropic?.configured === true },
+ );
+ const { data: ollamaModels, isLoading: ollamaLoading } =
+ useGetOllamaModelsQuery(
+ { endpoint: settings?.providers?.ollama?.endpoint },
+ {
+ enabled:
+ settings?.providers?.ollama?.configured === true &&
+ !!settings?.providers?.ollama?.endpoint,
+ },
+ );
+ const { data: watsonxModels, isLoading: watsonxLoading } =
+ useGetIBMModelsQuery(
+ {
+ endpoint: settings?.providers?.watsonx?.endpoint,
+ apiKey: "",
+ projectId: settings?.providers?.watsonx?.project_id,
+ },
+ {
+ enabled:
+ settings?.providers?.watsonx?.configured === true &&
+ !!settings?.providers?.watsonx?.endpoint &&
+ !!settings?.providers?.watsonx?.project_id,
+ },
+ );
+
+ const groupedLlmModels = [
+ {
+ group: "OpenAI",
+ provider: "openai",
+ icon: getModelLogo("", "openai"),
+ models: openaiModels?.language_models || [],
+ configured: settings.providers?.openai?.configured === true,
+ },
+ {
+ group: "Anthropic",
+ provider: "anthropic",
+ icon: getModelLogo("", "anthropic"),
+ models: anthropicModels?.language_models || [],
+ configured: settings.providers?.anthropic?.configured === true,
+ },
+ {
+ group: "Ollama",
+ provider: "ollama",
+ icon: getModelLogo("", "ollama"),
+ models: ollamaModels?.language_models || [],
+ configured: settings.providers?.ollama?.configured === true,
+ },
+ {
+ group: "IBM watsonx.ai",
+ provider: "watsonx",
+ icon: getModelLogo("", "watsonx"),
+ models: watsonxModels?.language_models || [],
+ configured: settings.providers?.watsonx?.configured === true,
+ },
+ ]
+ .filter((p) => p.configured)
+ .map((p) => ({
+ group: p.group,
+ icon: p.icon,
+ options: p.models.map((m) => ({ ...m, provider: p.provider })),
+ }));
+
+ const isLoadingAnyLlmModels =
+ openaiLoading || anthropicLoading || ollamaLoading || watsonxLoading;
+
+ const updateSettingsMutation = useUpdateSettingsMutation({
+ onSuccess: () => {
+ toast.success("Settings updated successfully");
+ },
+ onError: (error) => {
+ toast.error("Failed to update settings", { description: error.message });
+ },
+ });
+
+ useEffect(() => {
+ if (settings.agent?.system_prompt) {
+ setSystemPrompt(settings.agent.system_prompt);
+ }
+ }, [settings.agent?.system_prompt]);
+
+ useEffect(() => {
+ if (focusLlmModel) {
+ setOpenLlmSelector(true);
+ const agentCard = document.getElementById("agent-card");
+ if (agentCard)
+ agentCard.scrollIntoView({ behavior: "smooth", block: "start" });
+ const newParams = new URLSearchParams(searchParams.toString());
+ newParams.delete("focusLlmModel");
+ router.replace(`${pathname}?${newParams.toString()}`, { scroll: false });
+ setTimeout(() => setOpenLlmSelector(false), 100);
+ }
+ }, [focusLlmModel, searchParams, router, pathname]);
+
+ const handleModelChange = (newModel: string, provider?: string) => {
+ if (newModel && provider) {
+ updateSettingsMutation.mutate({
+ llm_model: newModel,
+ llm_provider: provider,
+ });
+ } else if (newModel) {
+ updateSettingsMutation.mutate({ llm_model: newModel });
+ }
+ };
+
+ const handleSystemPromptSave = () => {
+ updateSettingsMutation.mutate({ system_prompt: systemPrompt });
+ };
+
+ const handleEditInLangflow = (closeDialog: () => void) => {
+ const cloudLangflowUrl =
+ isIbmAuthMode && typeof window !== "undefined"
+ ? deriveCloudLangflowUrl(window.location.origin)
+ : null;
+ const derivedFromWindow =
+ typeof window !== "undefined"
+ ? `${window.location.protocol}//${window.location.hostname}:7860`
+ : "";
+ const base = (
+ cloudLangflowUrl ||
+ settings.langflow_public_url ||
+ derivedFromWindow ||
+ "http://localhost:7860"
+ ).replace(/\/$/, "");
+ const computed = settings.flow_id
+ ? `${base}/flow/${settings.flow_id}`
+ : base;
+ window.open(
+ settings.langflow_edit_url || computed,
+ "_blank",
+ "noopener,noreferrer",
+ );
+ closeDialog();
+ };
+
+ const handleRestoreRetrievalFlow = (closeDialog: () => void) => {
+ fetch("/api/reset-flow/retrieval", { method: "POST" })
+ .then((res) => {
+ if (res.ok) return res.json();
+ throw new Error(`HTTP ${res.status}: ${res.statusText}`);
+ })
+ .then(() => {
+ setSystemPrompt(DEFAULT_AGENT_SETTINGS.system_prompt);
+ closeDialog();
+ })
+ .catch((err) => {
+ console.error("Error restoring retrieval flow:", err);
+ closeDialog();
+ });
+ };
+
+ return (
+ <Card id="agent-card">
+ <CardHeader>
+ <div className="flex items-center justify-between mb-3">
+ <CardTitle
+ className={cn(
+ "text-lg",
+ isCloudBrand && "ibm-settings-section-title",
+ )}
+ >
+ Agent
+ </CardTitle>
+ <RequirePermission perm="flows:edit">
+ <div className="flex gap-2">
+ <ConfirmationDialog
+ trigger={
+ <Button ignoreTitleCase={true} variant="outline">
+ Restore flow
+ </Button>
+ }
+ title="Restore default Agent flow"
+ description="This restores defaults and discards all custom settings and overrides. This can't be undone."
+ confirmText="Restore"
+ variant="destructive"
+ onConfirm={handleRestoreRetrievalFlow}
+ />
+ <ConfirmationDialog
+ trigger={
+ <Button>
+ <LangflowIcon />
+ Edit in Langflow
+ </Button>
+ }
+ title="Edit Agent flow in Langflow"
+ description={
+ <>
+ <p className="mb-2">
+ You&apos;re entering Langflow. You can edit the{" "}
+ <b>Agent flow</b> and other underlying flows. Manual
+ changes to components, wiring, or I/O can break this
+ experience.
+ </p>
+ <p className="mb-2">
+ To enable editing, you need to unlock the flow by clicking
+ on its name and disabling the <b>Lock flow</b> option.
+ </p>
+ <p>You can restore this flow from Settings.</p>
+ </>
+ }
+ confirmText="Proceed"
+ confirmIcon={<ArrowUpRight />}
+ onConfirm={handleEditInLangflow}
+ variant="warning"
+ />
+ </div>
+ </RequirePermission>
+ </div>
+ <CardDescription>
+ This Agent retrieves from your knowledge and generates chat responses.
+ Edit in Langflow for full control.
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ <div className="space-y-6">
+ <div className="space-y-2">
+ <LabelWrapper
+ label="Language model"
+ helperText="Model used for chat"
+ id="language-model"
+ required={true}
+ >
+ <ModelSelector
+ groupedOptions={groupedLlmModels}
+ noOptionsPlaceholder={
+ isLoadingAnyLlmModels
+ ? "Loading models..."
+ : "No language models detected. Configure a provider first."
+ }
+ value={settings.agent?.llm_model || ""}
+ onValueChange={handleModelChange}
+ defaultOpen={openLlmSelector}
+ />
+ </LabelWrapper>
+ </div>
+ <div className="space-y-2">
+ <LabelWrapper label="Agent Instructions" id="system-prompt">
+ <Textarea
+ id="system-prompt"
+ placeholder="Enter your agent instructions here..."
+ value={systemPrompt}
+ onChange={(e) => setSystemPrompt(e.target.value)}
+ rows={6}
+ className={`resize-none ${
+ systemPrompt.length > MAX_SYSTEM_PROMPT_CHARS
+ ? "!border-destructive focus:border-destructive"
+ : ""
+ }`}
+ />
+ </LabelWrapper>
+ <span
+ className={`text-xs ${
+ systemPrompt.length > MAX_SYSTEM_PROMPT_CHARS
+ ? "text-destructive"
+ : "text-muted-foreground"
+ }`}
+ >
+ {systemPrompt.length}/{MAX_SYSTEM_PROMPT_CHARS} characters
+ </span>
+ </div>
+ <div className="flex justify-end pt-2">
+ <Button
+ onClick={handleSystemPromptSave}
+ disabled={
+ updateSettingsMutation.isPending ||
+ systemPrompt.length > MAX_SYSTEM_PROMPT_CHARS
+ }
+ className="min-w-[120px]"
+ size="sm"
+ variant="outline"
+ >
+ {updateSettingsMutation.isPending ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Saving...
+ </>
+ ) : (
+ "Save Agent Instructions"
+ )}
+ </Button>
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
diff --git a/frontend/app/settings/_components/anthropic-settings-dialog.tsx b/frontend/app/settings/_components/anthropic-settings-dialog.tsx
index f120ad36c..aba959b40 100644
--- a/frontend/app/settings/_components/anthropic-settings-dialog.tsx
+++ b/frontend/app/settings/_components/anthropic-settings-dialog.tsx
@@ -92,7 +92,7 @@ const AnthropicSettingsDialog = ({
action: {
label: "Settings",
onClick: () => {
- router.push("/settings?focusLlmModel=true");
+ router.push("/settings/langflow?focusLlmModel=true");
},
},
});
diff --git a/frontend/app/settings/_components/api-keys-section.tsx b/frontend/app/settings/_components/api-keys-section.tsx
new file mode 100644
index 000000000..c5c0c4aee
--- /dev/null
+++ b/frontend/app/settings/_components/api-keys-section.tsx
@@ -0,0 +1,305 @@
+"use client";
+
+import { Copy, Key, Loader2, Plus, Trash2 } from "lucide-react";
+import { useState } from "react";
+import { toast } from "sonner";
+import { useCreateApiKeyMutation } from "@/app/api/mutations/useCreateApiKeyMutation";
+import { useRevokeApiKeyMutation } from "@/app/api/mutations/useRevokeApiKeyMutation";
+import { useGetApiKeysQuery } from "@/app/api/queries/useGetApiKeysQuery";
+import { ConfirmationDialog } from "@/components/confirmation-dialog";
+import { LabelWrapper } from "@/components/label-wrapper";
+import { RequirePermission } from "@/components/require-permission";
+import { Button } from "@/components/ui/button";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog";
+import { Input } from "@/components/ui/input";
+import { useAuth } from "@/contexts/auth-context";
+import { useIsCloudBrand } from "@/contexts/brand-context";
+import { cn } from "@/lib/utils";
+
+function formatDate(dateString: string | null) {
+ if (!dateString) return "Never";
+ return new Date(dateString).toLocaleDateString(undefined, {
+ year: "numeric",
+ month: "short",
+ day: "numeric",
+ });
+}
+
+export function ApiKeysSection() {
+ const isCloudBrand = useIsCloudBrand();
+ const { isAuthenticated, isNoAuthMode } = useAuth();
+
+ const [createKeyDialogOpen, setCreateKeyDialogOpen] = useState(false);
+ const [newKeyName, setNewKeyName] = useState("");
+ const [newlyCreatedKey, setNewlyCreatedKey] = useState<string | null>(null);
+ const [showKeyDialogOpen, setShowKeyDialogOpen] = useState(false);
+
+ const { data: apiKeysData, isLoading: apiKeysLoading } = useGetApiKeysQuery({
+ enabled: isAuthenticated || isNoAuthMode,
+ });
+
+ const createApiKeyMutation = useCreateApiKeyMutation({
+ onSuccess: (data) => {
+ setNewlyCreatedKey(data.api_key);
+ setCreateKeyDialogOpen(false);
+ setShowKeyDialogOpen(true);
+ setNewKeyName("");
+ toast.success("API key created");
+ },
+ onError: (error) => {
+ toast.error("Failed to create API key", { description: error.message });
+ },
+ });
+
+ const revokeApiKeyMutation = useRevokeApiKeyMutation({
+ onSuccess: () => {
+ toast.success("API key revoked");
+ },
+ onError: (error) => {
+ toast.error("Failed to revoke API key", { description: error.message });
+ },
+ });
+
+ const handleCreateApiKey = () => {
+ if (!newKeyName.trim()) {
+ toast.error("Please enter a name for the API key");
+ return;
+ }
+ createApiKeyMutation.mutate({ name: newKeyName.trim() });
+ };
+
+ const handleCopyApiKey = async () => {
+ if (newlyCreatedKey) {
+ try {
+ await navigator.clipboard.writeText(newlyCreatedKey);
+ toast.success("API key copied to clipboard");
+ } catch {
+ toast.error("Failed to copy API key to clipboard");
+ }
+ }
+ };
+
+ return (
+ <>
+ <Card>
+ <CardHeader>
+ <div className="flex items-center justify-between mb-3">
+ <CardTitle
+ className={cn(
+ "text-lg",
+ isCloudBrand && "ibm-settings-section-title",
+ )}
+ >
+ API Keys
+ </CardTitle>
+ <RequirePermission perm="apikeys:create:self">
+ <Button onClick={() => setCreateKeyDialogOpen(true)} size="sm">
+ <Plus className="h-4 w-4 mr-2" />
+ Create Key
+ </Button>
+ </RequirePermission>
+ </div>
+ <CardDescription>
+ API keys allow programmatic access to OpenRAG via the public API.
+ Keep your keys secure and never share them publicly.
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ {apiKeysLoading ? (
+ <div className="flex items-center justify-center py-8">
+ <Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
+ </div>
+ ) : apiKeysData?.keys && apiKeysData.keys.length > 0 ? (
+ <div className="border rounded-lg overflow-hidden">
+ <table className="w-full">
+ <thead className="bg-muted/50">
+ <tr>
+ <th className="text-left text-sm font-medium text-muted-foreground px-4 py-3">
+ Name
+ </th>
+ <th className="text-left text-sm font-medium text-muted-foreground px-4 py-3">
+ Key
+ </th>
+ <th className="text-left text-sm font-medium text-muted-foreground px-4 py-3">
+ Created
+ </th>
+ <th className="text-left text-sm font-medium text-muted-foreground px-4 py-3">
+ Last Used
+ </th>
+ <th className="text-right text-sm font-medium text-muted-foreground px-4 py-3">
+ Actions
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ {apiKeysData.keys.map((key) => (
+ <tr key={key.key_id} className="border-t">
+ <td className="px-4 py-3 text-sm font-medium">
+ {key.name}
+ </td>
+ <td className="px-4 py-3">
+ <code className="text-sm bg-muted px-2 py-1 rounded">
+ {key.key_prefix}...
+ </code>
+ </td>
+ <td className="px-4 py-3 text-sm text-muted-foreground">
+ {formatDate(key.created_at)}
+ </td>
+ <td className="px-4 py-3 text-sm text-muted-foreground">
+ {formatDate(key.last_used_at)}
+ </td>
+ <td className="px-4 py-3 text-right">
+ <ConfirmationDialog
+ trigger={
+ <Button
+ variant="ghost"
+ size="sm"
+ className="text-destructive hover:text-destructive hover:bg-destructive/10"
+ >
+ <Trash2 className="h-4 w-4" />
+ </Button>
+ }
+ title="Revoke API Key"
+ description={
+ <>
+ Are you sure you want to revoke the API key{" "}
+ <strong>{key.name}</strong>? This action cannot be
+ undone and any applications using this key will
+ stop working.
+ </>
+ }
+ confirmText="Revoke"
+ variant="destructive"
+ onConfirm={(closeDialog) => {
+ revokeApiKeyMutation.mutate({ key_id: key.key_id });
+ closeDialog();
+ }}
+ />
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ ) : (
+ <div className="text-center py-8">
+ <Key className="h-12 w-12 mx-auto text-muted-foreground/50 mb-4" />
+ <p className="text-muted-foreground mb-4">
+ No API keys yet. Create one to get started.
+ </p>
+ <RequirePermission perm="apikeys:create:self">
+ <Button
+ variant="outline"
+ onClick={() => setCreateKeyDialogOpen(true)}
+ size="sm"
+ >
+ <Plus className="h-4 w-4 mr-2" />
+ Create your first API key
+ </Button>
+ </RequirePermission>
+ </div>
+ )}
+ </CardContent>
+ </Card>
+
+ <Dialog open={createKeyDialogOpen} onOpenChange={setCreateKeyDialogOpen}>
+ <DialogContent>
+ <DialogHeader>
+ <DialogTitle>Create API Key</DialogTitle>
+ <DialogDescription>
+ Give your API key a name to help you identify it later.
+ </DialogDescription>
+ </DialogHeader>
+ <div className="py-4">
+ <LabelWrapper label="Name" id="api-key-name">
+ <Input
+ id="api-key-name"
+ placeholder="e.g., Production App, Development"
+ value={newKeyName}
+ onChange={(e) => setNewKeyName(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") handleCreateApiKey();
+ }}
+ />
+ </LabelWrapper>
+ </div>
+ <DialogFooter>
+ <Button
+ variant="ghost"
+ onClick={() => {
+ setCreateKeyDialogOpen(false);
+ setNewKeyName("");
+ }}
+ size="sm"
+ >
+ Cancel
+ </Button>
+ <Button
+ onClick={handleCreateApiKey}
+ disabled={createApiKeyMutation.isPending || !newKeyName.trim()}
+ size="sm"
+ >
+ {createApiKeyMutation.isPending ? (
+ <>
+ <Loader2 className="h-4 w-4 mr-2 animate-spin" />
+ Creating...
+ </>
+ ) : (
+ "Create Key"
+ )}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+
+ <Dialog
+ open={showKeyDialogOpen}
+ onOpenChange={(open) => {
+ setShowKeyDialogOpen(open);
+ if (!open) setNewlyCreatedKey(null);
+ }}
+ >
+ <DialogContent>
+ <DialogHeader>
+ <DialogTitle>API Key Created</DialogTitle>
+ <DialogDescription>
+ Copy your API key now. You won&apos;t be able to see it again.
+ </DialogDescription>
+ </DialogHeader>
+ <div className="py-4">
+ <div className="bg-muted rounded-lg p-4 font-mono text-sm break-all">
+ {newlyCreatedKey}
+ </div>
+ </div>
+ <DialogFooter>
+ <Button
+ variant="ghost"
+ onClick={() => setShowKeyDialogOpen(false)}
+ size="sm"
+ >
+ Close
+ </Button>
+ <Button onClick={handleCopyApiKey} size="sm">
+ <Copy className="h-4 w-4 mr-2" />
+ Copy Key
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ </>
+ );
+}
diff --git a/frontend/app/settings/_components/connectors-tab.tsx b/frontend/app/settings/_components/connectors-tab.tsx
new file mode 100644
index 000000000..31a2cd933
--- /dev/null
+++ b/frontend/app/settings/_components/connectors-tab.tsx
@@ -0,0 +1,70 @@
+"use client";
+
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { useAuth } from "@/contexts/auth-context";
+import { useIsCloudBrand } from "@/contexts/brand-context";
+import { cn } from "@/lib/utils";
+import ConnectorCards from "./connector-cards";
+
+export function ConnectorsTab() {
+ const isCloudBrand = useIsCloudBrand();
+ const { isNoAuthMode } = useAuth();
+
+ return (
+ <div className="space-y-6">
+ {isNoAuthMode && (
+ <Card className="border-accent-amber-foreground">
+ <CardHeader>
+ <CardTitle
+ className={cn(
+ "text-lg",
+ isCloudBrand && "ibm-settings-section-title",
+ )}
+ >
+ Cloud connectors require authentication
+ </CardTitle>
+ <CardDescription className="text-sm">
+ Add the Google OAuth variables below to your <code>.env</code>{" "}
+ then restart the OpenRAG containers.
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ <div className="bg-muted rounded-md p-4 font-mono text-sm">
+ <div className="text-muted-foreground">
+ <div>
+ <span className="mr-3 text-placeholder-foreground">27</span>
+ <span># Google OAuth</span>
+ </div>
+ <div>
+ <span className="mr-3 text-placeholder-foreground">28</span>
+ <span># Create credentials here:</span>
+ </div>
+ <div>
+ <span className="mr-3 text-placeholder-foreground">29</span>
+ <span>
+ # https://console.cloud.google.com/apis/credentials
+ </span>
+ </div>
+ </div>
+ <div>
+ <span className="mr-3 text-placeholder-foreground">30</span>
+ <span>GOOGLE_OAUTH_CLIENT_ID=</span>
+ </div>
+ <div>
+ <span className="mr-3 text-placeholder-foreground">31</span>
+ <span>GOOGLE_OAUTH_CLIENT_SECRET=</span>
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+ )}
+ <ConnectorCards />
+ </div>
+ );
+}
diff --git a/frontend/app/settings/_components/ingest-settings-section.tsx b/frontend/app/settings/_components/ingest-settings-section.tsx
new file mode 100644
index 000000000..0d27850ed
--- /dev/null
+++ b/frontend/app/settings/_components/ingest-settings-section.tsx
@@ -0,0 +1,507 @@
+"use client";
+
+import { ArrowUpRight, Loader2, Minus, Plus } from "lucide-react";
+import { useEffect, useState } from "react";
+import { toast } from "sonner";
+import {
+ useGetIBMModelsQuery,
+ useGetOllamaModelsQuery,
+ useGetOpenAIModelsQuery,
+} from "@/app/api/queries/useGetModelsQuery";
+import { useGetSettingsQuery } from "@/app/api/queries/useGetSettingsQuery";
+import { ConfirmationDialog } from "@/components/confirmation-dialog";
+import { LabelWrapper } from "@/components/label-wrapper";
+import { RequirePermission } from "@/components/require-permission";
+import { Button } from "@/components/ui/button";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { Switch } from "@/components/ui/switch";
+import { useAuth } from "@/contexts/auth-context";
+import { useIsCloudBrand } from "@/contexts/brand-context";
+import { DEFAULT_KNOWLEDGE_SETTINGS } from "@/lib/constants";
+import { deriveCloudLangflowUrl } from "@/lib/url-utils";
+import { cn } from "@/lib/utils";
+import { useUpdateSettingsMutation } from "../../api/mutations/useUpdateSettingsMutation";
+import { ModelSelector } from "../../onboarding/_components/model-selector";
+import { getModelLogo } from "../_helpers/model-helpers";
+import { LangflowIcon } from "./langflow-icon";
+
+export function IngestSettingsSection() {
+ const isCloudBrand = useIsCloudBrand();
+ const { isAuthenticated, isNoAuthMode, isIbmAuthMode } = useAuth();
+
+ const [chunkSize, setChunkSize] = useState<number>(1024);
+ const [chunkOverlap, setChunkOverlap] = useState<number>(50);
+ const [chunkValidationError, setChunkValidationError] = useState<
+ string | null
+ >(null);
+ const [tableStructure, setTableStructure] = useState<boolean>(true);
+ const [ocr, setOcr] = useState<boolean>(false);
+ const [pictureDescriptions, setPictureDescriptions] =
+ useState<boolean>(false);
+
+ const { data: settings = {} } = useGetSettingsQuery({
+ enabled: isAuthenticated || isNoAuthMode,
+ });
+
+ const { data: openaiModels, isLoading: openaiLoading } =
+ useGetOpenAIModelsQuery(
+ { apiKey: "" },
+ { enabled: settings?.providers?.openai?.configured === true },
+ );
+ const { data: ollamaModels, isLoading: ollamaLoading } =
+ useGetOllamaModelsQuery(
+ { endpoint: settings?.providers?.ollama?.endpoint },
+ {
+ enabled:
+ settings?.providers?.ollama?.configured === true &&
+ !!settings?.providers?.ollama?.endpoint,
+ },
+ );
+ const { data: watsonxModels, isLoading: watsonxLoading } =
+ useGetIBMModelsQuery(
+ {
+ endpoint: settings?.providers?.watsonx?.endpoint,
+ apiKey: "",
+ projectId: settings?.providers?.watsonx?.project_id,
+ },
+ {
+ enabled:
+ settings?.providers?.watsonx?.configured === true &&
+ !!settings?.providers?.watsonx?.endpoint &&
+ !!settings?.providers?.watsonx?.project_id,
+ },
+ );
+
+ const groupedEmbeddingModels = [
+ {
+ group: "OpenAI",
+ provider: "openai",
+ icon: getModelLogo("", "openai"),
+ models: openaiModels?.embedding_models || [],
+ configured: settings.providers?.openai?.configured === true,
+ },
+ {
+ group: "Ollama",
+ provider: "ollama",
+ icon: getModelLogo("", "ollama"),
+ models: ollamaModels?.embedding_models || [],
+ configured: settings.providers?.ollama?.configured === true,
+ },
+ {
+ group: "IBM watsonx.ai",
+ provider: "watsonx",
+ icon: getModelLogo("", "watsonx"),
+ models: watsonxModels?.embedding_models || [],
+ configured: settings.providers?.watsonx?.configured === true,
+ },
+ ]
+ .filter((p) => p.configured)
+ .map((p) => ({
+ group: p.group,
+ icon: p.icon,
+ options: p.models.map((m) => ({ ...m, provider: p.provider })),
+ }));
+
+ const isLoadingAnyEmbeddingModels =
+ openaiLoading || ollamaLoading || watsonxLoading;
+
+ const updateSettingsMutation = useUpdateSettingsMutation({
+ onSuccess: () => {
+ toast.success("Settings updated successfully");
+ },
+ onError: (error) => {
+ toast.error("Failed to update settings", { description: error.message });
+ },
+ });
+
+ useEffect(() => {
+ if (settings.knowledge?.chunk_size !== undefined)
+ setChunkSize(settings.knowledge.chunk_size);
+ }, [settings.knowledge?.chunk_size]);
+
+ useEffect(() => {
+ if (settings.knowledge?.chunk_overlap !== undefined)
+ setChunkOverlap(settings.knowledge.chunk_overlap);
+ }, [settings.knowledge?.chunk_overlap]);
+
+ useEffect(() => {
+ if (settings.knowledge?.table_structure !== undefined)
+ setTableStructure(settings.knowledge.table_structure);
+ }, [settings.knowledge?.table_structure]);
+
+ useEffect(() => {
+ if (settings.knowledge?.ocr !== undefined) setOcr(settings.knowledge.ocr);
+ }, [settings.knowledge?.ocr]);
+
+ useEffect(() => {
+ if (settings.knowledge?.picture_descriptions !== undefined)
+ setPictureDescriptions(settings.knowledge.picture_descriptions);
+ }, [settings.knowledge?.picture_descriptions]);
+
+ const k = settings.knowledge;
+ const knowledgeIngestDirty =
+ chunkSize !== (k?.chunk_size ?? chunkSize) ||
+ chunkOverlap !== (k?.chunk_overlap ?? chunkOverlap) ||
+ tableStructure !== (k?.table_structure ?? tableStructure) ||
+ ocr !== (k?.ocr ?? ocr) ||
+ pictureDescriptions !== (k?.picture_descriptions ?? pictureDescriptions);
+
+ const handleEmbeddingModelChange = (newModel: string, provider?: string) => {
+ if (newModel && provider) {
+ updateSettingsMutation.mutate({
+ embedding_model: newModel,
+ embedding_provider: provider,
+ });
+ } else if (newModel) {
+ updateSettingsMutation.mutate({ embedding_model: newModel });
+ }
+ };
+
+ const handleChunkSizeChange = (value: string) => {
+ setChunkSize(Math.max(0, Number.parseInt(value, 10) || 0));
+ setChunkValidationError(null);
+ };
+
+ const handleChunkOverlapChange = (value: string) => {
+ setChunkOverlap(Math.max(0, Number.parseInt(value, 10) || 0));
+ setChunkValidationError(null);
+ };
+
+ const handleKnowledgeIngestSave = () => {
+ if (chunkSize < 1) {
+ const msg = "Chunk size must be at least 1";
+ setChunkValidationError(msg);
+ toast.error("Could not save ingest settings", { description: msg });
+ return;
+ }
+ if (chunkOverlap >= chunkSize) {
+ const msg = "Chunk overlap must be less than chunk size";
+ setChunkValidationError(msg);
+ toast.error("Could not save ingest settings", { description: msg });
+ return;
+ }
+ updateSettingsMutation.mutate(
+ {
+ chunk_size: chunkSize,
+ chunk_overlap: chunkOverlap,
+ table_structure: tableStructure,
+ ocr,
+ picture_descriptions: pictureDescriptions,
+ },
+ { onSuccess: () => setChunkValidationError(null) },
+ );
+ };
+
+ const handleEditInLangflow = (closeDialog: () => void) => {
+ const cloudLangflowUrl =
+ isIbmAuthMode && typeof window !== "undefined"
+ ? deriveCloudLangflowUrl(window.location.origin)
+ : null;
+ const derivedFromWindow =
+ typeof window !== "undefined"
+ ? `${window.location.protocol}//${window.location.hostname}:7860`
+ : "";
+ const base = (
+ cloudLangflowUrl ||
+ settings.langflow_public_url ||
+ derivedFromWindow ||
+ "http://localhost:7860"
+ ).replace(/\/$/, "");
+ const computed = settings.ingest_flow_id
+ ? `${base}/flow/${settings.ingest_flow_id}`
+ : base;
+ window.open(
+ settings.langflow_ingest_edit_url || computed,
+ "_blank",
+ "noopener,noreferrer",
+ );
+ closeDialog();
+ };
+
+ const handleRestoreIngestFlow = (closeDialog: () => void) => {
+ fetch("/api/reset-flow/ingest", { method: "POST" })
+ .then((res) => {
+ if (res.ok) return res.json();
+ throw new Error(`HTTP ${res.status}: ${res.statusText}`);
+ })
+ .then(() => {
+ setChunkSize(DEFAULT_KNOWLEDGE_SETTINGS.chunk_size);
+ setChunkOverlap(DEFAULT_KNOWLEDGE_SETTINGS.chunk_overlap);
+ setTableStructure(DEFAULT_KNOWLEDGE_SETTINGS.table_structure);
+ setOcr(DEFAULT_KNOWLEDGE_SETTINGS.ocr);
+ setPictureDescriptions(DEFAULT_KNOWLEDGE_SETTINGS.picture_descriptions);
+ setChunkValidationError(null);
+ closeDialog();
+ })
+ .catch((err) => {
+ console.error("Error restoring ingest flow:", err);
+ closeDialog();
+ });
+ };
+
+ return (
+ <Card>
+ <CardHeader>
+ <div className="flex items-center justify-between mb-3">
+ <CardTitle
+ className={cn(
+ "text-lg",
+ isCloudBrand && "ibm-settings-section-title",
+ )}
+ >
+ Knowledge Ingest
+ </CardTitle>
+ <RequirePermission perm="flows:edit">
+ <div className="flex gap-2">
+ <ConfirmationDialog
+ trigger={
+ <Button ignoreTitleCase={true} variant="outline">
+ Restore flow
+ </Button>
+ }
+ title="Restore default Ingest flow"
+ description="This restores defaults and discards all custom settings and overrides. This can't be undone."
+ confirmText="Restore"
+ variant="destructive"
+ onConfirm={handleRestoreIngestFlow}
+ />
+ <ConfirmationDialog
+ trigger={
+ <Button>
+ <LangflowIcon />
+ Edit in Langflow
+ </Button>
+ }
+ title="Edit Ingest flow in Langflow"
+ description={
+ <>
+ <p className="mb-2">
+ You&apos;re entering Langflow. You can edit the{" "}
+ <b>Ingest flow</b> and other underlying flows. Manual
+ changes to components, wiring, or I/O can break this
+ experience.
+ </p>
+ <p className="mb-2">
+ To enable editing, you need to unlock the flow by clicking
+ on its name and disabling the <b>Lock flow</b> option.
+ </p>
+ <p>You can restore this flow from Settings.</p>
+ </>
+ }
+ confirmText="Proceed"
+ confirmIcon={<ArrowUpRight />}
+ variant="warning"
+ onConfirm={handleEditInLangflow}
+ />
+ </div>
+ </RequirePermission>
+ </div>
+ <CardDescription>
+ Configure how files are ingested and stored for retrieval. The
+ embedding model saves as soon as you pick one; chunk and ingest
+ options use Save ingest settings. Edit in Langflow for full control.
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ <div className="space-y-6">
+ <div className="space-y-2">
+ <LabelWrapper
+ helperText="Saves immediately when you select a model"
+ id="embedding-model-select"
+ label="Embedding model"
+ required={true}
+ >
+ <ModelSelector
+ groupedOptions={groupedEmbeddingModels}
+ noOptionsPlaceholder={
+ isLoadingAnyEmbeddingModels
+ ? "Loading models..."
+ : "No embedding models detected. Configure a provider first."
+ }
+ value={settings.knowledge?.embedding_model || ""}
+ onValueChange={handleEmbeddingModelChange}
+ />
+ </LabelWrapper>
+ </div>
+ <div className="grid grid-cols-2 gap-4">
+ <div className="space-y-2">
+ <LabelWrapper id="chunk-size" label="Chunk size">
+ <div className="relative [&:has(input:hover):not(:has(input:focus))_button]:border-muted-foreground [&:has(input:focus)_button]:border-foreground">
+ <Input
+ id="chunk-size"
+ type="number"
+ min="1"
+ value={chunkSize}
+ onChange={(e) => handleChunkSizeChange(e.target.value)}
+ className={`w-full pr-20 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none${chunkValidationError ? " border-destructive" : ""}`}
+ />
+ <div className="absolute inset-y-0 right-0 flex items-center">
+ <span className="text-sm text-placeholder-foreground mr-4 pointer-events-none">
+ characters
+ </span>
+ <div className="flex flex-col">
+ <Button
+ aria-label="Increase value"
+ className="h-5 rounded-l-none rounded-br-none border-input border-b-[0.5px] focus-visible:relative transition-colors"
+ variant="outline"
+ size="iconSm"
+ onClick={() =>
+ handleChunkSizeChange((chunkSize + 1).toString())
+ }
+ >
+ <Plus className="text-muted-foreground" size={8} />
+ </Button>
+ <Button
+ aria-label="Decrease value"
+ className="h-5 rounded-l-none rounded-tr-none border-input border-t-[0.5px] focus-visible:relative transition-colors"
+ variant="outline"
+ size="iconSm"
+ onClick={() =>
+ handleChunkSizeChange((chunkSize - 1).toString())
+ }
+ >
+ <Minus className="text-muted-foreground" size={8} />
+ </Button>
+ </div>
+ </div>
+ </div>
+ </LabelWrapper>
+ </div>
+ <div className="space-y-2">
+ <LabelWrapper id="chunk-overlap" label="Chunk overlap">
+ <div className="relative [&:has(input:hover):not(:has(input:focus))_button]:border-muted-foreground [&:has(input:focus)_button]:border-foreground">
+ <Input
+ id="chunk-overlap"
+ type="number"
+ min="0"
+ value={chunkOverlap}
+ onChange={(e) => handleChunkOverlapChange(e.target.value)}
+ className={`w-full pr-20 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none${chunkValidationError ? " border-destructive" : ""}`}
+ />
+ <div className="absolute inset-y-0 right-0 flex items-center">
+ <span className="text-sm text-placeholder-foreground mr-4 pointer-events-none">
+ characters
+ </span>
+ <div className="flex flex-col">
+ <Button
+ aria-label="Increase value"
+ className="h-5 rounded-l-none rounded-br-none border-input border-b-[0.5px] focus-visible:relative transition-colors"
+ variant="outline"
+ size="iconSm"
+ onClick={() =>
+ handleChunkOverlapChange(
+ (chunkOverlap + 1).toString(),
+ )
+ }
+ >
+ <Plus className="text-muted-foreground" size={8} />
+ </Button>
+ <Button
+ aria-label="Decrease value"
+ className="h-5 rounded-l-none rounded-tr-none border-input border-t-[0.5px] focus-visible:relative transition-colors"
+ variant="outline"
+ size="iconSm"
+ onClick={() =>
+ handleChunkOverlapChange(
+ (chunkOverlap - 1).toString(),
+ )
+ }
+ >
+ <Minus className="text-muted-foreground" size={8} />
+ </Button>
+ </div>
+ </div>
+ </div>
+ </LabelWrapper>
+ {chunkValidationError && (
+ <p className="text-sm text-destructive mt-1" role="alert">
+ {chunkValidationError}
+ </p>
+ )}
+ </div>
+ </div>
+ <div>
+ <div className="flex items-center justify-between py-3 border-b border-border">
+ <div className="flex-1">
+ <Label
+ htmlFor="table-structure"
+ className="text-base font-medium cursor-pointer pb-3"
+ >
+ Table Structure
+ </Label>
+ <div className="text-sm text-muted-foreground">
+ Capture table structure during ingest.
+ </div>
+ </div>
+ <Switch
+ id="table-structure"
+ checked={tableStructure}
+ onCheckedChange={setTableStructure}
+ />
+ </div>
+ <div className="flex items-center justify-between py-3 border-b border-border">
+ <div className="flex-1">
+ <Label
+ htmlFor="ocr"
+ className="text-base font-medium cursor-pointer pb-3"
+ >
+ OCR
+ </Label>
+ <div className="text-sm text-muted-foreground">
+ Extracts text from images/PDFs. Ingest is slower when enabled.
+ </div>
+ </div>
+ <Switch id="ocr" checked={ocr} onCheckedChange={setOcr} />
+ </div>
+ <div className="flex items-center justify-between py-3">
+ <div className="flex-1">
+ <Label
+ htmlFor="picture-descriptions"
+ className="text-base font-medium cursor-pointer pb-3"
+ >
+ Picture Descriptions
+ </Label>
+ <div className="text-sm text-muted-foreground">
+ Adds captions for images. Ingest is slower when enabled.
+ </div>
+ </div>
+ <Switch
+ id="picture-descriptions"
+ checked={pictureDescriptions}
+ onCheckedChange={setPictureDescriptions}
+ />
+ </div>
+ </div>
+ <div className="flex justify-end pt-2">
+ <Button
+ onClick={handleKnowledgeIngestSave}
+ disabled={
+ updateSettingsMutation.isPending || !knowledgeIngestDirty
+ }
+ className="min-w-[120px]"
+ size="sm"
+ variant="outline"
+ >
+ {updateSettingsMutation.isPending ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Saving...
+ </>
+ ) : (
+ "Save ingest settings"
+ )}
+ </Button>
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
diff --git a/frontend/app/settings/_components/langflow-icon.tsx b/frontend/app/settings/_components/langflow-icon.tsx
new file mode 100644
index 000000000..e8d918ce8
--- /dev/null
+++ b/frontend/app/settings/_components/langflow-icon.tsx
@@ -0,0 +1,30 @@
+export function LangflowIcon({
+ className = "h-4 w-4 mr-2",
+}: {
+ className?: string;
+}) {
+ return (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="22"
+ viewBox="0 0 24 22"
+ className={className}
+ aria-label="Langflow icon"
+ >
+ <title>Langflow icon</title>
+ <path
+ fill="currentColor"
+ d="M13.0486 0.462158H9.75399C9.44371 0.462158 9.14614 0.586082 8.92674 0.806667L4.03751 5.72232C3.81811 5.9429 3.52054 6.06682 3.21026 6.06682H1.16992C0.511975 6.06682 -0.0165756 6.61212 0.000397655 7.2734L0.0515933 9.26798C0.0679586 9.90556 0.586745 10.4139 1.22111 10.4139H3.59097C3.90124 10.4139 4.19881 10.2899 4.41821 10.0694L9.34823 5.11269C9.56763 4.89211 9.8652 4.76818 10.1755 4.76818H13.0486C13.6947 4.76818 14.2185 4.24157 14.2185 3.59195V1.63839C14.2185 0.988773 13.6947 0.462158 13.0486 0.462158Z"
+ />
+ <path
+ fill="currentColor"
+ d="M19.5355 11.5862H22.8301C23.4762 11.5862 24 12.1128 24 12.7624V14.716C24 15.3656 23.4762 15.8922 22.8301 15.8922H19.957C19.6467 15.8922 19.3491 16.0161 19.1297 16.2367L14.1997 21.1934C13.9803 21.414 13.6827 21.5379 13.3725 21.5379H11.0026C10.3682 21.5379 9.84945 21.0296 9.83309 20.392L9.78189 18.3974C9.76492 17.7361 10.2935 17.1908 10.9514 17.1908H12.9918C13.302 17.1908 13.5996 17.0669 13.819 16.8463L18.7082 11.9307C18.9276 11.7101 19.2252 11.5862 19.5355 11.5862Z"
+ />
+ <path
+ fill="currentColor"
+ d="M19.5355 2.9796L22.8301 2.9796C23.4762 2.9796 24 3.50622 24 4.15583V6.1094C24 6.75901 23.4762 7.28563 22.8301 7.28563H19.957C19.6467 7.28563 19.3491 7.40955 19.1297 7.63014L14.1997 12.5868C13.9803 12.8074 13.6827 12.9313 13.3725 12.9313H10.493C10.1913 12.9313 9.90126 13.0485 9.68346 13.2583L4.14867 18.5917C3.93087 18.8016 3.64085 18.9187 3.33917 18.9187H1.32174C0.675616 18.9187 0.151832 18.3921 0.151832 17.7425V15.7343C0.151832 15.0846 0.675616 14.558 1.32174 14.558H3.32468C3.63496 14.558 3.93253 14.4341 4.15193 14.2135L9.40827 8.92878C9.62767 8.70819 9.92524 8.58427 10.2355 8.58427H12.9918C13.302 8.58427 13.5996 8.46034 13.819 8.23976L18.7082 3.32411C18.9276 3.10353 19.2252 2.9796 19.5355 2.9796Z"
+ />
+ </svg>
+ );
+}
diff --git a/frontend/app/settings/_components/model-providers.tsx b/frontend/app/settings/_components/model-providers.tsx
index 1fe2a025f..c6ee5327f 100644
--- a/frontend/app/settings/_components/model-providers.tsx
+++ b/frontend/app/settings/_components/model-providers.tsx
@@ -1,3 +1,5 @@
+"use client";
+
import { useRouter, useSearchParams } from "next/navigation";
import { type ReactNode, useEffect, useState } from "react";
import { useGetSettingsQuery } from "@/app/api/queries/useGetSettingsQuery";
diff --git a/frontend/app/settings/_components/ollama-settings-dialog.tsx b/frontend/app/settings/_components/ollama-settings-dialog.tsx
index e9bd0cc56..3cab232f7 100644
--- a/frontend/app/settings/_components/ollama-settings-dialog.tsx
+++ b/frontend/app/settings/_components/ollama-settings-dialog.tsx
@@ -102,7 +102,7 @@ const OllamaSettingsDialog = ({
action: {
label: "Settings",
onClick: () => {
- router.push("/settings?focusLlmModel=true");
+ router.push("/settings/langflow?focusLlmModel=true");
},
},
});
diff --git a/frontend/app/settings/_components/openai-settings-dialog.tsx b/frontend/app/settings/_components/openai-settings-dialog.tsx
index bd6b2f4d2..8b4b56464 100644
--- a/frontend/app/settings/_components/openai-settings-dialog.tsx
+++ b/frontend/app/settings/_components/openai-settings-dialog.tsx
@@ -99,7 +99,7 @@ const OpenAISettingsDialog = ({
action: {
label: "Settings",
onClick: () => {
- router.push("/settings?focusLlmModel=true");
+ router.push("/settings/langflow?focusLlmModel=true");
},
},
});
diff --git a/frontend/app/settings/_components/settings-nav.tsx b/frontend/app/settings/_components/settings-nav.tsx
new file mode 100644
index 000000000..3543dea23
--- /dev/null
+++ b/frontend/app/settings/_components/settings-nav.tsx
@@ -0,0 +1,49 @@
+"use client";
+
+import { usePathname, useRouter } from "next/navigation";
+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/settings-tabs";
+import { useAuth } from "@/contexts/auth-context";
+import { usePermissions } from "@/hooks/use-permissions";
+
+const TABS = [
+ { value: "connectors", label: "Connectors" },
+ { value: "providers", label: "Providers", perm: "providers:write" },
+ { value: "langflow", label: "Langflow" },
+ { value: "api-keys", label: "API Keys", apiKeysTab: true },
+ { value: "roles", label: "Roles & Permissions", rbacPerm: "users:list" },
+] as const;
+
+export function SettingsNav() {
+ const pathname = usePathname();
+ const router = useRouter();
+ const { isAuthenticated, isNoAuthMode, isIbmAuthMode, rbacEnforced } =
+ useAuth();
+ const { can } = usePermissions();
+
+ const currentTab = pathname.split("/").pop() ?? "connectors";
+
+ const visibleTabs = TABS.filter((tab) => {
+ if ("perm" in tab) return can(tab.perm);
+ if ("apiKeysTab" in tab)
+ return (isAuthenticated || isNoAuthMode) && !isIbmAuthMode;
+ if ("rbacPerm" in tab) return rbacEnforced && can(tab.rbacPerm);
+ return true;
+ });
+
+ return (
+ <Tabs value={currentTab}>
+ <TabsList className="mb-6 p-2 rounded-full">
+ {visibleTabs.map((tab) => (
+ <TabsTrigger
+ key={tab.value}
+ value={tab.value}
+ onClick={() => router.push(`/settings/${tab.value}`)}
+ className="p-3 rounded-full"
+ >
+ {tab.label}
+ </TabsTrigger>
+ ))}
+ </TabsList>
+ </Tabs>
+ );
+}
diff --git a/frontend/app/settings/_components/settings-shell.tsx b/frontend/app/settings/_components/settings-shell.tsx
new file mode 100644
index 000000000..0bf3c6690
--- /dev/null
+++ b/frontend/app/settings/_components/settings-shell.tsx
@@ -0,0 +1,28 @@
+"use client";
+
+import { useIsCloudBrand } from "@/contexts/brand-context";
+import { cn } from "@/lib/utils";
+import { SettingsNav } from "./settings-nav";
+
+export function SettingsShell({ children }: { children: React.ReactNode }) {
+ const isCloudBrand = useIsCloudBrand();
+ return (
+ <div
+ className={cn(
+ "pb-6",
+ isCloudBrand && "font-ibm-plex-sans ibm-settings-page",
+ )}
+ >
+ <h2
+ className={cn(
+ "text-lg font-semibold mb-6",
+ isCloudBrand && "ibm-section-title",
+ )}
+ >
+ Settings
+ </h2>
+ <SettingsNav />
+ {children}
+ </div>
+ );
+}
diff --git a/frontend/app/settings/_components/watsonx-settings-dialog.tsx b/frontend/app/settings/_components/watsonx-settings-dialog.tsx
index 4afaec08e..56c265f64 100644
--- a/frontend/app/settings/_components/watsonx-settings-dialog.tsx
+++ b/frontend/app/settings/_components/watsonx-settings-dialog.tsx
@@ -105,7 +105,7 @@ const WatsonxSettingsDialog = ({
action: {
label: "Settings",
onClick: () => {
- router.push("/settings?focusLlmModel=true");
+ router.push("/settings/langflow?focusLlmModel=true");
},
},
});
diff --git a/frontend/app/settings/layout.tsx b/frontend/app/settings/layout.tsx
new file mode 100644
index 000000000..77aab9fef
--- /dev/null
+++ b/frontend/app/settings/layout.tsx
@@ -0,0 +1,14 @@
+import { Suspense } from "react";
+import { SettingsShell } from "./_components/settings-shell";
+
+export default function SettingsLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ return (
+ <Suspense>
+ <SettingsShell>{children}</SettingsShell>
+ </Suspense>
+ );
+}
diff --git a/frontend/app/settings/page.tsx b/frontend/app/settings/page.tsx
index fc2350f2d..6d4cdc537 100644
--- a/frontend/app/settings/page.tsx
+++ b/frontend/app/settings/page.tsx
@@ -1,37 +1,5 @@
-import { dehydrate, HydrationBoundary } from "@tanstack/react-query";
-import { getQueryClient } from "@/app/api/get-query-client";
-import { fetchFromBackend } from "@/lib/fetch-server";
-import SettingsClient from "./settings-client";
+import { redirect } from "next/navigation";
-export default async function SettingsPage() {
- const queryClient = getQueryClient();
-
- try {
- await Promise.all([
- queryClient.prefetchQuery({
- queryKey: ["settings"],
- queryFn: async () => {
- const res = await fetchFromBackend("settings");
- if (!res.ok) throw new Error("Failed to fetch settings");
- return res.json();
- },
- }),
- queryClient.prefetchQuery({
- queryKey: ["api-keys"],
- queryFn: async () => {
- const res = await fetchFromBackend("keys");
- if (!res.ok) throw new Error("Failed to fetch api keys");
- return res.json();
- },
- }),
- ]);
- } catch {
- // Backend unavailable or unauthenticated — client handles loading/auth normally
- }
-
- return (
- <HydrationBoundary state={dehydrate(queryClient)}>
- <SettingsClient />
- </HydrationBoundary>
- );
+export default function SettingsPage() {
+ redirect("/settings/connectors");
}
diff --git a/frontend/app/settings/settings-client.tsx b/frontend/app/settings/settings-client.tsx
deleted file mode 100644
index 9cfa4133f..000000000
--- a/frontend/app/settings/settings-client.tsx
+++ /dev/null
@@ -1,1395 +0,0 @@
-"use client";
-
-import {
- ArrowUpRight,
- Copy,
- Key,
- Loader2,
- Minus,
- Plus,
- Trash2,
-} from "lucide-react";
-import Link from "next/link";
-import { useRouter, useSearchParams } from "next/navigation";
-import { Suspense, useEffect, useState } from "react";
-import { toast } from "sonner";
-import { useCreateApiKeyMutation } from "@/app/api/mutations/useCreateApiKeyMutation";
-import { useRevokeApiKeyMutation } from "@/app/api/mutations/useRevokeApiKeyMutation";
-import { useGetApiKeysQuery } from "@/app/api/queries/useGetApiKeysQuery";
-import {
- useGetAnthropicModelsQuery,
- useGetIBMModelsQuery,
- useGetOllamaModelsQuery,
- useGetOpenAIModelsQuery,
-} from "@/app/api/queries/useGetModelsQuery";
-import { useGetSettingsQuery } from "@/app/api/queries/useGetSettingsQuery";
-import { ConfirmationDialog } from "@/components/confirmation-dialog";
-import { LabelWrapper } from "@/components/label-wrapper";
-import { ProtectedRoute } from "@/components/protected-route";
-import { RequirePermission } from "@/components/require-permission";
-import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-import {
- Dialog,
- DialogContent,
- DialogDescription,
- DialogFooter,
- DialogHeader,
- DialogTitle,
-} from "@/components/ui/dialog";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
-import { Textarea } from "@/components/ui/textarea";
-import { useAuth } from "@/contexts/auth-context";
-import { useIsCloudBrand } from "@/contexts/brand-context";
-import { useTask } from "@/contexts/task-context";
-import {
- DEFAULT_AGENT_SETTINGS,
- DEFAULT_KNOWLEDGE_SETTINGS,
- UI_CONSTANTS,
-} from "@/lib/constants";
-import { deriveCloudLangflowUrl } from "@/lib/url-utils";
-import { cn } from "@/lib/utils";
-import { useUpdateSettingsMutation } from "../api/mutations/useUpdateSettingsMutation";
-import { ModelSelector } from "../onboarding/_components/model-selector";
-import ConnectorCards from "./_components/connector-cards";
-import ModelProviders from "./_components/model-providers";
-import { UsersAndRolesSection } from "./_components/users-and-roles-section";
-import { getModelLogo, type ModelProvider } from "./_helpers/model-helpers";
-
-const { MAX_SYSTEM_PROMPT_CHARS } = UI_CONSTANTS;
-
-function KnowledgeSourcesPage() {
- const isCloudBrand = useIsCloudBrand();
- const { isAuthenticated, isNoAuthMode, isIbmAuthMode, rbacEnforced } =
- useAuth();
- const { addTask, tasks } = useTask();
- const searchParams = useSearchParams();
- const router = useRouter();
-
- // Check if we should auto-open the LLM model selector
- const focusLlmModel = searchParams.get("focusLlmModel") === "true";
- // Use a trigger state that changes each time we detect the query param
- const [openLlmSelector, setOpenLlmSelector] = useState(false);
-
- // API Keys state
- const [createKeyDialogOpen, setCreateKeyDialogOpen] = useState(false);
- const [newKeyName, setNewKeyName] = useState("");
- const [newlyCreatedKey, setNewlyCreatedKey] = useState<string | null>(null);
- const [showKeyDialogOpen, setShowKeyDialogOpen] = useState(false);
-
- // Only keep systemPrompt state since it needs manual save button
- const [systemPrompt, setSystemPrompt] = useState<string>("");
- const [chunkSize, setChunkSize] = useState<number>(1024);
- const [chunkOverlap, setChunkOverlap] = useState<number>(50);
- const [chunkValidationError, setChunkValidationError] = useState<
- string | null
- >(null);
- const [tableStructure, setTableStructure] = useState<boolean>(true);
- const [ocr, setOcr] = useState<boolean>(false);
- const [pictureDescriptions, setPictureDescriptions] =
- useState<boolean>(false);
-
- // Fetch settings using React Query
- const { data: settings = {} } = useGetSettingsQuery({
- enabled: isAuthenticated || isNoAuthMode,
- });
-
- // Fetch API keys
- const { data: apiKeysData, isLoading: apiKeysLoading } = useGetApiKeysQuery({
- enabled: isAuthenticated || isNoAuthMode,
- });
-
- // API key mutations
- const createApiKeyMutation = useCreateApiKeyMutation({
- onSuccess: (data) => {
- setNewlyCreatedKey(data.api_key);
- setCreateKeyDialogOpen(false);
- setShowKeyDialogOpen(true);
- setNewKeyName("");
- toast.success("API key created");
- },
- onError: (error) => {
- toast.error("Failed to create API key", { description: error.message });
- },
- });
-
- const revokeApiKeyMutation = useRevokeApiKeyMutation({
- onSuccess: () => {
- toast.success("API key revoked");
- },
- onError: (error) => {
- toast.error("Failed to revoke API key", { description: error.message });
- },
- });
-
- // Fetch models for each provider
- const { data: openaiModels, isLoading: openaiLoading } =
- useGetOpenAIModelsQuery(
- { apiKey: "" },
- { enabled: settings?.providers?.openai?.configured === true },
- );
-
- const { data: anthropicModels, isLoading: anthropicLoading } =
- useGetAnthropicModelsQuery(
- { apiKey: "" },
- { enabled: settings?.providers?.anthropic?.configured === true },
- );
-
- const { data: ollamaModels, isLoading: ollamaLoading } =
- useGetOllamaModelsQuery(
- { endpoint: settings?.providers?.ollama?.endpoint },
- {
- enabled:
- settings?.providers?.ollama?.configured === true &&
- !!settings?.providers?.ollama?.endpoint,
- },
- );
-
- const { data: watsonxModels, isLoading: watsonxLoading } =
- useGetIBMModelsQuery(
- {
- endpoint: settings?.providers?.watsonx?.endpoint,
- apiKey: "",
- projectId: settings?.providers?.watsonx?.project_id,
- },
- {
- enabled:
- settings?.providers?.watsonx?.configured === true &&
- !!settings?.providers?.watsonx?.endpoint &&
- !!settings?.providers?.watsonx?.project_id,
- },
- );
-
- // Build grouped LLM model options from all configured providers
- const groupedLlmModels = [
- {
- group: "OpenAI",
- provider: "openai",
- icon: getModelLogo("", "openai"),
- models: openaiModels?.language_models || [],
- configured: settings.providers?.openai?.configured === true,
- },
- {
- group: "Anthropic",
- provider: "anthropic",
- icon: getModelLogo("", "anthropic"),
- models: anthropicModels?.language_models || [],
- configured: settings.providers?.anthropic?.configured === true,
- },
- {
- group: "Ollama",
- provider: "ollama",
- icon: getModelLogo("", "ollama"),
- models: ollamaModels?.language_models || [],
- configured: settings.providers?.ollama?.configured === true,
- },
- {
- group: "IBM watsonx.ai",
- provider: "watsonx",
- icon: getModelLogo("", "watsonx"),
- models: watsonxModels?.language_models || [],
- configured: settings.providers?.watsonx?.configured === true,
- },
- ]
- .filter((provider) => provider.configured)
- .map((provider) => ({
- group: provider.group,
- icon: provider.icon,
- options: provider.models.map((model) => ({
- ...model,
- provider: provider.provider,
- })),
- }));
-
- // Build grouped embedding model options from all configured providers (excluding Anthropic)
- const groupedEmbeddingModels = [
- {
- group: "OpenAI",
- provider: "openai",
- icon: getModelLogo("", "openai"),
- models: openaiModels?.embedding_models || [],
- configured: settings.providers?.openai?.configured === true,
- },
- {
- group: "Ollama",
- provider: "ollama",
- icon: getModelLogo("", "ollama"),
- models: ollamaModels?.embedding_models || [],
- configured: settings.providers?.ollama?.configured === true,
- },
- {
- group: "IBM watsonx.ai",
- provider: "watsonx",
- icon: getModelLogo("", "watsonx"),
- models: watsonxModels?.embedding_models || [],
- configured: settings.providers?.watsonx?.configured === true,
- },
- ]
- .filter((provider) => provider.configured)
- .map((provider) => ({
- group: provider.group,
- icon: provider.icon,
- options: provider.models.map((model) => ({
- ...model,
- provider: provider.provider,
- })),
- }));
-
- const isLoadingAnyLlmModels =
- openaiLoading || anthropicLoading || ollamaLoading || watsonxLoading;
- const isLoadingAnyEmbeddingModels =
- openaiLoading || ollamaLoading || watsonxLoading;
-
- // Mutations
- const updateSettingsMutation = useUpdateSettingsMutation({
- onSuccess: () => {
- toast.success("Settings updated successfully");
- },
- onError: (error) => {
- toast.error("Failed to update settings", {
- description: error.message,
- });
- },
- });
-
- // Sync system prompt state with settings data
- useEffect(() => {
- if (settings.agent?.system_prompt) {
- setSystemPrompt(settings.agent.system_prompt);
- }
- }, [settings.agent?.system_prompt]);
-
- // Sync chunk size and overlap state with settings data
- useEffect(() => {
- if (settings.knowledge?.chunk_size) {
- setChunkSize(settings.knowledge.chunk_size);
- }
- }, [settings.knowledge?.chunk_size]);
-
- useEffect(() => {
- if (settings.knowledge?.chunk_overlap) {
- setChunkOverlap(settings.knowledge.chunk_overlap);
- }
- }, [settings.knowledge?.chunk_overlap]);
-
- // Sync docling settings with settings data
- useEffect(() => {
- if (settings.knowledge?.table_structure !== undefined) {
- setTableStructure(settings.knowledge.table_structure);
- }
- }, [settings.knowledge?.table_structure]);
-
- useEffect(() => {
- if (settings.knowledge?.ocr !== undefined) {
- setOcr(settings.knowledge.ocr);
- }
- }, [settings.knowledge?.ocr]);
-
- useEffect(() => {
- if (settings.knowledge?.picture_descriptions !== undefined) {
- setPictureDescriptions(settings.knowledge.picture_descriptions);
- }
- }, [settings.knowledge?.picture_descriptions]);
-
- const k = settings.knowledge;
- const knowledgeIngestDirty =
- chunkSize !== (k?.chunk_size ?? chunkSize) ||
- chunkOverlap !== (k?.chunk_overlap ?? chunkOverlap) ||
- tableStructure !== (k?.table_structure ?? tableStructure) ||
- ocr !== (k?.ocr ?? ocr) ||
- pictureDescriptions !== (k?.picture_descriptions ?? pictureDescriptions);
-
- // Handle auto-focus on LLM model selector when coming from provider setup
- useEffect(() => {
- if (focusLlmModel) {
- // Trigger the selector to open
- setOpenLlmSelector(true);
-
- // Scroll to the agent card
- const agentCard = document.getElementById("agent-card");
- if (agentCard) {
- agentCard.scrollIntoView({ behavior: "smooth", block: "start" });
- }
-
- // Clear the query parameter
- const newSearchParams = new URLSearchParams(searchParams.toString());
- newSearchParams.delete("focusLlmModel");
- router.replace(`/settings?${newSearchParams.toString()}`, {
- scroll: false,
- });
-
- // Reset the trigger after a brief delay so it can be triggered again
- setTimeout(() => setOpenLlmSelector(false), 100);
- }
- }, [focusLlmModel, searchParams, router]);
-
- // Update model selection immediately (also updates provider)
- const handleModelChange = (newModel: string, provider?: string) => {
- if (newModel && provider) {
- updateSettingsMutation.mutate({
- llm_model: newModel,
- llm_provider: provider,
- });
- } else if (newModel) {
- updateSettingsMutation.mutate({ llm_model: newModel });
- }
- };
-
- // Update system prompt with save button
- const handleSystemPromptSave = () => {
- updateSettingsMutation.mutate({ system_prompt: systemPrompt });
- };
-
- const handleEmbeddingModelChange = (newModel: string, provider?: string) => {
- if (newModel && provider) {
- updateSettingsMutation.mutate({
- embedding_model: newModel,
- embedding_provider: provider,
- });
- } else if (newModel) {
- updateSettingsMutation.mutate({ embedding_model: newModel });
- }
- };
-
- const handleChunkSizeChange = (value: string) => {
- const numValue = Math.max(0, Number.parseInt(value, 10) || 0);
- setChunkSize(numValue);
- setChunkValidationError(null);
- };
-
- const handleChunkOverlapChange = (value: string) => {
- const numValue = Math.max(0, Number.parseInt(value, 10) || 0);
- setChunkOverlap(numValue);
- setChunkValidationError(null);
- };
-
- const handleKnowledgeIngestSave = () => {
- if (chunkSize < 1) {
- const msg = "Chunk size must be at least 1";
- setChunkValidationError(msg);
- toast.error("Could not save ingest settings", { description: msg });
- return;
- }
- if (chunkOverlap >= chunkSize) {
- const msg = "Chunk overlap must be less than chunk size";
- setChunkValidationError(msg);
- toast.error("Could not save ingest settings", { description: msg });
- return;
- }
- updateSettingsMutation.mutate(
- {
- chunk_size: chunkSize,
- chunk_overlap: chunkOverlap,
- table_structure: tableStructure,
- ocr,
- picture_descriptions: pictureDescriptions,
- },
- {
- onSuccess: () => setChunkValidationError(null),
- },
- );
- };
-
- const handleTableStructureChange = (checked: boolean) => {
- setTableStructure(checked);
- };
-
- const handleOcrChange = (checked: boolean) => {
- setOcr(checked);
- };
-
- const handlePictureDescriptionsChange = (checked: boolean) => {
- setPictureDescriptions(checked);
- };
-
- // API Keys handlers
- const handleCreateApiKey = () => {
- if (!newKeyName.trim()) {
- toast.error("Please enter a name for the API key");
- return;
- }
- createApiKeyMutation.mutate({ name: newKeyName.trim() });
- };
-
- const handleRevokeApiKey = (keyId: string) => {
- revokeApiKeyMutation.mutate({ key_id: keyId });
- };
-
- const handleCopyApiKey = async () => {
- if (newlyCreatedKey) {
- await navigator.clipboard.writeText(newlyCreatedKey);
- toast.success("API key copied to clipboard");
- }
- };
-
- const formatDate = (dateString: string | null) => {
- if (!dateString) return "Never";
- const date = new Date(dateString);
- return date.toLocaleDateString(undefined, {
- year: "numeric",
- month: "short",
- day: "numeric",
- });
- };
-
- // Check connector status on mount and when returning from OAuth
- useEffect(() => {
- if (searchParams.get("oauth_success") === "true") {
- const url = new URL(window.location.href);
- url.searchParams.delete("oauth_success");
- window.history.replaceState({}, "", url.toString());
- }
- }, [searchParams]);
-
- // Track previous tasks to detect new completions
- const [prevTasks, setPrevTasks] = useState<typeof tasks>([]);
-
- // Watch for task completions and refresh stats
- useEffect(() => {
- // Find newly completed tasks by comparing with previous state
- const newlyCompletedTasks = tasks.filter((task) => {
- const wasCompleted =
- prevTasks.find((prev) => prev.task_id === task.task_id)?.status ===
- "completed";
- return task.status === "completed" && !wasCompleted;
- });
-
- if (newlyCompletedTasks.length > 0) {
- // Task completed - could refresh data here if needed
- const timeoutId = setTimeout(() => {
- // Stats refresh removed
- }, 1000);
-
- // Update previous tasks state
- setPrevTasks(tasks);
-
- return () => clearTimeout(timeoutId);
- } else {
- // Always update previous tasks state
- setPrevTasks(tasks);
- }
- }, [tasks, prevTasks]);
-
- const handleEditInLangflow = (
- flowType: "chat" | "ingest",
- closeDialog: () => void,
- ) => {
- // Select the appropriate flow ID and edit URL based on flow type
- const targetFlowId =
- flowType === "ingest" ? settings.ingest_flow_id : settings.flow_id;
- const editUrl =
- flowType === "ingest"
- ? settings.langflow_ingest_edit_url
- : settings.langflow_edit_url;
-
- const cloudLangflowUrl =
- isIbmAuthMode && typeof window !== "undefined"
- ? deriveCloudLangflowUrl(window.location.origin)
- : null;
- const derivedFromWindow =
- typeof window !== "undefined"
- ? `${window.location.protocol}//${window.location.hostname}:7860`
- : "";
- const base = (
- cloudLangflowUrl ||
- settings.langflow_public_url ||
- derivedFromWindow ||
- "http://localhost:7860"
- ).replace(/\/$/, "");
- const computed = targetFlowId ? `${base}/flow/${targetFlowId}` : base;
-
- const url = editUrl || computed;
-
- window.open(url, "_blank");
- closeDialog(); // Close immediately after opening Langflow
- };
-
- const handleRestoreRetrievalFlow = (closeDialog: () => void) => {
- fetch(`/api/reset-flow/retrieval`, {
- method: "POST",
- })
- .then((response) => {
- if (response.ok) {
- return response.json();
- }
- throw new Error(`HTTP ${response.status}: ${response.statusText}`);
- })
- .then(() => {
- // Flow restoration is complete - backend already updated flow with current provider/model
- // Just reset the UI form value for system prompt
- setSystemPrompt(DEFAULT_AGENT_SETTINGS.system_prompt);
- closeDialog(); // Close after successful completion
- })
- .catch((error) => {
- console.error("Error restoring retrieval flow:", error);
- closeDialog(); // Close even on error (could show error toast instead)
- });
- };
-
- const handleRestoreIngestFlow = (closeDialog: () => void) => {
- fetch(`/api/reset-flow/ingest`, {
- method: "POST",
- })
- .then((response) => {
- if (response.ok) {
- return response.json();
- }
- throw new Error(`HTTP ${response.status}: ${response.statusText}`);
- })
- .then(() => {
- // Only reset form values if the API call was successful
- setChunkSize(DEFAULT_KNOWLEDGE_SETTINGS.chunk_size);
- setChunkOverlap(DEFAULT_KNOWLEDGE_SETTINGS.chunk_overlap);
- setTableStructure(false);
- setOcr(false);
- setPictureDescriptions(false);
- setChunkValidationError(null);
- closeDialog(); // Close after successful completion
- })
- .catch((error) => {
- console.error("Error restoring ingest flow:", error);
- closeDialog(); // Close even on error (could show error toast instead)
- });
- };
-
- return (
- <div
- className={cn(
- "space-y-8 pb-6",
- isCloudBrand && "font-ibm-plex-sans",
- isCloudBrand && "ibm-settings-page",
- )}
- >
- {/* Connectors Section */}
- <div className="space-y-6">
- <div>
- <h2
- className={cn(
- "mb-2 text-lg font-semibold tracking-tight",
- isCloudBrand && "ibm-settings-section-title",
- )}
- >
- Cloud Connectors
- </h2>
- </div>
-
- {/* Conditional Sync Settings or No-Auth Message */}
- {
- isNoAuthMode ? (
- <Card className="border-accent-amber-foreground">
- <CardHeader>
- <CardTitle
- className={cn(
- "text-lg",
- isCloudBrand && "ibm-settings-section-title",
- )}
- >
- Cloud connectors require authentication
- </CardTitle>
- <CardDescription className="text-sm">
- Add the Google OAuth variables below to your <code>.env</code>{" "}
- then restart the OpenRAG containers.
- </CardDescription>
- </CardHeader>
- <CardContent>
- <div className="bg-muted rounded-md p-4 font-mono text-sm">
- <div className="text-muted-foreground">
- <div>
- <span className="mr-3 text-placeholder-foreground">
- 27
- </span>
- <span># Google OAuth</span>
- </div>
- <div>
- <span className="mr-3 text-placeholder-foreground">
- 28
- </span>
- <span># Create credentials here:</span>
- </div>
- <div>
- <span className="mr-3 text-placeholder-foreground">
- 29
- </span>
- <span>
- # https://console.cloud.google.com/apis/credentials
- </span>
- </div>
- </div>
- <div>
- <span className="mr-3 text-placeholder-foreground">30</span>
- <span>GOOGLE_OAUTH_CLIENT_ID=</span>
- </div>
- <div>
- <span className="mr-3 text-placeholder-foreground">31</span>
- <span>GOOGLE_OAUTH_CLIENT_SECRET=</span>
- </div>
- </div>
- </CardContent>
- </Card>
- ) : null
- // <div className="flex items-center justify-between py-4">
- // <div>
- // <h3 className="text-lg font-medium">Sync Settings</h3>
- // <p className="text-sm text-muted-foreground">
- // Configure how many files to sync when manually triggering a sync
- // </p>
- // </div>
- // <div className="flex items-center gap-4">
- // <div className="flex items-center space-x-2">
- // <Checkbox
- // id="syncAllFiles"
- // checked={syncAllFiles}
- // onCheckedChange={checked => {
- // setSyncAllFiles(!!checked);
- // if (checked) {
- // setMaxFiles(0);
- // } else {
- // setMaxFiles(10);
- // }
- // }}
- // />
- // <Label
- // htmlFor="syncAllFiles"
- // className="font-medium whitespace-nowrap"
- // >
- // Sync all files
- // </Label>
- // </div>
- // <Label
- // htmlFor="maxFiles"
- // className="font-medium whitespace-nowrap"
- // >
- // Max files per sync:
- // </Label>
- // <div className="relative">
- // <Input
- // id="maxFiles"
- // type="number"
- // value={syncAllFiles ? 0 : maxFiles}
- // onChange={e => setMaxFiles(parseInt(e.target.value) || 10)}
- // disabled={syncAllFiles}
- // className="w-16 min-w-16 max-w-16 flex-shrink-0 disabled:opacity-50 disabled:cursor-not-allowed"
- // min="1"
- // max="100"
- // title={
- // syncAllFiles
- // ? "Disabled when 'Sync all files' is checked"
- // : "Leave blank or set to 0 for unlimited"
- // }
- // />
- // </div>
- // </div>
- // </div>
- }
- {/* Connectors Grid */}
- <ConnectorCards />
- </div>
-
- {/* Model Providers Section — admin only (workspace-level provider keys) */}
- <RequirePermission perm="providers:write">
- <div className="space-y-6">
- <div>
- <h2
- className={cn(
- "mb-2 text-lg font-semibold tracking-tight",
- isCloudBrand && "ibm-settings-section-title",
- )}
- >
- Model Providers
- </h2>
- </div>
- <ModelProviders />
- </div>
- </RequirePermission>
-
- {/* Agent Behavior Section */}
- <Card id="agent-card">
- <CardHeader>
- <div className="flex items-center justify-between mb-3">
- <CardTitle
- className={cn(
- "text-lg",
- isCloudBrand && "ibm-settings-section-title",
- )}
- >
- Agent
- </CardTitle>
- <RequirePermission perm="flows:edit">
- <div className="flex gap-2">
- <ConfirmationDialog
- trigger={
- <Button ignoreTitleCase={true} variant="outline">
- Restore flow
- </Button>
- }
- title="Restore default Agent flow"
- description="This restores defaults and discards all custom settings and overrides. This can’t be undone."
- confirmText="Restore"
- variant="destructive"
- onConfirm={handleRestoreRetrievalFlow}
- />
- <ConfirmationDialog
- trigger={
- <Button>
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="24"
- height="22"
- viewBox="0 0 24 22"
- className="h-4 w-4 mr-2"
- aria-label="Langflow icon"
- >
- <title>Langflow icon</title>
- <path
- fill="currentColor"
- d="M13.0486 0.462158H9.75399C9.44371 0.462158 9.14614 0.586082 8.92674 0.806667L4.03751 5.72232C3.81811 5.9429 3.52054 6.06682 3.21026 6.06682H1.16992C0.511975 6.06682 -0.0165756 6.61212 0.000397655 7.2734L0.0515933 9.26798C0.0679586 9.90556 0.586745 10.4139 1.22111 10.4139H3.59097C3.90124 10.4139 4.19881 10.2899 4.41821 10.0694L9.34823 5.11269C9.56763 4.89211 9.8652 4.76818 10.1755 4.76818H13.0486C13.6947 4.76818 14.2185 4.24157 14.2185 3.59195V1.63839C14.2185 0.988773 13.6947 0.462158 13.0486 0.462158Z"
- ></path>
- <path
- fill="currentColor"
- d="M19.5355 11.5862H22.8301C23.4762 11.5862 24 12.1128 24 12.7624V14.716C24 15.3656 23.4762 15.8922 22.8301 15.8922H19.957C19.6467 15.8922 19.3491 16.0161 19.1297 16.2367L14.1997 21.1934C13.9803 21.414 13.6827 21.5379 13.3725 21.5379H11.0026C10.3682 21.5379 9.84945 21.0296 9.83309 20.392L9.78189 18.3974C9.76492 17.7361 10.2935 17.1908 10.9514 17.1908H12.9918C13.302 17.1908 13.5996 17.0669 13.819 16.8463L18.7082 11.9307C18.9276 11.7101 19.2252 11.5862 19.5355 11.5862Z"
- ></path>
- <path
- fill="currentColor"
- d="M19.5355 2.9796L22.8301 2.9796C23.4762 2.9796 24 3.50622 24 4.15583V6.1094C24 6.75901 23.4762 7.28563 22.8301 7.28563H19.957C19.6467 7.28563 19.3491 7.40955 19.1297 7.63014L14.1997 12.5868C13.9803 12.8074 13.6827 12.9313 13.3725 12.9313H10.493C10.1913 12.9313 9.90126 13.0485 9.68346 13.2583L4.14867 18.5917C3.93087 18.8016 3.64085 18.9187 3.33917 18.9187H1.32174C0.675616 18.9187 0.151832 18.3921 0.151832 17.7425V15.7343C0.151832 15.0846 0.675616 14.558 1.32174 14.558H3.32468C3.63496 14.558 3.93253 14.4341 4.15193 14.2135L9.40827 8.92878C9.62767 8.70819 9.92524 8.58427 10.2355 8.58427H12.9918C13.302 8.58427 13.5996 8.46034 13.819 8.23976L18.7082 3.32411C18.9276 3.10353 19.2252 2.9796 19.5355 2.9796Z"
- ></path>
- </svg>
- Edit in Langflow
- </Button>
- }
- title="Edit Agent flow in Langflow"
- description={
- <>
- <p className="mb-2">
- You&apos;re entering Langflow. You can edit the{" "}
- <b>Agent flow</b> and other underlying flows. Manual
- changes to components, wiring, or I/O can break this
- experience.
- </p>
- <p className="mb-2">
- To enable editing, you need to unlock the flow by
- clicking on its name and disabling the <b>Lock flow</b>{" "}
- option.
- </p>
- <p>You can restore this flow from Settings.</p>
- </>
- }
- confirmText="Proceed"
- confirmIcon={<ArrowUpRight />}
- onConfirm={(closeDialog) =>
- handleEditInLangflow("chat", closeDialog)
- }
- variant="warning"
- />
- </div>
- </RequirePermission>
- </div>
- <CardDescription>
- This Agent retrieves from your knowledge and generates chat
- responses. Edit in Langflow for full control.
- </CardDescription>
- </CardHeader>
- <CardContent>
- <div className="space-y-6">
- <div className="space-y-2">
- <LabelWrapper
- label="Language model"
- helperText="Model used for chat"
- id="language-model"
- required={true}
- >
- <ModelSelector
- groupedOptions={groupedLlmModels}
- noOptionsPlaceholder={
- isLoadingAnyLlmModels
- ? "Loading models..."
- : "No language models detected. Configure a provider first."
- }
- value={settings.agent?.llm_model || ""}
- onValueChange={handleModelChange}
- defaultOpen={openLlmSelector}
- />
- </LabelWrapper>
- </div>
- <div className="space-y-2">
- <LabelWrapper label="Agent Instructions" id="system-prompt">
- <Textarea
- id="system-prompt"
- placeholder="Enter your agent instructions here..."
- value={systemPrompt}
- onChange={(e) => setSystemPrompt(e.target.value)}
- rows={6}
- className={`resize-none ${
- systemPrompt.length > MAX_SYSTEM_PROMPT_CHARS
- ? "!border-destructive focus:border-destructive"
- : ""
- }`}
- />
- </LabelWrapper>
- <span
- className={`text-xs ${
- systemPrompt.length > MAX_SYSTEM_PROMPT_CHARS
- ? "text-destructive"
- : "text-muted-foreground"
- }`}
- >
- {systemPrompt.length}/{MAX_SYSTEM_PROMPT_CHARS} characters
- </span>
- </div>
- <div className="flex justify-end pt-2">
- <Button
- onClick={handleSystemPromptSave}
- disabled={
- updateSettingsMutation.isPending ||
- systemPrompt.length > MAX_SYSTEM_PROMPT_CHARS
- }
- className="min-w-[120px]"
- size="sm"
- variant="outline"
- >
- {updateSettingsMutation.isPending ? (
- <>
- <Loader2 className="mr-2 h-4 w-4 animate-spin" />
- Saving...
- </>
- ) : (
- "Save Agent Instructions"
- )}
- </Button>
- </div>
- </div>
- </CardContent>
- </Card>
-
- {/* Knowledge Ingest Section */}
- <Card>
- <CardHeader>
- <div className="flex items-center justify-between mb-3">
- <CardTitle
- className={cn(
- "text-lg",
- isCloudBrand && "ibm-settings-section-title",
- )}
- >
- Knowledge Ingest
- </CardTitle>
- <RequirePermission perm="flows:edit">
- <div className="flex gap-2">
- <ConfirmationDialog
- trigger={
- <Button ignoreTitleCase={true} variant="outline">
- Restore flow
- </Button>
- }
- title="Restore default Ingest flow"
- description="This restores defaults and discards all custom settings and overrides. This can't be undone."
- confirmText="Restore"
- variant="destructive"
- onConfirm={handleRestoreIngestFlow}
- />
- <ConfirmationDialog
- trigger={
- <Button>
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="24"
- height="22"
- viewBox="0 0 24 22"
- className="h-4 w-4 mr-2"
- aria-label="Langflow icon"
- >
- <title>Langflow icon</title>
- <path
- fill="currentColor"
- d="M13.0486 0.462158H9.75399C9.44371 0.462158 9.14614 0.586082 8.92674 0.806667L4.03751 5.72232C3.81811 5.9429 3.52054 6.06682 3.21026 6.06682H1.16992C0.511975 6.06682 -0.0165756 6.61212 0.000397655 7.2734L0.0515933 9.26798C0.0679586 9.90556 0.586745 10.4139 1.22111 10.4139H3.59097C3.90124 10.4139 4.19881 10.2899 4.41821 10.0694L9.34823 5.11269C9.56763 4.89211 9.8652 4.76818 10.1755 4.76818H13.0486C13.6947 4.76818 14.2185 4.24157 14.2185 3.59195V1.63839C14.2185 0.988773 13.6947 0.462158 13.0486 0.462158Z"
- ></path>
- <path
- fill="currentColor"
- d="M19.5355 11.5862H22.8301C23.4762 11.5862 24 12.1128 24 12.7624V14.716C24 15.3656 23.4762 15.8922 22.8301 15.8922H19.957C19.6467 15.8922 19.3491 16.0161 19.1297 16.2367L14.1997 21.1934C13.9803 21.414 13.6827 21.5379 13.3725 21.5379H11.0026C10.3682 21.5379 9.84945 21.0296 9.83309 20.392L9.78189 18.3974C9.76492 17.7361 10.2935 17.1908 10.9514 17.1908H12.9918C13.302 17.1908 13.5996 17.0669 13.819 16.8463L18.7082 11.9307C18.9276 11.7101 19.2252 11.5862 19.5355 11.5862Z"
- ></path>
- <path
- fill="currentColor"
- d="M19.5355 2.9796L22.8301 2.9796C23.4762 2.9796 24 3.50622 24 4.15583V6.1094C24 6.75901 23.4762 7.28563 22.8301 7.28563H19.957C19.6467 7.28563 19.3491 7.40955 19.1297 7.63014L14.1997 12.5868C13.9803 12.8074 13.6827 12.9313 13.3725 12.9313H10.493C10.1913 12.9313 9.90126 13.0485 9.68346 13.2583L4.14867 18.5917C3.93087 18.8016 3.64085 18.9187 3.33917 18.9187H1.32174C0.675616 18.9187 0.151832 18.3921 0.151832 17.7425V15.7343C0.151832 15.0846 0.675616 14.558 1.32174 14.558H3.32468C3.63496 14.558 3.93253 14.4341 4.15193 14.2135L9.40827 8.92878C9.62767 8.70819 9.92524 8.58427 10.2355 8.58427H12.9918C13.302 8.58427 13.5996 8.46034 13.819 8.23976L18.7082 3.32411C18.9276 3.10353 19.2252 2.9796 19.5355 2.9796Z"
- ></path>
- </svg>
- Edit in Langflow
- </Button>
- }
- title="Edit Ingest flow in Langflow"
- description={
- <>
- <p className="mb-2">
- You&apos;re entering Langflow. You can edit the{" "}
- <b>Ingest flow</b> and other underlying flows. Manual
- changes to components, wiring, or I/O can break this
- experience.
- </p>
- <p className="mb-2">
- To enable editing, you need to unlock the flow by
- clicking on its name and disabling the <b>Lock flow</b>{" "}
- option.
- </p>
- <p>You can restore this flow from Settings.</p>
- </>
- }
- confirmText="Proceed"
- confirmIcon={<ArrowUpRight />}
- variant="warning"
- onConfirm={(closeDialog) =>
- handleEditInLangflow("ingest", closeDialog)
- }
- />
- </div>
- </RequirePermission>
- </div>
- <CardDescription>
- Configure how files are ingested and stored for retrieval. The
- embedding model saves as soon as you pick one; chunk and ingest
- options use Save ingest settings. Edit in Langflow for full control.
- </CardDescription>
- </CardHeader>
- <CardContent>
- <div className="space-y-6">
- <div className="space-y-2">
- <LabelWrapper
- helperText="Saves immediately when you select a model"
- id="embedding-model-select"
- label="Embedding model"
- required={true}
- >
- <ModelSelector
- groupedOptions={groupedEmbeddingModels}
- noOptionsPlaceholder={
- isLoadingAnyEmbeddingModels
- ? "Loading models..."
- : "No embedding models detected. Configure a provider first."
- }
- value={settings.knowledge?.embedding_model || ""}
- onValueChange={handleEmbeddingModelChange}
- />
- </LabelWrapper>
- </div>
- <div className="grid grid-cols-2 gap-4">
- <div className="space-y-2">
- <LabelWrapper id="chunk-size" label="Chunk size">
- <div className="relative [&:has(input:hover):not(:has(input:focus))_button]:border-muted-foreground [&:has(input:focus)_button]:border-foreground">
- <Input
- id="chunk-size"
- type="number"
- min="1"
- value={chunkSize}
- onChange={(e) => handleChunkSizeChange(e.target.value)}
- className={`w-full pr-20 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none${chunkValidationError ? " border-destructive" : ""}`}
- />
- <div className="absolute inset-y-0 right-0 flex items-center">
- <span className="text-sm text-placeholder-foreground mr-4 pointer-events-none">
- characters
- </span>
- <div className="flex flex-col">
- <Button
- aria-label="Increase value"
- className="h-5 rounded-l-none rounded-br-none border-input border-b-[0.5px] focus-visible:relative transition-colors"
- variant="outline"
- size="iconSm"
- onClick={() =>
- handleChunkSizeChange((chunkSize + 1).toString())
- }
- >
- <Plus className="text-muted-foreground" size={8} />
- </Button>
- <Button
- aria-label="Decrease value"
- className="h-5 rounded-l-none rounded-tr-none border-input border-t-[0.5px] focus-visible:relative transition-colors"
- variant="outline"
- size="iconSm"
- onClick={() =>
- handleChunkSizeChange((chunkSize - 1).toString())
- }
- >
- <Minus className="text-muted-foreground" size={8} />
- </Button>
- </div>
- </div>
- </div>
- </LabelWrapper>
- </div>
- <div className="space-y-2">
- <LabelWrapper id="chunk-overlap" label="Chunk overlap">
- <div className="relative [&:has(input:hover):not(:has(input:focus))_button]:border-muted-foreground [&:has(input:focus)_button]:border-foreground">
- <Input
- id="chunk-overlap"
- type="number"
- min="0"
- value={chunkOverlap}
- onChange={(e) => handleChunkOverlapChange(e.target.value)}
- className={`w-full pr-20 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none${chunkValidationError ? " border-destructive" : ""}`}
- />
- <div className="absolute inset-y-0 right-0 flex items-center">
- <span className="text-sm text-placeholder-foreground mr-4 pointer-events-none">
- characters
- </span>
- <div className="flex flex-col">
- <Button
- aria-label="Increase value"
- className="h-5 rounded-l-none rounded-br-none border-input border-b-[0.5px] focus-visible:relative transition-colors"
- variant="outline"
- size="iconSm"
- onClick={() =>
- handleChunkOverlapChange(
- (chunkOverlap + 1).toString(),
- )
- }
- >
- <Plus className="text-muted-foreground" size={8} />
- </Button>
- <Button
- aria-label="Decrease value"
- className="h-5 rounded-l-none rounded-tr-none border-input border-t-[0.5px] focus-visible:relative transition-colors"
- variant="outline"
- size="iconSm"
- onClick={() =>
- handleChunkOverlapChange(
- (chunkOverlap - 1).toString(),
- )
- }
- >
- <Minus className="text-muted-foreground" size={8} />
- </Button>
- </div>
- </div>
- </div>
- </LabelWrapper>
- {chunkValidationError && (
- <p className="text-sm text-destructive mt-1" role="alert">
- {chunkValidationError}
- </p>
- )}
- </div>
- </div>
- <div className="">
- <div className="flex items-center justify-between py-3 border-b border-border">
- <div className="flex-1">
- <Label
- htmlFor="table-structure"
- className="text-base font-medium cursor-pointer pb-3"
- >
- Table Structure
- </Label>
- <div className="text-sm text-muted-foreground">
- Capture table structure during ingest.
- </div>
- </div>
- <Switch
- id="table-structure"
- checked={tableStructure}
- onCheckedChange={handleTableStructureChange}
- />
- </div>
- <div className="flex items-center justify-between py-3 border-b border-border">
- <div className="flex-1">
- <Label
- htmlFor="ocr"
- className="text-base font-medium cursor-pointer pb-3"
- >
- OCR
- </Label>
- <div className="text-sm text-muted-foreground">
- Extracts text from images/PDFs. Ingest is slower when
- enabled.
- </div>
- </div>
- <Switch
- id="ocr"
- checked={ocr}
- onCheckedChange={handleOcrChange}
- />
- </div>
- <div className="flex items-center justify-between py-3">
- <div className="flex-1">
- <Label
- htmlFor="picture-descriptions"
- className="text-base font-medium cursor-pointer pb-3"
- >
- Picture Descriptions
- </Label>
- <div className="text-sm text-muted-foreground">
- Adds captions for images. Ingest is slower when enabled.
- </div>
- </div>
- <Switch
- id="picture-descriptions"
- checked={pictureDescriptions}
- onCheckedChange={handlePictureDescriptionsChange}
- />
- </div>
- </div>
- <div className="flex justify-end pt-2">
- <Button
- onClick={handleKnowledgeIngestSave}
- disabled={
- updateSettingsMutation.isPending || !knowledgeIngestDirty
- }
- className="min-w-[120px]"
- size="sm"
- variant="outline"
- >
- {updateSettingsMutation.isPending ? (
- <>
- <Loader2 className="mr-2 h-4 w-4 animate-spin" />
- Saving...
- </>
- ) : (
- "Save ingest settings"
- )}
- </Button>
- </div>
- </div>
- </CardContent>
- </Card>
-
- {/* API Keys Section */}
- {(isAuthenticated || isNoAuthMode) && !isIbmAuthMode && (
- <Card>
- <CardHeader>
- <div className="flex items-center justify-between mb-3">
- <CardTitle
- className={cn(
- "text-lg",
- isCloudBrand && "ibm-settings-section-title",
- )}
- >
- API Keys
- </CardTitle>
- <RequirePermission perm="apikeys:create:self">
- <Button onClick={() => setCreateKeyDialogOpen(true)} size="sm">
- <Plus className="h-4 w-4 mr-2" />
- Create Key
- </Button>
- </RequirePermission>
- </div>
- <CardDescription>
- API keys allow programmatic access to OpenRAG via the public API.
- Keep your keys secure and never share them publicly.
- </CardDescription>
- </CardHeader>
- <CardContent>
- {apiKeysLoading ? (
- <div className="flex items-center justify-center py-8">
- <Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
- </div>
- ) : apiKeysData?.keys && apiKeysData.keys.length > 0 ? (
- <div className="border rounded-lg overflow-hidden">
- <table className="w-full">
- <thead className="bg-muted/50">
- <tr>
- <th className="text-left text-sm font-medium text-muted-foreground px-4 py-3">
- Name
- </th>
- <th className="text-left text-sm font-medium text-muted-foreground px-4 py-3">
- Key
- </th>
- <th className="text-left text-sm font-medium text-muted-foreground px-4 py-3">
- Created
- </th>
- <th className="text-left text-sm font-medium text-muted-foreground px-4 py-3">
- Last Used
- </th>
- <th className="text-right text-sm font-medium text-muted-foreground px-4 py-3">
- Actions
- </th>
- </tr>
- </thead>
- <tbody>
- {apiKeysData.keys.map((key) => (
- <tr key={key.key_id} className="border-t">
- <td className="px-4 py-3 text-sm font-medium">
- {key.name}
- </td>
- <td className="px-4 py-3">
- <code className="text-sm bg-muted px-2 py-1 rounded">
- {key.key_prefix}...
- </code>
- </td>
- <td className="px-4 py-3 text-sm text-muted-foreground">
- {formatDate(key.created_at)}
- </td>
- <td className="px-4 py-3 text-sm text-muted-foreground">
- {formatDate(key.last_used_at)}
- </td>
- <td className="px-4 py-3 text-right">
- <ConfirmationDialog
- trigger={
- <Button
- variant="ghost"
- size="sm"
- className="text-destructive hover:text-destructive hover:bg-destructive/10"
- >
- <Trash2 className="h-4 w-4" />
- </Button>
- }
- title="Revoke API Key"
- description={
- <>
- Are you sure you want to revoke the API key{" "}
- <strong>{key.name}</strong>? This action cannot
- be undone and any applications using this key
- will stop working.
- </>
- }
- confirmText="Revoke"
- variant="destructive"
- onConfirm={(closeDialog) => {
- handleRevokeApiKey(key.key_id);
- closeDialog();
- }}
- />
- </td>
- </tr>
- ))}
- </tbody>
- </table>
- </div>
- ) : (
- <div className="text-center py-8">
- <Key className="h-12 w-12 mx-auto text-muted-foreground/50 mb-4" />
- <p className="text-muted-foreground mb-4">
- No API keys yet. Create one to get started.
- </p>
- <RequirePermission perm="apikeys:create:self">
- <Button
- variant="outline"
- onClick={() => setCreateKeyDialogOpen(true)}
- size="sm"
- >
- <Plus className="h-4 w-4 mr-2" />
- Create your first API key
- </Button>
- </RequirePermission>
- </div>
- )}
- </CardContent>
- </Card>
- )}
-
- {/* Users & Roles — admin-only, AND only when RBAC is enforced.
- When OPENRAG_RBAC_ENFORCE=false the system has no real role
- model (every authenticated user is effectively admin), so
- rendering this UI would be misleading. */}
- {rbacEnforced && (
- <RequirePermission perm="users:list">
- <div className="space-y-4">
- <UsersAndRolesSection />
- </div>
- </RequirePermission>
- )}
-
- {/* Create API Key Dialog */}
- <Dialog open={createKeyDialogOpen} onOpenChange={setCreateKeyDialogOpen}>
- <DialogContent>
- <DialogHeader>
- <DialogTitle>Create API Key</DialogTitle>
- <DialogDescription>
- Give your API key a name to help you identify it later.
- </DialogDescription>
- </DialogHeader>
- <div className="py-4">
- <LabelWrapper label="Name" id="api-key-name">
- <Input
- id="api-key-name"
- placeholder="e.g., Production App, Development"
- value={newKeyName}
- onChange={(e) => setNewKeyName(e.target.value)}
- onKeyDown={(e) => {
- if (e.key === "Enter") {
- handleCreateApiKey();
- }
- }}
- />
- </LabelWrapper>
- </div>
- <DialogFooter>
- <Button
- variant="ghost"
- onClick={() => {
- setCreateKeyDialogOpen(false);
- setNewKeyName("");
- }}
- size="sm"
- >
- Cancel
- </Button>
- <Button
- onClick={handleCreateApiKey}
- disabled={createApiKeyMutation.isPending || !newKeyName.trim()}
- size="sm"
- >
- {createApiKeyMutation.isPending ? (
- <>
- <Loader2 className="h-4 w-4 mr-2 animate-spin" />
- Creating...
- </>
- ) : (
- "Create Key"
- )}
- </Button>
- </DialogFooter>
- </DialogContent>
- </Dialog>
-
- {/* Show Created API Key Dialog */}
- <Dialog
- open={showKeyDialogOpen}
- onOpenChange={(open) => {
- setShowKeyDialogOpen(open);
- if (!open) {
- setNewlyCreatedKey(null);
- }
- }}
- >
- <DialogContent>
- <DialogHeader>
- <DialogTitle>API Key Created</DialogTitle>
- <DialogDescription>
- Copy your API key now. You won&apos;t be able to see it again.
- </DialogDescription>
- </DialogHeader>
- <div className="py-4">
- <div className="bg-muted rounded-lg p-4 font-mono text-sm break-all">
- {newlyCreatedKey}
- </div>
- </div>
- <DialogFooter>
- <Button
- variant="ghost"
- onClick={() => setShowKeyDialogOpen(false)}
- size="sm"
- >
- Close
- </Button>
- <Button onClick={handleCopyApiKey} size="sm">
- <Copy className="h-4 w-4 mr-2" />
- Copy Key
- </Button>
- </DialogFooter>
- </DialogContent>
- </Dialog>
- </div>
- );
-}
-
-export default function SettingsClient() {
- return (
- <ProtectedRoute>
- <Suspense fallback={<div>Loading knowledge sources...</div>}>
- <KnowledgeSourcesPage />
- </Suspense>
- </ProtectedRoute>
- );
-}
diff --git a/frontend/components/ui/settings-tabs.tsx b/frontend/components/ui/settings-tabs.tsx
new file mode 100644
index 000000000..df035e7f2
--- /dev/null
+++ b/frontend/components/ui/settings-tabs.tsx
@@ -0,0 +1,91 @@
+"use client";
+
+import { cva, type VariantProps } from "class-variance-authority";
+import { Tabs as TabsPrimitive } from "radix-ui";
+import * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Tabs({
+ className,
+ orientation = "horizontal",
+ ...props
+}: React.ComponentProps<typeof TabsPrimitive.Root>) {
+ return (
+ <TabsPrimitive.Root
+ data-slot="tabs"
+ data-orientation={orientation}
+ orientation={orientation}
+ className={cn(
+ "group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+const tabsListVariants = cva(
+ "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-8 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",
+ {
+ variants: {
+ variant: {
+ default: "bg-muted",
+ line: "gap-1 bg-transparent",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ },
+);
+
+function TabsList({
+ className,
+ variant = "default",
+ ...props
+}: React.ComponentProps<typeof TabsPrimitive.List> &
+ VariantProps<typeof tabsListVariants>) {
+ return (
+ <TabsPrimitive.List
+ data-slot="tabs-list"
+ data-variant={variant}
+ className={cn(tabsListVariants({ variant }), className)}
+ {...props}
+ />
+ );
+}
+
+function TabsTrigger({
+ className,
+ ...props
+}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
+ return (
+ <TabsPrimitive.Trigger
+ data-slot="tabs-trigger"
+ className={cn(
+ "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent",
+ "data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground",
+ "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function TabsContent({
+ className,
+ ...props
+}: React.ComponentProps<typeof TabsPrimitive.Content>) {
+ return (
+ <TabsPrimitive.Content
+ data-slot="tabs-content"
+ className={cn("flex-1 text-sm outline-none", className)}
+ {...props}
+ />
+ );
+}
+
+export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 8be5f2748..a698279db 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -37,6 +37,7 @@
"motion": "^12.23.12",
"next": "^16.1.7",
"next-themes": "^0.4.6",
+ "radix-ui": "^1.4.3",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-dropzone": "^14.3.8",
@@ -1556,6 +1557,29 @@
"integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==",
"license": "MIT"
},
+ "node_modules/@radix-ui/react-accessible-icon": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-accessible-icon/-/react-accessible-icon-1.1.7.tgz",
+ "integrity": "sha512-XM+E4WXl0OqUJFovy6GjmxxFyx9opfCAIUku4dlKRd5YEPqt4kALOkQOp0Of6reHuUkJuiPBEc5k0o4z4lTC8A==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-visually-hidden": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-accordion": {
"version": "1.2.12",
"resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.12.tgz",
@@ -1587,6 +1611,52 @@
}
}
},
+ "node_modules/@radix-ui/react-alert-dialog": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.1.15.tgz",
+ "integrity": "sha512-oTVLkEw5GpdRe29BqJ0LSDFWI3qu0vR1M0mUkOQWDIUnY/QIkLpgDMWuKxP94c2NAC2LGcgVhG1ImF3jkZ5wXw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-dialog": "1.1.15",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
+ "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-arrow": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.7.tgz",
@@ -1610,6 +1680,29 @@
}
}
},
+ "node_modules/@radix-ui/react-aspect-ratio": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-aspect-ratio/-/react-aspect-ratio-1.1.7.tgz",
+ "integrity": "sha512-Yq6lvO9HQyPwev1onK1daHCHqXVLzPhSVjmsNjCa2Zcxy2f7uJD2itDtxknv6FzAKCwD1qQkeVDmX/cev13n/g==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-avatar": {
"version": "1.1.10",
"resolved": "https://registry.npmjs.org/@radix-ui/react-avatar/-/react-avatar-1.1.10.tgz",
@@ -1637,6 +1730,36 @@
}
}
},
+ "node_modules/@radix-ui/react-checkbox": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.3.3.tgz",
+ "integrity": "sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-previous": "1.1.1",
+ "@radix-ui/react-use-size": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-collapsible": {
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.12.tgz",
@@ -1740,6 +1863,34 @@
}
}
},
+ "node_modules/@radix-ui/react-context-menu": {
+ "version": "2.2.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-2.2.16.tgz",
+ "integrity": "sha512-O8morBEW+HsVG28gYDZPTrT9UUovQUlJue5YO836tiTJhuIWBm/zQHc7j388sHWtdH/xUZurK9olD2+pcqx5ww==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-menu": "2.1.16",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-dialog": {
"version": "1.1.15",
"resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.15.tgz",
@@ -1904,6 +2055,65 @@
}
}
},
+ "node_modules/@radix-ui/react-form": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-form/-/react-form-0.1.8.tgz",
+ "integrity": "sha512-QM70k4Zwjttifr5a4sZFts9fn8FzHYvQ5PiB19O2HsYibaHSVt9fH9rzB0XZo/YcM+b7t/p7lYCT/F5eOeF5yQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-label": "2.1.7",
+ "@radix-ui/react-primitive": "2.1.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-hover-card": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-hover-card/-/react-hover-card-1.1.15.tgz",
+ "integrity": "sha512-qgTkjNT1CfKMoP0rcasmlH2r1DAiYicWsDsufxl940sT2wHNEWWv6FMWIQXWhVdmC1d/HYfbhQx60KYyAtKxjg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-id": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz",
@@ -2002,6 +2212,138 @@
}
}
},
+ "node_modules/@radix-ui/react-menubar": {
+ "version": "1.1.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menubar/-/react-menubar-1.1.16.tgz",
+ "integrity": "sha512-EB1FktTz5xRRi2Er974AUQZWg2yVBb1yjip38/lgwtCVRd3a+maUoGHN/xs9Yv8SY8QwbSEb+YrxGadVWbEutA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-menu": "2.1.16",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-navigation-menu": {
+ "version": "1.2.14",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.2.14.tgz",
+ "integrity": "sha512-YB9mTFQvCOAQMHU+C/jVl96WmuWeltyUEpRJJky51huhds5W2FQr1J8D/16sQlf0ozxkPK8uF3niQMdUwZPv5w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1",
+ "@radix-ui/react-use-previous": "1.1.1",
+ "@radix-ui/react-visually-hidden": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-one-time-password-field": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-one-time-password-field/-/react-one-time-password-field-0.1.8.tgz",
+ "integrity": "sha512-ycS4rbwURavDPVjCb5iS3aG4lURFDILi6sKI/WITUMZ13gMmn/xGjpLoqBAalhJaDk8I3UbCM5GzKHrnzwHbvg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/number": "1.1.1",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-effect-event": "0.0.2",
+ "@radix-ui/react-use-is-hydrated": "0.1.0",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-password-toggle-field": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-password-toggle-field/-/react-password-toggle-field-0.1.3.tgz",
+ "integrity": "sha512-/UuCrDBWravcaMix4TdT+qlNdVwOM1Nck9kWx/vafXsdfj1ChfhOdfi3cy9SGBpWgTXwYCuboT/oYpJy3clqfw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-effect-event": "0.0.2",
+ "@radix-ui/react-use-is-hydrated": "0.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-popover": {
"version": "1.1.15",
"resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.15.tgz",
@@ -2118,8 +2460,72 @@
"integrity": "sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-compose-refs": "1.1.2",
- "@radix-ui/react-use-layout-effect": "1.1.1"
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-primitive": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz",
+ "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
+ "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-progress": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-progress/-/react-progress-1.1.7.tgz",
+ "integrity": "sha512-vPdg/tF6YC/ynuBIJlk1mm7Le0VgW6ub6J2UWnTQ7/D23KXcPI1qy+0vBkgKgd38RCMJavBXpB83HPNFMTb0Fg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -2136,13 +2542,22 @@
}
}
},
- "node_modules/@radix-ui/react-primitive": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz",
- "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==",
+ "node_modules/@radix-ui/react-radio-group": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.3.8.tgz",
+ "integrity": "sha512-VBKYIYImA5zsxACdisNQ3BjCBfmbGH3kQlnFVqlWU4tXwjy7cGX8ta80BcrO+WJXIn5iBylEH3K6ZTlee//lgQ==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-slot": "1.2.3"
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-previous": "1.1.1",
+ "@radix-ui/react-use-size": "1.1.1"
},
"peerDependencies": {
"@types/react": "*",
@@ -2159,38 +2574,52 @@
}
}
},
- "node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
- "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
+ "node_modules/@radix-ui/react-roving-focus": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.11.tgz",
+ "integrity": "sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==",
+ "license": "MIT",
"dependencies": {
- "@radix-ui/react-compose-refs": "1.1.2"
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
},
"peerDependencies": {
"@types/react": "*",
- "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
}
}
},
- "node_modules/@radix-ui/react-roving-focus": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.11.tgz",
- "integrity": "sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==",
+ "node_modules/@radix-ui/react-scroll-area": {
+ "version": "1.2.10",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-scroll-area/-/react-scroll-area-1.2.10.tgz",
+ "integrity": "sha512-tAXIa1g3sM5CGpVT0uIbUx/U3Gs5N8T52IICuCtObaos1S8fzsrPXG5WObkQN3S6NVl6wKgPhAIiBGbWnvc97A==",
"license": "MIT",
"dependencies": {
+ "@radix-ui/number": "1.1.1",
"@radix-ui/primitive": "1.1.3",
- "@radix-ui/react-collection": "1.1.7",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
- "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-presence": "1.1.5",
"@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
- "@radix-ui/react-use-controllable-state": "1.2.2"
+ "@radix-ui/react-use-layout-effect": "1.1.1"
},
"peerDependencies": {
"@types/react": "*",
@@ -2423,6 +2852,146 @@
}
}
},
+ "node_modules/@radix-ui/react-toast": {
+ "version": "1.2.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toast/-/react-toast-1.2.15.tgz",
+ "integrity": "sha512-3OSz3TacUWy4WtOXV38DggwxoqJK4+eDkNMl5Z/MJZaoUPaP4/9lf81xXMe1I2ReTAptverZUpbPY4wWwWyL5g==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1",
+ "@radix-ui/react-visually-hidden": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-toggle": {
+ "version": "1.1.10",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.10.tgz",
+ "integrity": "sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-toggle-group": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle-group/-/react-toggle-group-1.1.11.tgz",
+ "integrity": "sha512-5umnS0T8JQzQT6HbPyO7Hh9dgd82NmS36DQr+X/YJ9ctFNCiiQd6IJAYYZ33LUwm8M+taCz5t2ui29fHZc4Y6Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
+ "@radix-ui/react-toggle": "1.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-toolbar": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toolbar/-/react-toolbar-1.1.11.tgz",
+ "integrity": "sha512-4ol06/1bLoFu1nwUqzdD4Y5RZ9oDdKeiHIsntug54Hcr1pgaHiPqHFEaXI1IFP/EsOfROQZ8Mig9VTIRza6Tjg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
+ "@radix-ui/react-separator": "1.1.7",
+ "@radix-ui/react-toggle-group": "1.1.11"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-toolbar/node_modules/@radix-ui/react-separator": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.7.tgz",
+ "integrity": "sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-tooltip": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.2.8.tgz",
@@ -9337,6 +9906,124 @@
],
"license": "MIT"
},
+ "node_modules/radix-ui": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/radix-ui/-/radix-ui-1.4.3.tgz",
+ "integrity": "sha512-aWizCQiyeAenIdUbqEpXgRA1ya65P13NKn/W8rWkcN0OPkRDxdBVLWnIEDsS2RpwCK2nobI7oMUSmexzTDyAmA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-accessible-icon": "1.1.7",
+ "@radix-ui/react-accordion": "1.2.12",
+ "@radix-ui/react-alert-dialog": "1.1.15",
+ "@radix-ui/react-arrow": "1.1.7",
+ "@radix-ui/react-aspect-ratio": "1.1.7",
+ "@radix-ui/react-avatar": "1.1.10",
+ "@radix-ui/react-checkbox": "1.3.3",
+ "@radix-ui/react-collapsible": "1.1.12",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-context-menu": "2.2.16",
+ "@radix-ui/react-dialog": "1.1.15",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-dropdown-menu": "2.1.16",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
+ "@radix-ui/react-form": "0.1.8",
+ "@radix-ui/react-hover-card": "1.1.15",
+ "@radix-ui/react-label": "2.1.7",
+ "@radix-ui/react-menu": "2.1.16",
+ "@radix-ui/react-menubar": "1.1.16",
+ "@radix-ui/react-navigation-menu": "1.2.14",
+ "@radix-ui/react-one-time-password-field": "0.1.8",
+ "@radix-ui/react-password-toggle-field": "0.1.3",
+ "@radix-ui/react-popover": "1.1.15",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-progress": "1.1.7",
+ "@radix-ui/react-radio-group": "1.3.8",
+ "@radix-ui/react-roving-focus": "1.1.11",
+ "@radix-ui/react-scroll-area": "1.2.10",
+ "@radix-ui/react-select": "2.2.6",
+ "@radix-ui/react-separator": "1.1.7",
+ "@radix-ui/react-slider": "1.3.6",
+ "@radix-ui/react-slot": "1.2.3",
+ "@radix-ui/react-switch": "1.2.6",
+ "@radix-ui/react-tabs": "1.1.13",
+ "@radix-ui/react-toast": "1.2.15",
+ "@radix-ui/react-toggle": "1.1.10",
+ "@radix-ui/react-toggle-group": "1.1.11",
+ "@radix-ui/react-toolbar": "1.1.11",
+ "@radix-ui/react-tooltip": "1.2.8",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-effect-event": "0.0.2",
+ "@radix-ui/react-use-escape-keydown": "1.1.1",
+ "@radix-ui/react-use-is-hydrated": "0.1.0",
+ "@radix-ui/react-use-layout-effect": "1.1.1",
+ "@radix-ui/react-use-size": "1.1.1",
+ "@radix-ui/react-visually-hidden": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/radix-ui/node_modules/@radix-ui/react-separator": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.7.tgz",
+ "integrity": "sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/radix-ui/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
+ "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/react": {
"version": "19.1.1",
"resolved": "https://registry.npmjs.org/react/-/react-19.1.1.tgz",
diff --git a/frontend/package.json b/frontend/package.json
index f6d88c6d3..7f200bdeb 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -45,6 +45,7 @@
"motion": "^12.23.12",
"next": "^16.1.7",
"next-themes": "^0.4.6",
+ "radix-ui": "^1.4.3",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-dropzone": "^14.3.8",