Skip to content

Commit bc58664

Browse files
akshaydeoimpoiler
authored andcommitted
prompt repository changes
1 parent 9f28846 commit bc58664

File tree

14 files changed

+270
-23
lines changed

14 files changed

+270
-23
lines changed

core/mcp/clientmanager.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,6 @@ func (m *MCPManager) connectToMCPClient(config *schemas.MCPClientConfig) error {
681681
// Release lock BEFORE starting monitors to prevent deadlock
682682
// (StartMonitoring -> Start() tries to acquire RLock on the same mutex)
683683
m.mu.Unlock()
684-
685684
// Register OnConnectionLost hook for SSE connections to detect idle timeouts
686685
if config.ConnectionType == schemas.MCPConnectionTypeSSE && externalClient != nil {
687686
externalClient.OnConnectionLost(func(err error) {
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Router } from "lucide-react";
2+
import ContactUsView from "../views/contactUsView";
3+
4+
export default function PromptDeploymentView() {
5+
return (
6+
<div className="h-full w-full">
7+
<ContactUsView
8+
className="mx-auto min-h-[80vh]"
9+
icon={<Router className="h-[5.5rem] w-[5.5rem]" strokeWidth={1} />}
10+
title="Unlock prompt deployments for better prompt versioning and A/B testing."
11+
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."
12+
readmeLink="https://docs.getbifrost.ai/enterprise/prompt-deployments"
13+
/>
14+
</div>
15+
);
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { SquareTerminal } from "lucide-react";
2+
import ContactUsView from "../views/contactUsView";
3+
4+
export default function PromptsView() {
5+
return (
6+
<div className="h-full w-full">
7+
<ContactUsView
8+
className="mx-auto min-h-[80vh]"
9+
icon={<SquareTerminal className="h-[5.5rem] w-[5.5rem]" strokeWidth={1} />}
10+
title="Unlock prompt repository for better prompt management"
11+
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."
12+
readmeLink="https://docs.getbifrost.ai/enterprise/prompt-repository"
13+
/>
14+
</div>
15+
);
16+
}

ui/app/globals.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
@import "tailwindcss";
22
@import "tw-animate-css";
33

4+
@source "../app/**/*.tsx";
5+
@source "../node_modules/streamdown/dist/*.js";
6+
47
@custom-variant dark (&:is(.dark *));
58

69
@theme inline {
@@ -213,3 +216,15 @@ body {
213216
padding-inline: 0.5rem;
214217

215218
}
219+
220+
[data-radix-scroll-area-viewport].no-table > div {
221+
display: block !important;
222+
}
223+
224+
div.content-container:has(.no-padding-parent) {
225+
@apply !p-0;
226+
}
227+
228+
div.content-container main.content-container-inner:has(.no-padding-parent) {
229+
@apply !p-0;
230+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import PromptDeploymentView from "@enterprise/components/prompt-deployments/promptDeploymentView";
2+
3+
export default function PromptDeploymentsPage() {
4+
return (
5+
<div className="mx-auto w-full max-w-7xl">
6+
<PromptDeploymentView />
7+
</div>
8+
);
9+
}

ui/app/workspace/prompt-repo/page.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import PromptsView from "@enterprise/components/prompts/promptsView";
2+
3+
export default function PromptsPage() {
4+
return <PromptsView />;
5+
}

ui/components/sidebar.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
Network,
2424
PanelLeftClose,
2525
Puzzle,
26+
Router,
2627
ScrollText,
2728
Search,
2829
SearchCheck,
@@ -31,6 +32,7 @@ import {
3132
ShieldCheck,
3233
ShieldUser,
3334
Shuffle,
35+
SquareTerminal,
3436
Telescope,
3537
ToolCase,
3638
TrendingUp,
@@ -615,8 +617,23 @@ export default function AppSidebar() {
615617
url: "/workspace/prompt-repo",
616618
icon: FolderGit,
617619
description: "Prompt repository",
618-
// Public access intentional — feature is "coming soon" with no sensitive data; RBAC will be added at GA
619620
hasAccess: true,
621+
subItems: [
622+
{
623+
title: "Prompts",
624+
url: "/workspace/prompt-repo/prompts",
625+
icon: SquareTerminal,
626+
description: "Manage prompts",
627+
hasAccess: true,
628+
},
629+
{
630+
title: "Deployments",
631+
url: "/workspace/prompt-repo/deployments",
632+
icon: Router,
633+
description: "Manage deployment",
634+
hasAccess: true,
635+
},
636+
],
620637
},
621638
{
622639
title: "Evals",

ui/components/ui/resizable.tsx

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
"use client"
2+
3+
import { GripVerticalIcon } from "lucide-react"
4+
import type { GroupProps, PanelProps, SeparatorProps } from "react-resizable-panels"
5+
import { Group, Panel, Separator } from "react-resizable-panels"
6+
7+
import { cn } from "@/lib/utils"
8+
9+
// Map 'direction' prop to 'orientation' for backward compatibility
10+
type ResizablePanelGroupProps = Omit<GroupProps, 'orientation'> & {
11+
direction?: 'horizontal' | 'vertical'
12+
}
13+
14+
function ResizablePanelGroup({
15+
className,
16+
direction = 'horizontal',
17+
...props
18+
}: ResizablePanelGroupProps) {
19+
return (
20+
<Group
21+
data-slot="resizable-panel-group"
22+
data-panel-group-direction={direction}
23+
orientation={direction}
24+
className={cn(
25+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
26+
className
27+
)}
28+
{...props}
29+
/>
30+
)
31+
}
32+
33+
function ResizablePanel({
34+
className,
35+
...props
36+
}: PanelProps & { className?: string }) {
37+
return <Panel data-slot="resizable-panel" className={className} {...props} />
38+
}
39+
40+
function ResizableHandle({
41+
withHandle,
42+
className,
43+
...props
44+
}: SeparatorProps & {
45+
withHandle?: boolean
46+
}) {
47+
return (
48+
<Separator
49+
data-slot="resizable-handle"
50+
className={cn(
51+
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
52+
className
53+
)}
54+
{...props}
55+
>
56+
{withHandle && (
57+
<div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
58+
<GripVerticalIcon className="size-2.5" />
59+
</div>
60+
)}
61+
</Separator>
62+
)
63+
}
64+
65+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
66+

ui/components/ui/scrollArea.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
55

66
import { cn } from "@/lib/utils";
77

8-
function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
8+
function ScrollArea({
9+
className,
10+
viewportClassName,
11+
children,
12+
...props
13+
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root> & { viewportClassName?: string }) {
914
return (
1015
<ScrollAreaPrimitive.Root data-slot="scroll-area" className={cn("relative", className)} {...props}>
1116
<ScrollAreaPrimitive.Viewport
1217
data-slot="scroll-area-viewport"
13-
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
18+
className={cn(
19+
"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
20+
viewportClassName,
21+
)}
1422
>
1523
{children}
1624
</ScrollAreaPrimitive.Viewport>

0 commit comments

Comments
 (0)