first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:52:23 +03:00
commit 880f412e2c
2662 changed files with 866266 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { Router } from "lucide-react";
import ContactUsView from "../views/contactUsView";
export default function PromptDeploymentView(_props?: { omitTitle?: boolean }) {
return (
<div className="w-full">
<ContactUsView
align="top"
className="justify-start gap-3 rounded-md border p-4"
icon={<Router className="h-8 w-8" strokeWidth={1.5} />}
title="Unlock prompt deployments for better prompt versioning and A/B testing."
description="This feature is a part of the Bifrost enterprise license. We would love to know more about your use case and how we can help you."
readmeLink="https://docs.getbifrost.ai/enterprise/prompt-deployments"
/>
</div>
);
}

View File

@@ -0,0 +1,38 @@
import { usePromptContext } from "@/components/prompts/context";
import { AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion";
import { cn } from "@/lib/utils";
import PromptDeploymentView from "./promptDeploymentView";
export type SettingsSidebarSection = "parameters" | "deployments";
export function PromptDeploymentsAccordionItem({ activeSection }: { activeSection: SettingsSidebarSection | undefined }) {
const { selectedPromptId } = usePromptContext();
if (!selectedPromptId) {
return null;
}
const deploymentsOpen = activeSection === "deployments";
return (
<AccordionItem
value="deployments"
className={cn(
"border-border/60 flex min-h-0 flex-col border-b-0 border-t pt-1",
deploymentsOpen ? "min-h-0 grow overflow-hidden" : "shrink-0 grow-0",
)}
>
<AccordionTrigger
data-testid="prompt-deployments-trigger"
className="text-muted-foreground w-full min-w-0 shrink-0 py-3 pr-1 text-xs font-medium uppercase hover:no-underline [&[data-state=open]>svg]:rotate-180"
>
<span className="min-w-0 flex-1 text-left font-semibold">Deployments</span>
</AccordionTrigger>
<AccordionContent
containerClassName="data-[state=open]:flex data-[state=open]:min-h-0 data-[state=open]:flex-1 data-[state=open]:flex-col"
className="min-h-0 flex-1 overflow-y-auto pt-0 pb-2"
>
<PromptDeploymentView omitTitle />
</AccordionContent>
</AccordionItem>
);
}