Extract the AI provider/endpoints settings and the MCP server section out of the Workspace "General" settings page into their own "AI" settings page, reachable from a new sidebar entry. - add page apps/client/.../settings/workspace/ai-settings.tsx (AiProviderSettings admin-gated + McpSettings), with its own Helmet title - register the /settings/ai route in App.tsx and add SETTINGS.WORKSPACE.AI to app-route.ts - add an "AI" item (IconSparkles) to the Workspace group in settings-sidebar - trim workspace-settings.tsx back to the General section and drop the now-unused imports
29 lines
887 B
TypeScript
29 lines
887 B
TypeScript
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
|
import McpSettings from "@/features/workspace/components/settings/components/mcp-settings.tsx";
|
|
import AiProviderSettings from "@/features/workspace/components/settings/components/ai-provider-settings.tsx";
|
|
import { useTranslation } from "react-i18next";
|
|
import { getAppName } from "@/lib/config.ts";
|
|
import { Helmet } from "react-helmet-async";
|
|
import { Divider } from "@mantine/core";
|
|
import useUserRole from "@/hooks/use-user-role.tsx";
|
|
|
|
export default function AiSettings() {
|
|
const { t } = useTranslation();
|
|
const { isAdmin } = useUserRole();
|
|
return (
|
|
<>
|
|
<Helmet>
|
|
<title>
|
|
{t("AI")} - {getAppName()}
|
|
</title>
|
|
</Helmet>
|
|
<SettingsTitle title={t("AI")} />
|
|
{isAdmin && <AiProviderSettings />}
|
|
|
|
<Divider my="lg" />
|
|
|
|
<McpSettings />
|
|
</>
|
|
);
|
|
}
|