🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
refactor(web): thin project settings page into ProjectSettingsPage (#17215)
Nikita Kabardinf8a5a2c07016
diff --git a/web/src/features/command-k-menu/CommandMenu.tsx b/web/src/features/command-k-menu/CommandMenu.tsxindex fb96ac1dbc..fdb12bce47 100644--- a/web/src/features/command-k-menu/CommandMenu.tsx+++ b/web/src/features/command-k-menu/CommandMenu.tsx@@ -15,7 +15,7 @@ import { env } from "@/src/env.mjs";import { usePostHogClientCapture } from "@/src/features/posthog-analytics";import { useDebounce } from "@/src/hooks/useDebounce";import { useCommandMenu } from "@/src/features/command-k-menu/CommandMenuProvider";-import { useProjectSettingsPages } from "@/src/pages/project/[projectId]/settings";+import { useProjectSettingsPages } from "@/src/features/projects";import { useOrganizationSettingsPages } from "@/src/pages/organization/[organizationId]/settings";import { useAccountSettingsPages } from "@/src/pages/account/settings";import { useQueryProjectOrOrganization } from "@/src/features/projects/hooks";diff --git a/web/src/features/projects/ProjectSettingsPage.tsx b/web/src/features/projects/ProjectSettingsPage.tsxnew file mode 100644index 0000000000..538b6756b6--- /dev/null+++ b/web/src/features/projects/ProjectSettingsPage.tsx@@ -0,0 +1,472 @@+import Header from "@/src/components/layouts/header";+import { ApiKeyList } from "@/src/features/public-api/components/ApiKeyList";+import { DeleteProjectDialogController } from "@/src/features/projects/components/DeleteProjectDialogController";+import { HostNameProject } from "@/src/features/projects/components/HostNameProject";+import RenameProject from "@/src/features/projects/components/RenameProject";+import { Button } from "@/src/components/ui/button";+import Link from "next/link";+import { LlmApiKeyList } from "@/src/features/public-api/components/LLMApiKeyList";+import { PagedSettingsContainer } from "@/src/components/PagedSettingsContainer";+import { useQueryProject } from "@/src/features/projects/hooks";+import { MembershipInvitesPage } from "@/src/features/rbac/components/MembershipInvitesPage";+import { MembersTable } from "@/src/features/rbac/components/MembersTable";+import { JSONView } from "@/src/components/ui/CodeJsonViewer";+import { PostHogLogo } from "@/src/components/PosthogLogo";+import { MixpanelLogo } from "@/src/components/MixpanelLogo";+import { Card } from "@/src/components/ui/card";+import { TransferProjectDialogController } from "@/src/features/projects/components/TransferProjectDialogController";+import { useHasEntitlement } from "@/src/features/entitlements/hooks";+import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";+import { useRouter } from "next/router";+import { SettingsDangerZone } from "@/src/components/SettingsDangerZone";+import { ActionButton } from "@/src/components/ActionButton";+import { BatchExportsSettingsPage } from "@/src/features/batch-exports/components/BatchExportsSettingsPage";+import { BatchActionsSettingsPage } from "@/src/features/batch-actions/components/BatchActionsSettingsPage";+import { AuditLogsSettingsPage } from "@/src/ee/features/audit-log-viewer/AuditLogsSettingsPage";+import { ModelsSettings } from "@/src/features/models/components/ModelSettings";+import ConfigureRetention from "@/src/features/projects/components/ConfigureRetention";+import ContainerPage from "@/src/components/layouts/container-page";+import { NoDataOrLoading } from "@/src/components/NoDataOrLoading";+import ProtectedLabelsSettings from "@/src/features/prompts/components/ProtectedLabelsSettings";+import { SiSlack } from "react-icons/si";+import { ScoreConfigSettings } from "@/src/features/score-configs/components/ScoreConfigSettings";+import { env } from "@/src/env.mjs";+import { PersonalNotificationSettings } from "@/src/features/notifications/components/PersonalNotificationSettings";+import { ProjectNotificationChannels } from "@/src/features/notifications/components/ProjectNotificationChannels";+import { WebCalloutIntegrationCard } from "@/src/features/web-callouts/components/WebCalloutSettingsPage";+import { DeveloperToolsSettings } from "@/src/features/developer-tools/components/DeveloperToolsSettings";+import { useV4UpgradeUiFlag } from "@/src/features/v4-migration/useV4UpgradeUiEnabled";++type ProjectSettingsPageEntry = {+ title: string;+ slug: string;+ show?: boolean | (() => boolean);+ cmdKKeywords?: string[];+} & ({ content: React.ReactNode } | { href: string });++export function useProjectSettingsPages(): ProjectSettingsPageEntry[] {+ const router = useRouter();+ const { project, organization } = useQueryProject();+ const showBillingSettings = useHasEntitlement("cloud-billing");+ const showRetentionSettings = useHasEntitlement("data-retention");+ const showProtectedLabelsSettings = useHasEntitlement(+ "prompt-protected-labels",+ );+ const showProjectNotificationChannels = useHasProjectAccess({+ projectId: project?.id,+ scope: "automations:CUD",+ });+ const showScoreConfigSettings = useHasProjectAccess({+ projectId: project?.id,+ scope: "scoreConfigs:read",+ });+ const showV4Migration = useV4UpgradeUiFlag();+ if (!project || !organization || !router.query.projectId) {+ return [];+ }++ return getProjectSettingsPages({+ project,+ organization,+ showBillingSettings,+ showRetentionSettings,+ showLLMConnectionsSettings: true,+ showProtectedLabelsSettings,+ showProjectNotificationChannels,+ showScoreConfigSettings,+ showV4Migration,+ });+}++const getProjectSettingsPages = ({+ project,+ organization,+ showBillingSettings,+ showRetentionSettings,+ showLLMConnectionsSettings,+ showProtectedLabelsSettings,+ showProjectNotificationChannels,+ showScoreConfigSettings,+ showV4Migration,+}: {+ project: { id: string; name: string; metadata: Record<string, unknown> };+ organization: { id: string; name: string; metadata: Record<string, unknown> };+ showBillingSettings: boolean;+ showRetentionSettings: boolean;+ showLLMConnectionsSettings: boolean;+ showProtectedLabelsSettings: boolean;+ showProjectNotificationChannels: boolean;+ showScoreConfigSettings: boolean;+ showV4Migration: boolean;+}): ProjectSettingsPageEntry[] => [+ {+ title: "General",+ slug: "index",+ cmdKKeywords: ["name", "id", "delete", "transfer", "ownership"],+ content: (+ <div className="flex flex-col gap-6">+ <HostNameProject />+ <RenameProject />+ {showRetentionSettings && <ConfigureRetention />}+ <div>+ <Header title="Debug Information" />+ <JSONView+ title="Metadata"+ json={{+ project: {+ name: project.name,+ id: project.id,+ ...project.metadata,+ },+ org: {+ name: organization.name,+ id: organization.id,+ ...organization.metadata,+ },+ ...(env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION && {+ cloudRegion: env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION,+ }),+ }}+ />+ </div>+ <SettingsDangerZone+ items={[+ {+ title: "Transfer ownership",+ description:+ "Transfer this project to another organization where you have the ability to create projects.",+ button: (+ <TransferProjectDialogController+ project={project}+ organization={organization}+ >+ {({ disabled, openDialog }) => (+ <Button+ variant="destructive-secondary"+ disabled={disabled !== undefined}+ onClick={openDialog}+ >+ Transfer Project+ </Button>+ )}+ </TransferProjectDialogController>+ ),+ },+ {+ title: "Delete this project",+ description:+ "Once you delete a project, there is no going back. Please be certain.",+ button: (+ <DeleteProjectDialogController>+ {({ hasAccess, Trigger }) => (+ <Trigger asChild>+ <Button+ variant="destructive-secondary"+ disabled={!hasAccess}+ >+ Delete Project+ </Button>+ </Trigger>+ )}+ </DeleteProjectDialogController>+ ),+ },+ ]}+ />+ </div>+ ),+ },+ {+ title: "API Keys",+ slug: "api-keys",+ cmdKKeywords: ["auth", "public key", "secret key"],+ content: (+ <div className="flex flex-col gap-6">+ <ApiKeyList entityId={project.id} scope="project" />+ </div>+ ),+ },+ {+ title: "MCP & CLI",+ slug: "developer-tools",+ cmdKKeywords: [+ "mcp",+ "cli",+ "skill",+ "agent",+ "model context protocol",+ "command line",+ "claude code",+ "cursor",+ ],+ content: <DeveloperToolsSettings projectId={project.id} />,+ },+ {+ title: "LLM Connections",+ slug: "llm-connections",+ cmdKKeywords: [+ "llm",+ "provider",+ "openai",+ "anthropic",+ "azure",+ "playground",+ "evaluation",+ "endpoint",+ "api",+ ],+ content: (+ <div className="flex flex-col gap-6">+ <LlmApiKeyList projectId={project.id} />+ </div>+ ),+ show: showLLMConnectionsSettings,+ },+ {+ title: "Model Definitions",+ slug: "models",+ cmdKKeywords: ["cost", "token"],+ content: <ModelsSettings projectId={project.id} />,+ },+ {+ title: "Protected Prompt Labels",+ slug: "protected-prompt-labels",+ cmdKKeywords: ["prompt", "label", "protect", "lock"],+ content: <ProtectedLabelsSettings projectId={project.id} />,+ show: showProtectedLabelsSettings,+ },+ {+ title: "Scores Configs",+ slug: "scores",+ cmdKKeywords: ["config"],+ content: <ScoreConfigSettings projectId={project.id} />,+ show: showScoreConfigSettings,+ },+ {+ title: "Members",+ slug: "members",+ cmdKKeywords: ["invite", "user"],+ content: (+ <div>+ <Header title="Project Members" />+ <MembersTable+ orgId={organization.id}+ project={{ id: project.id, name: project.name }}+ showSettingsCard+ />+ <div>+ <MembershipInvitesPage+ orgId={organization.id}+ projectId={project.id}+ />+ </div>+ </div>+ ),+ },+ {+ title: "Integrations",+ slug: "integrations",+ cmdKKeywords: ["posthog", "mixpanel", "analytics", "callback", "webhook"],+ content: <Integrations projectId={project.id} />,+ },+ {+ title: "Exports",+ slug: "exports",+ cmdKKeywords: ["csv", "download", "json", "batch"],+ content: <BatchExportsSettingsPage projectId={project.id} />,+ },+ {+ title: "Batch Actions",+ slug: "batch-actions",+ cmdKKeywords: ["bulk", "batch", "action", "dataset", "delete"],+ content: <BatchActionsSettingsPage projectId={project.id} />,+ },+ {+ title: "Audit Logs",+ slug: "audit-logs",+ cmdKKeywords: ["trail"],+ content: <AuditLogsSettingsPage projectId={project.id} />,+ },+ {+ title: "Notifications",+ slug: "notifications",+ cmdKKeywords: ["inbox", "email", "mention", "alert", "slack", "webhook"],+ content: (+ <div className="flex flex-col gap-6">+ <PersonalNotificationSettings />+ {showProjectNotificationChannels && (+ <ProjectNotificationChannels projectId={project.id} />+ )}+ </div>+ ),+ },+ {+ title: "Billing",+ slug: "billing",+ href: `/organization/${organization.id}/settings/billing`,+ show: showBillingSettings,+ },+ {+ title: "Organization Settings",+ slug: "organization",+ href: `/organization/${organization.id}/settings`,+ },+ {+ title: "v4 Migration",+ slug: "v4-migration",+ href: "/v4-migration",+ show: showV4Migration,+ },+];++export default function ProjectSettingsPage() {+ const { project, organization } = useQueryProject();+ const router = useRouter();+ const pages = useProjectSettingsPages();++ if (!project || !organization) {+ return (+ <ContainerPage+ headerProps={{+ title: "Project Settings",+ }}+ >+ <NoDataOrLoading isLoading />+ </ContainerPage>+ );+ }++ return (+ <ContainerPage+ headerProps={{+ title: "Project Settings",+ }}+ >+ <PagedSettingsContainer+ activeSlug={router.query.page as string | undefined}+ pages={pages}+ />+ </ContainerPage>+ );+}++const Integrations = (props: { projectId: string }) => {+ const hasAccess = useHasProjectAccess({+ projectId: props.projectId,+ scope: "integrations:CRUD",+ });++ const allowBlobStorageIntegration = useHasEntitlement(+ "scheduled-blob-exports",+ );++ return (+ <div>+ <Header title="Integrations" />+ <div className="space-y-6">+ <Card className="p-3">+ {}+ <PostHogLogo className="text-foreground mb-4 w-40" />+ <p className="text-primary mb-4 text-sm">+ We have teamed up with PostHog (OSS product analytics) to make+ Langfuse Events/Metrics available in your Posthog Dashboards.+ </p>+ <div className="flex items-center gap-2">+ <ActionButton+ variant="secondary"+ hasAccess={hasAccess}+ href={`/project/${props.projectId}/settings/integrations/posthog`}+ >+ Configure+ </ActionButton>+ <Button asChild variant="ghost">+ <Link+ href="https://langfuse.com/integrations/analytics/posthog"+ target="_blank"+ >+ Integration Docs ↗+ </Link>+ </Button>+ </div>+ </Card>++ <Card className="p-3">+ <MixpanelLogo className="text-foreground mb-4 w-20" />+ <p className="text-primary mb-4 text-sm">+ Integrate with Mixpanel to sync your Langfuse traces, generations,+ and scores for advanced product analytics and insights.+ </p>+ <div className="flex items-center gap-2">+ <ActionButton+ variant="secondary"+ hasAccess={hasAccess}+ href={`/project/${props.projectId}/settings/integrations/mixpanel`}+ >+ Configure+ </ActionButton>+ <Button asChild variant="ghost">+ <Link+ href="https://langfuse.com/integrations/analytics/mixpanel"+ target="_blank"+ >+ Integration Docs ↗+ </Link>+ </Button>+ </div>+ </Card>++ <Card className="p-3">+ <span className="font-bold">Blob Storage</span>+ <p className="text-primary mb-4 text-sm">+ Configure scheduled exports of your trace data to S3 compatible+ storages or Azure Blob Storage. Set up a scheduled export to your+ own storage for data analysis or backup purposes.+ </p>+ <div className="flex items-center gap-2">+ <ActionButton+ variant="secondary"+ hasAccess={hasAccess}+ hasEntitlement={allowBlobStorageIntegration}+ href={`/project/${props.projectId}/settings/integrations/blobstorage`}+ >+ Configure+ </ActionButton>+ <Button asChild variant="ghost">+ <Link+ href="https://langfuse.com/docs/query-traces#blob-storage"+ target="_blank"+ >+ Integration Docs ↗+ </Link>+ </Button>+ </div>+ </Card>++ <Card className="p-3">+ <div className="mb-4 flex items-center gap-2">+ <SiSlack className="text-foreground h-5 w-5" />+ <span className="font-bold">Slack</span>+ </div>+ <p className="text-primary mb-4 text-sm">+ Connect a Slack workspace and create channel automations to receive+ Langfuse alerts natively in Slack.+ </p>+ <div className="flex items-center gap-2">+ <ActionButton+ variant="secondary"+ hasAccess={hasAccess}+ href={`/project/${props.projectId}/settings/integrations/slack`}+ >+ Configure+ </ActionButton>+ </div>+ </Card>++ <WebCalloutIntegrationCard+ projectId={props.projectId}+ hasAccess={hasAccess}+ />+ </div>+ </div>+ );+};diff --git a/web/src/features/projects/index.ts b/web/src/features/projects/index.tsindex 1e0fac144a..5b4daeb7d5 100644--- a/web/src/features/projects/index.ts+++ b/web/src/features/projects/index.ts@@ -1 +1,2 @@export { useProject } from "@/src/features/projects/hooks";+export { useProjectSettingsPages } from "@/src/features/projects/ProjectSettingsPage";diff --git a/web/src/pages/project/[projectId]/settings/[page].tsx b/web/src/pages/project/[projectId]/settings/[page].tsxindex eda8e05f5c..0ed00bbdca 100644--- a/web/src/pages/project/[projectId]/settings/[page].tsx+++ b/web/src/pages/project/[projectId]/settings/[page].tsx@@ -1,3 +1 @@-import SettingsPage from "@/src/pages/project/[projectId]/settings";--export default SettingsPage;+export { default } from "@/src/features/projects/ProjectSettingsPage";diff --git a/web/src/pages/project/[projectId]/settings/index.tsx b/web/src/pages/project/[projectId]/settings/index.tsxindex aab69329a6..fb4963961e 100644--- a/web/src/pages/project/[projectId]/settings/index.tsx+++ b/web/src/pages/project/[projectId]/settings/index.tsx@@ -1,461 +1,4 @@-import Header from "@/src/components/layouts/header";-import { ApiKeyList } from "@/src/features/public-api/components/ApiKeyList";-import { DeleteProjectDialogController } from "@/src/features/projects/components/DeleteProjectDialogController";-import { HostNameProject } from "@/src/features/projects/components/HostNameProject";-import RenameProject from "@/src/features/projects/components/RenameProject";-import { Button } from "@/src/components/ui/button";-import Link from "next/link";-import { LlmApiKeyList } from "@/src/features/public-api/components/LLMApiKeyList";-import { PagedSettingsContainer } from "@/src/components/PagedSettingsContainer";-import { useQueryProject } from "@/src/features/projects/hooks";-import { MembershipInvitesPage } from "@/src/features/rbac/components/MembershipInvitesPage";-import { MembersTable } from "@/src/features/rbac/components/MembersTable";-import { JSONView } from "@/src/components/ui/CodeJsonViewer";-import { PostHogLogo } from "@/src/components/PosthogLogo";-import { MixpanelLogo } from "@/src/components/MixpanelLogo";-import { Card } from "@/src/components/ui/card";-import { TransferProjectDialogController } from "@/src/features/projects/components/TransferProjectDialogController";-import { useHasEntitlement } from "@/src/features/entitlements/hooks";-import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";-import { useRouter } from "next/router";-import { SettingsDangerZone } from "@/src/components/SettingsDangerZone";-import { ActionButton } from "@/src/components/ActionButton";-import { BatchExportsSettingsPage } from "@/src/features/batch-exports/components/BatchExportsSettingsPage";-import { BatchActionsSettingsPage } from "@/src/features/batch-actions/components/BatchActionsSettingsPage";-import { AuditLogsSettingsPage } from "@/src/ee/features/audit-log-viewer/AuditLogsSettingsPage";-import { ModelsSettings } from "@/src/features/models/components/ModelSettings";-import ConfigureRetention from "@/src/features/projects/components/ConfigureRetention";-import ContainerPage from "@/src/components/layouts/container-page";-import ProtectedLabelsSettings from "@/src/features/prompts/components/ProtectedLabelsSettings";-import { SiSlack } from "react-icons/si";-import { ScoreConfigSettings } from "@/src/features/score-configs/components/ScoreConfigSettings";-import { env } from "@/src/env.mjs";-import { PersonalNotificationSettings } from "@/src/features/notifications/components/PersonalNotificationSettings";-import { ProjectNotificationChannels } from "@/src/features/notifications/components/ProjectNotificationChannels";-import { WebCalloutIntegrationCard } from "@/src/features/web-callouts/components/WebCalloutSettingsPage";-import { DeveloperToolsSettings } from "@/src/features/developer-tools/components/DeveloperToolsSettings";-import { useV4UpgradeUiFlag } from "@/src/features/v4-migration/useV4UpgradeUiEnabled";--type ProjectSettingsPage = {- title: string;- slug: string;- show?: boolean | (() => boolean);- cmdKKeywords?: string[];-} & ({ content: React.ReactNode } | { href: string });--export function useProjectSettingsPages(): ProjectSettingsPage[] {- const router = useRouter();- const { project, organization } = useQueryProject();- const showBillingSettings = useHasEntitlement("cloud-billing");- const showRetentionSettings = useHasEntitlement("data-retention");- const showProtectedLabelsSettings = useHasEntitlement(- "prompt-protected-labels",- );- const showProjectNotificationChannels = useHasProjectAccess({- projectId: project?.id,- scope: "automations:CUD",- });- const showScoreConfigSettings = useHasProjectAccess({- projectId: project?.id,- scope: "scoreConfigs:read",- });- const showV4Migration = useV4UpgradeUiFlag();- if (!project || !organization || !router.query.projectId) {- return [];- }-- return getProjectSettingsPages({- project,- organization,- showBillingSettings,- showRetentionSettings,- showLLMConnectionsSettings: true,- showProtectedLabelsSettings,- showProjectNotificationChannels,- showScoreConfigSettings,- showV4Migration,- });-}--export const getProjectSettingsPages = ({- project,- organization,- showBillingSettings,- showRetentionSettings,- showLLMConnectionsSettings,- showProtectedLabelsSettings,- showProjectNotificationChannels,- showScoreConfigSettings,- showV4Migration,-}: {- project: { id: string; name: string; metadata: Record<string, unknown> };- organization: { id: string; name: string; metadata: Record<string, unknown> };- showBillingSettings: boolean;- showRetentionSettings: boolean;- showLLMConnectionsSettings: boolean;- showProtectedLabelsSettings: boolean;- showProjectNotificationChannels: boolean;- showScoreConfigSettings: boolean;- showV4Migration: boolean;-}): ProjectSettingsPage[] => [- {- title: "General",- slug: "index",- cmdKKeywords: ["name", "id", "delete", "transfer", "ownership"],- content: (- <div className="flex flex-col gap-6">- <HostNameProject />- <RenameProject />- {showRetentionSettings && <ConfigureRetention />}- <div>- <Header title="Debug Information" />- <JSONView- title="Metadata"- json={{- project: {- name: project.name,- id: project.id,- ...project.metadata,- },- org: {- name: organization.name,- id: organization.id,- ...organization.metadata,- },- ...(env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION && {- cloudRegion: env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION,- }),- }}- />- </div>- <SettingsDangerZone- items={[- {- title: "Transfer ownership",- description:- "Transfer this project to another organization where you have the ability to create projects.",- button: (- <TransferProjectDialogController- project={project}- organization={organization}- >- {({ disabled, openDialog }) => (- <Button- variant="destructive-secondary"- disabled={disabled !== undefined}- onClick={openDialog}- >- Transfer Project- </Button>- )}- </TransferProjectDialogController>- ),- },- {- title: "Delete this project",- description:- "Once you delete a project, there is no going back. Please be certain.",- button: (- <DeleteProjectDialogController>- {({ hasAccess, Trigger }) => (- <Trigger asChild>- <Button- variant="destructive-secondary"- disabled={!hasAccess}- >- Delete Project- </Button>- </Trigger>- )}- </DeleteProjectDialogController>- ),- },- ]}- />- </div>- ),- },- {- title: "API Keys",- slug: "api-keys",- cmdKKeywords: ["auth", "public key", "secret key"],- content: (- <div className="flex flex-col gap-6">- <ApiKeyList entityId={project.id} scope="project" />- </div>- ),- },- {- title: "MCP & CLI",- slug: "developer-tools",- cmdKKeywords: [- "mcp",- "cli",- "skill",- "agent",- "model context protocol",- "command line",- "claude code",- "cursor",- ],- content: <DeveloperToolsSettings projectId={project.id} />,- },- {- title: "LLM Connections",- slug: "llm-connections",- cmdKKeywords: [- "llm",- "provider",- "openai",- "anthropic",- "azure",- "playground",- "evaluation",- "endpoint",- "api",- ],- content: (- <div className="flex flex-col gap-6">- <LlmApiKeyList projectId={project.id} />- </div>- ),- show: showLLMConnectionsSettings,- },- {- title: "Model Definitions",- slug: "models",- cmdKKeywords: ["cost", "token"],- content: <ModelsSettings projectId={project.id} />,- },- {- title: "Protected Prompt Labels",- slug: "protected-prompt-labels",- cmdKKeywords: ["prompt", "label", "protect", "lock"],- content: <ProtectedLabelsSettings projectId={project.id} />,- show: showProtectedLabelsSettings,- },- {- title: "Scores Configs",- slug: "scores",- cmdKKeywords: ["config"],- content: <ScoreConfigSettings projectId={project.id} />,- show: showScoreConfigSettings,- },- {- title: "Members",- slug: "members",- cmdKKeywords: ["invite", "user"],- content: (- <div>- <Header title="Project Members" />- <MembersTable- orgId={organization.id}- project={{ id: project.id, name: project.name }}- showSettingsCard- />- <div>- <MembershipInvitesPage- orgId={organization.id}- projectId={project.id}- />- </div>- </div>- ),- },- {- title: "Integrations",- slug: "integrations",- cmdKKeywords: ["posthog", "mixpanel", "analytics", "callback", "webhook"],- content: <Integrations projectId={project.id} />,- },- {- title: "Exports",- slug: "exports",- cmdKKeywords: ["csv", "download", "json", "batch"],- content: <BatchExportsSettingsPage projectId={project.id} />,- },- {- title: "Batch Actions",- slug: "batch-actions",- cmdKKeywords: ["bulk", "batch", "action", "dataset", "delete"],- content: <BatchActionsSettingsPage projectId={project.id} />,- },- {- title: "Audit Logs",- slug: "audit-logs",- cmdKKeywords: ["trail"],- content: <AuditLogsSettingsPage projectId={project.id} />,- },- {- title: "Notifications",- slug: "notifications",- cmdKKeywords: ["inbox", "email", "mention", "alert", "slack", "webhook"],- content: (- <div className="flex flex-col gap-6">- <PersonalNotificationSettings />- {showProjectNotificationChannels && (- <ProjectNotificationChannels projectId={project.id} />- )}- </div>- ),- },- {- title: "Billing",- slug: "billing",- href: `/organization/${organization.id}/settings/billing`,- show: showBillingSettings,- },- {- title: "Organization Settings",- slug: "organization",- href: `/organization/${organization.id}/settings`,- },- {- title: "v4 Migration",- slug: "v4-migration",- href: "/v4-migration",- show: showV4Migration,- },-];--export default function SettingsPage() {- const { project, organization } = useQueryProject();- const router = useRouter();- const pages = useProjectSettingsPages();-- if (!project || !organization) return null;-- return (- <ContainerPage- headerProps={{- title: "Project Settings",- }}- >- <PagedSettingsContainer- activeSlug={router.query.page as string | undefined}- pages={pages}- />- </ContainerPage>- );-}--const Integrations = (props: { projectId: string }) => {- const hasAccess = useHasProjectAccess({- projectId: props.projectId,- scope: "integrations:CRUD",- });-- const allowBlobStorageIntegration = useHasEntitlement(- "scheduled-blob-exports",- );-- return (- <div>- <Header title="Integrations" />- <div className="space-y-6">- <Card className="p-3">- {}- <PostHogLogo className="text-foreground mb-4 w-40" />- <p className="text-primary mb-4 text-sm">- We have teamed up with PostHog (OSS product analytics) to make- Langfuse Events/Metrics available in your Posthog Dashboards.- </p>- <div className="flex items-center gap-2">- <ActionButton- variant="secondary"- hasAccess={hasAccess}- href={`/project/${props.projectId}/settings/integrations/posthog`}- >- Configure- </ActionButton>- <Button asChild variant="ghost">- <Link- href="https://langfuse.com/integrations/analytics/posthog"- target="_blank"- >- Integration Docs ↗- </Link>- </Button>- </div>- </Card>-- <Card className="p-3">- <MixpanelLogo className="text-foreground mb-4 w-20" />- <p className="text-primary mb-4 text-sm">- Integrate with Mixpanel to sync your Langfuse traces, generations,- and scores for advanced product analytics and insights.- </p>- <div className="flex items-center gap-2">- <ActionButton- variant="secondary"- hasAccess={hasAccess}- href={`/project/${props.projectId}/settings/integrations/mixpanel`}- >- Configure- </ActionButton>- <Button asChild variant="ghost">- <Link- href="https://langfuse.com/integrations/analytics/mixpanel"- target="_blank"- >- Integration Docs ↗- </Link>- </Button>- </div>- </Card>-- <Card className="p-3">- <span className="font-bold">Blob Storage</span>- <p className="text-primary mb-4 text-sm">- Configure scheduled exports of your trace data to S3 compatible- storages or Azure Blob Storage. Set up a scheduled export to your- own storage for data analysis or backup purposes.- </p>- <div className="flex items-center gap-2">- <ActionButton- variant="secondary"- hasAccess={hasAccess}- hasEntitlement={allowBlobStorageIntegration}- href={`/project/${props.projectId}/settings/integrations/blobstorage`}- >- Configure- </ActionButton>- <Button asChild variant="ghost">- <Link- href="https://langfuse.com/docs/query-traces#blob-storage"- target="_blank"- >- Integration Docs ↗- </Link>- </Button>- </div>- </Card>-- <Card className="p-3">- <div className="mb-4 flex items-center gap-2">- <SiSlack className="text-foreground h-5 w-5" />- <span className="font-bold">Slack</span>- </div>- <p className="text-primary mb-4 text-sm">- Connect a Slack workspace and create channel automations to receive- Langfuse alerts natively in Slack.- </p>- <div className="flex items-center gap-2">- <ActionButton- variant="secondary"- hasAccess={hasAccess}- href={`/project/${props.projectId}/settings/integrations/slack`}- >- Configure- </ActionButton>- </div>- </Card>-- <WebCalloutIntegrationCard- projectId={props.projectId}- hasAccess={hasAccess}- />- </div>- </div>- );-};+export {+ default,+ useProjectSettingsPages,+} from "@/src/features/projects/ProjectSettingsPage";