From 2e271f25247c8d9e2c522942cceaa8f2bb722bb2 Mon Sep 17 00:00:00 2001 From: Francisco Javier Arceo Date: Mon, 21 Jul 2025 00:08:56 -0400 Subject: [PATCH] disable attachments and update sidebar Signed-off-by: Francisco Javier Arceo fixing package.json Signed-off-by: Francisco Javier Arceo moving ui -> chat Signed-off-by: Francisco Javier Arceo --- llama_stack/ui/app/auth/signin/page.tsx | 4 +- llama_stack/ui/app/chat-playground/page.tsx | 8 ++-- llama_stack/ui/app/layout.tsx | 8 ++-- .../ui/app/logs/vector-stores/page.tsx | 4 +- .../chat-completion-detail.tsx | 2 +- .../chat-completions/chat-messasge-item.tsx | 2 +- .../{ui => chat}/audio-visualizer.tsx | 0 .../ui/components/{ui => chat}/breadcrumb.tsx | 0 .../ui/components/{ui => chat}/button.tsx | 0 .../ui/components/{ui => chat}/card.tsx | 0 .../components/{ui => chat}/chat-message.tsx | 6 +-- .../ui/components/{ui => chat}/chat.tsx | 12 +++--- .../components/{ui => chat}/collapsible.tsx | 0 .../components/{ui => chat}/copy-button.tsx | 2 +- .../components/{ui => chat}/dropdown-menu.tsx | 0 .../components/{ui => chat}/file-preview.tsx | 0 .../ui/components/{ui => chat}/input.tsx | 0 .../{ui => chat}/interrupt-prompt.tsx | 0 .../{ui => chat}/markdown-renderer.tsx | 2 +- .../{ui => chat}/message-components.tsx | 0 .../components/{ui => chat}/message-input.tsx | 9 ++-- .../components/{ui => chat}/message-list.tsx | 4 +- .../components/{ui => chat}/mode-toggle.tsx | 4 +- .../{ui => chat}/prompt-suggestions.tsx | 0 .../ui/components/{ui => chat}/select.tsx | 0 .../ui/components/{ui => chat}/separator.tsx | 0 .../ui/components/{ui => chat}/sheet.tsx | 0 .../ui/components/{ui => chat}/sidebar.tsx | 12 +++--- .../{ui => chat}/sign-in-button.tsx | 0 .../ui/components/{ui => chat}/skeleton.tsx | 0 .../ui/components/{ui => chat}/sonner.tsx | 0 .../ui/components/{ui => chat}/table.tsx | 0 .../{ui => chat}/theme-provider.tsx | 0 .../ui/components/{ui => chat}/tooltip.tsx | 0 .../{ui => chat}/typing-indicator.tsx | 0 .../ui/components/layout/app-sidebar.tsx | 43 ++++++++++++++++--- .../ui/components/layout/detail-layout.tsx | 4 +- .../ui/components/layout/page-breadcrumb.tsx | 2 +- llama_stack/ui/components/logs/logs-table.tsx | 4 +- .../responses/items/function-call-item.tsx | 2 +- .../responses/items/generic-item.tsx | 2 +- .../items/grouped-function-call-item.tsx | 2 +- .../responses/items/message-item.tsx | 2 +- .../responses/items/web-search-item.tsx | 2 +- .../components/responses/responses-detail.tsx | 4 +- .../vector-stores/vector-store-detail.tsx | 6 +-- llama_stack/ui/package-lock.json | 8 ++-- llama_stack/ui/package.json | 1 + 48 files changed, 97 insertions(+), 64 deletions(-) rename llama_stack/ui/components/{ui => chat}/audio-visualizer.tsx (100%) rename llama_stack/ui/components/{ui => chat}/breadcrumb.tsx (100%) rename llama_stack/ui/components/{ui => chat}/button.tsx (100%) rename llama_stack/ui/components/{ui => chat}/card.tsx (100%) rename llama_stack/ui/components/{ui => chat}/chat-message.tsx (98%) rename llama_stack/ui/components/{ui => chat}/chat.tsx (96%) rename llama_stack/ui/components/{ui => chat}/collapsible.tsx (100%) rename llama_stack/ui/components/{ui => chat}/copy-button.tsx (95%) rename llama_stack/ui/components/{ui => chat}/dropdown-menu.tsx (100%) rename llama_stack/ui/components/{ui => chat}/file-preview.tsx (100%) rename llama_stack/ui/components/{ui => chat}/input.tsx (100%) rename llama_stack/ui/components/{ui => chat}/interrupt-prompt.tsx (100%) rename llama_stack/ui/components/{ui => chat}/markdown-renderer.tsx (98%) rename llama_stack/ui/components/{ui => chat}/message-components.tsx (100%) rename llama_stack/ui/components/{ui => chat}/message-input.tsx (97%) rename llama_stack/ui/components/{ui => chat}/message-list.tsx (89%) rename llama_stack/ui/components/{ui => chat}/mode-toggle.tsx (92%) rename llama_stack/ui/components/{ui => chat}/prompt-suggestions.tsx (100%) rename llama_stack/ui/components/{ui => chat}/select.tsx (100%) rename llama_stack/ui/components/{ui => chat}/separator.tsx (100%) rename llama_stack/ui/components/{ui => chat}/sheet.tsx (100%) rename llama_stack/ui/components/{ui => chat}/sidebar.tsx (98%) rename llama_stack/ui/components/{ui => chat}/sign-in-button.tsx (100%) rename llama_stack/ui/components/{ui => chat}/skeleton.tsx (100%) rename llama_stack/ui/components/{ui => chat}/sonner.tsx (100%) rename llama_stack/ui/components/{ui => chat}/table.tsx (100%) rename llama_stack/ui/components/{ui => chat}/theme-provider.tsx (100%) rename llama_stack/ui/components/{ui => chat}/tooltip.tsx (100%) rename llama_stack/ui/components/{ui => chat}/typing-indicator.tsx (100%) diff --git a/llama_stack/ui/app/auth/signin/page.tsx b/llama_stack/ui/app/auth/signin/page.tsx index c9510fd6b..596186b9b 100644 --- a/llama_stack/ui/app/auth/signin/page.tsx +++ b/llama_stack/ui/app/auth/signin/page.tsx @@ -1,14 +1,14 @@ "use client"; import { signIn, signOut, useSession } from "next-auth/react"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/components/chat/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, -} from "@/components/ui/card"; +} from "@/components/chat/card"; import { Copy, Check, Home, Github } from "lucide-react"; import { useState } from "react"; import { useRouter } from "next/navigation"; diff --git a/llama_stack/ui/app/chat-playground/page.tsx b/llama_stack/ui/app/chat-playground/page.tsx index 40f9a91dc..ba89923a0 100644 --- a/llama_stack/ui/app/chat-playground/page.tsx +++ b/llama_stack/ui/app/chat-playground/page.tsx @@ -2,16 +2,16 @@ import { useState, useEffect } from "react"; import { flushSync } from "react-dom"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/components/chat/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from "@/components/ui/select"; -import { Chat } from "@/components/ui/chat"; -import { type Message } from "@/components/ui/chat-message"; +} from "@/components/chat/select"; +import { Chat } from "@/components/chat/chat"; +import { type Message } from "@/components/chat/chat-message"; import { useAuthClient } from "@/hooks/use-auth-client"; import type { CompletionCreateParams } from "llama-stack-client/resources/chat/completions"; import type { Model } from "llama-stack-client/resources/models"; diff --git a/llama_stack/ui/app/layout.tsx b/llama_stack/ui/app/layout.tsx index 19fb18c36..5589a836c 100644 --- a/llama_stack/ui/app/layout.tsx +++ b/llama_stack/ui/app/layout.tsx @@ -1,8 +1,8 @@ import type { Metadata } from "next"; -import { ThemeProvider } from "@/components/ui/theme-provider"; +import { ThemeProvider } from "@/components/chat/theme-provider"; import { SessionProvider } from "@/components/providers/session-provider"; import { Geist, Geist_Mono } from "next/font/google"; -import { ModeToggle } from "@/components/ui/mode-toggle"; +import { ModeToggle } from "@/components/chat/mode-toggle"; import "./globals.css"; const geistSans = Geist({ @@ -20,9 +20,9 @@ export const metadata: Metadata = { description: "Llama Stack UI", }; -import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar"; +import { SidebarProvider, SidebarTrigger } from "@/components/chat/sidebar"; import { AppSidebar } from "@/components/layout/app-sidebar"; -import { SignInButton } from "@/components/ui/sign-in-button"; +import { SignInButton } from "@/components/chat/sign-in-button"; export default function Layout({ children }: { children: React.ReactNode }) { return ( diff --git a/llama_stack/ui/app/logs/vector-stores/page.tsx b/llama_stack/ui/app/logs/vector-stores/page.tsx index 29e1fabd6..c5a9ca664 100644 --- a/llama_stack/ui/app/logs/vector-stores/page.tsx +++ b/llama_stack/ui/app/logs/vector-stores/page.tsx @@ -16,8 +16,8 @@ import { TableHead, TableHeader, TableRow, -} from "@/components/ui/table"; -import { Skeleton } from "@/components/ui/skeleton"; +} from "@/components/chat/table"; +import { Skeleton } from "@/components/chat/skeleton"; export default function VectorStoresPage() { const client = useAuthClient(); diff --git a/llama_stack/ui/components/chat-completions/chat-completion-detail.tsx b/llama_stack/ui/components/chat-completions/chat-completion-detail.tsx index 200807864..b950c3a2b 100644 --- a/llama_stack/ui/components/chat-completions/chat-completion-detail.tsx +++ b/llama_stack/ui/components/chat-completions/chat-completion-detail.tsx @@ -2,7 +2,7 @@ import { ChatMessage, ChatCompletion } from "@/lib/types"; import { ChatMessageItem } from "@/components/chat-completions/chat-messasge-item"; -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/chat/card"; import { DetailLoadingView, DetailErrorView, diff --git a/llama_stack/ui/components/chat-completions/chat-messasge-item.tsx b/llama_stack/ui/components/chat-completions/chat-messasge-item.tsx index 2e8593bfb..61ab2028c 100644 --- a/llama_stack/ui/components/chat-completions/chat-messasge-item.tsx +++ b/llama_stack/ui/components/chat-completions/chat-messasge-item.tsx @@ -7,7 +7,7 @@ import { extractTextFromContentPart } from "@/lib/format-message-content"; import { MessageBlock, ToolCallBlock, -} from "@/components/ui/message-components"; +} from "@/components/chat/message-components"; interface ChatMessageItemProps { message: ChatMessage; diff --git a/llama_stack/ui/components/ui/audio-visualizer.tsx b/llama_stack/ui/components/chat/audio-visualizer.tsx similarity index 100% rename from llama_stack/ui/components/ui/audio-visualizer.tsx rename to llama_stack/ui/components/chat/audio-visualizer.tsx diff --git a/llama_stack/ui/components/ui/breadcrumb.tsx b/llama_stack/ui/components/chat/breadcrumb.tsx similarity index 100% rename from llama_stack/ui/components/ui/breadcrumb.tsx rename to llama_stack/ui/components/chat/breadcrumb.tsx diff --git a/llama_stack/ui/components/ui/button.tsx b/llama_stack/ui/components/chat/button.tsx similarity index 100% rename from llama_stack/ui/components/ui/button.tsx rename to llama_stack/ui/components/chat/button.tsx diff --git a/llama_stack/ui/components/ui/card.tsx b/llama_stack/ui/components/chat/card.tsx similarity index 100% rename from llama_stack/ui/components/ui/card.tsx rename to llama_stack/ui/components/chat/card.tsx diff --git a/llama_stack/ui/components/ui/chat-message.tsx b/llama_stack/ui/components/chat/chat-message.tsx similarity index 98% rename from llama_stack/ui/components/ui/chat-message.tsx rename to llama_stack/ui/components/chat/chat-message.tsx index a7678ea83..0b4d09131 100644 --- a/llama_stack/ui/components/ui/chat-message.tsx +++ b/llama_stack/ui/components/chat/chat-message.tsx @@ -10,9 +10,9 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger, -} from "@/components/ui/collapsible" -import { FilePreview } from "@/components/ui/file-preview" -import { MarkdownRenderer } from "@/components/ui/markdown-renderer" +} from "@/components/chat/collapsible" +import { FilePreview } from "@/components/chat/file-preview" +import { MarkdownRenderer } from "@/components/chat/markdown-renderer" const chatBubbleVariants = cva( "group/message relative break-words rounded-lg p-3 text-sm sm:max-w-[70%]", diff --git a/llama_stack/ui/components/ui/chat.tsx b/llama_stack/ui/components/chat/chat.tsx similarity index 96% rename from llama_stack/ui/components/ui/chat.tsx rename to llama_stack/ui/components/chat/chat.tsx index 21cd3dc01..e82d3a47a 100644 --- a/llama_stack/ui/components/ui/chat.tsx +++ b/llama_stack/ui/components/chat/chat.tsx @@ -11,12 +11,12 @@ import { ArrowDown, ThumbsDown, ThumbsUp } from "lucide-react" import { cn } from "@/lib/utils" import { useAutoScroll } from "@/hooks/use-auto-scroll" -import { Button } from "@/components/ui/button" -import { type Message } from "@/components/ui/chat-message" -import { CopyButton } from "@/components/ui/copy-button" -import { MessageInput } from "@/components/ui/message-input" -import { MessageList } from "@/components/ui/message-list" -import { PromptSuggestions } from "@/components/ui/prompt-suggestions" +import { Button } from "@/components/chat/button" +import { type Message } from "@/components/chat/chat-message" +import { CopyButton } from "@/components/chat/copy-button" +import { MessageInput } from "@/components/chat/message-input" +import { MessageList } from "@/components/chat/message-list" +import { PromptSuggestions } from "@/components/chat/prompt-suggestions" interface ChatPropsBase { handleSubmit: ( diff --git a/llama_stack/ui/components/ui/collapsible.tsx b/llama_stack/ui/components/chat/collapsible.tsx similarity index 100% rename from llama_stack/ui/components/ui/collapsible.tsx rename to llama_stack/ui/components/chat/collapsible.tsx diff --git a/llama_stack/ui/components/ui/copy-button.tsx b/llama_stack/ui/components/chat/copy-button.tsx similarity index 95% rename from llama_stack/ui/components/ui/copy-button.tsx rename to llama_stack/ui/components/chat/copy-button.tsx index 51d2ca2d4..2f740d8d0 100644 --- a/llama_stack/ui/components/ui/copy-button.tsx +++ b/llama_stack/ui/components/chat/copy-button.tsx @@ -4,7 +4,7 @@ import { Check, Copy } from "lucide-react" import { cn } from "@/lib/utils" import { useCopyToClipboard } from "@/hooks/use-copy-to-clipboard" -import { Button } from "@/components/ui/button" +import { Button } from "@/components/chat/button" type CopyButtonProps = { content: string diff --git a/llama_stack/ui/components/ui/dropdown-menu.tsx b/llama_stack/ui/components/chat/dropdown-menu.tsx similarity index 100% rename from llama_stack/ui/components/ui/dropdown-menu.tsx rename to llama_stack/ui/components/chat/dropdown-menu.tsx diff --git a/llama_stack/ui/components/ui/file-preview.tsx b/llama_stack/ui/components/chat/file-preview.tsx similarity index 100% rename from llama_stack/ui/components/ui/file-preview.tsx rename to llama_stack/ui/components/chat/file-preview.tsx diff --git a/llama_stack/ui/components/ui/input.tsx b/llama_stack/ui/components/chat/input.tsx similarity index 100% rename from llama_stack/ui/components/ui/input.tsx rename to llama_stack/ui/components/chat/input.tsx diff --git a/llama_stack/ui/components/ui/interrupt-prompt.tsx b/llama_stack/ui/components/chat/interrupt-prompt.tsx similarity index 100% rename from llama_stack/ui/components/ui/interrupt-prompt.tsx rename to llama_stack/ui/components/chat/interrupt-prompt.tsx diff --git a/llama_stack/ui/components/ui/markdown-renderer.tsx b/llama_stack/ui/components/chat/markdown-renderer.tsx similarity index 98% rename from llama_stack/ui/components/ui/markdown-renderer.tsx rename to llama_stack/ui/components/chat/markdown-renderer.tsx index 374f687df..c7acea607 100644 --- a/llama_stack/ui/components/ui/markdown-renderer.tsx +++ b/llama_stack/ui/components/chat/markdown-renderer.tsx @@ -3,7 +3,7 @@ import Markdown from "react-markdown" import remarkGfm from "remark-gfm" import { cn } from "@/lib/utils" -import { CopyButton } from "@/components/ui/copy-button" +import { CopyButton } from "@/components/chat/copy-button" interface MarkdownRendererProps { children: string diff --git a/llama_stack/ui/components/ui/message-components.tsx b/llama_stack/ui/components/chat/message-components.tsx similarity index 100% rename from llama_stack/ui/components/ui/message-components.tsx rename to llama_stack/ui/components/chat/message-components.tsx diff --git a/llama_stack/ui/components/ui/message-input.tsx b/llama_stack/ui/components/chat/message-input.tsx similarity index 97% rename from llama_stack/ui/components/ui/message-input.tsx rename to llama_stack/ui/components/chat/message-input.tsx index 32761260d..69df79416 100644 --- a/llama_stack/ui/components/ui/message-input.tsx +++ b/llama_stack/ui/components/chat/message-input.tsx @@ -8,10 +8,10 @@ import { omit } from "remeda" import { cn } from "@/lib/utils" import { useAudioRecording } from "@/hooks/use-audio-recording" import { useAutosizeTextArea } from "@/hooks/use-autosize-textarea" -import { AudioVisualizer } from "@/components/ui/audio-visualizer" -import { Button } from "@/components/ui/button" -import { FilePreview } from "@/components/ui/file-preview" -import { InterruptPrompt } from "@/components/ui/interrupt-prompt" +import { AudioVisualizer } from "@/components/chat/audio-visualizer" +import { Button } from "@/components/chat/button" +import { FilePreview } from "@/components/chat/file-preview" +import { InterruptPrompt } from "@/components/chat/interrupt-prompt" interface MessageInputBaseProps extends React.TextareaHTMLAttributes { @@ -254,6 +254,7 @@ export function MessageInput({ variant="outline" className="h-8 w-8" aria-label="Attach a file" + disabled={true} onClick={async () => { const files = await showFileUploadDialog() addFiles(files) diff --git a/llama_stack/ui/components/ui/message-list.tsx b/llama_stack/ui/components/chat/message-list.tsx similarity index 89% rename from llama_stack/ui/components/ui/message-list.tsx rename to llama_stack/ui/components/chat/message-list.tsx index c0b46407c..b61b55ddb 100644 --- a/llama_stack/ui/components/ui/message-list.tsx +++ b/llama_stack/ui/components/chat/message-list.tsx @@ -2,8 +2,8 @@ import { ChatMessage, type ChatMessageProps, type Message, -} from "@/components/ui/chat-message" -import { TypingIndicator } from "@/components/ui/typing-indicator" +} from "@/components/chat/chat-message" +import { TypingIndicator } from "@/components/chat/typing-indicator" type AdditionalMessageOptions = Omit diff --git a/llama_stack/ui/components/ui/mode-toggle.tsx b/llama_stack/ui/components/chat/mode-toggle.tsx similarity index 92% rename from llama_stack/ui/components/ui/mode-toggle.tsx rename to llama_stack/ui/components/chat/mode-toggle.tsx index 92640161e..7701761a8 100644 --- a/llama_stack/ui/components/ui/mode-toggle.tsx +++ b/llama_stack/ui/components/chat/mode-toggle.tsx @@ -4,13 +4,13 @@ import * as React from "react"; import { Moon, Sun } from "lucide-react"; import { useTheme } from "next-themes"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/components/chat/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu"; +} from "@/components/chat/dropdown-menu"; export function ModeToggle() { const { setTheme } = useTheme(); diff --git a/llama_stack/ui/components/ui/prompt-suggestions.tsx b/llama_stack/ui/components/chat/prompt-suggestions.tsx similarity index 100% rename from llama_stack/ui/components/ui/prompt-suggestions.tsx rename to llama_stack/ui/components/chat/prompt-suggestions.tsx diff --git a/llama_stack/ui/components/ui/select.tsx b/llama_stack/ui/components/chat/select.tsx similarity index 100% rename from llama_stack/ui/components/ui/select.tsx rename to llama_stack/ui/components/chat/select.tsx diff --git a/llama_stack/ui/components/ui/separator.tsx b/llama_stack/ui/components/chat/separator.tsx similarity index 100% rename from llama_stack/ui/components/ui/separator.tsx rename to llama_stack/ui/components/chat/separator.tsx diff --git a/llama_stack/ui/components/ui/sheet.tsx b/llama_stack/ui/components/chat/sheet.tsx similarity index 100% rename from llama_stack/ui/components/ui/sheet.tsx rename to llama_stack/ui/components/chat/sheet.tsx diff --git a/llama_stack/ui/components/ui/sidebar.tsx b/llama_stack/ui/components/chat/sidebar.tsx similarity index 98% rename from llama_stack/ui/components/ui/sidebar.tsx rename to llama_stack/ui/components/chat/sidebar.tsx index f8a0a3ed5..ec38ce787 100644 --- a/llama_stack/ui/components/ui/sidebar.tsx +++ b/llama_stack/ui/components/chat/sidebar.tsx @@ -7,23 +7,23 @@ import { PanelLeftIcon } from "lucide-react"; import { useIsMobile } from "@/hooks/use-mobile"; import { cn } from "@/lib/utils"; -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; -import { Separator } from "@/components/ui/separator"; +import { Button } from "@/components/chat/button"; +import { Input } from "@/components/chat/input"; +import { Separator } from "@/components/chat/separator"; import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, -} from "@/components/ui/sheet"; -import { Skeleton } from "@/components/ui/skeleton"; +} from "@/components/chat/sheet"; +import { Skeleton } from "@/components/chat/skeleton"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, -} from "@/components/ui/tooltip"; +} from "@/components/chat/tooltip"; const SIDEBAR_COOKIE_NAME = "sidebar_state"; const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7; diff --git a/llama_stack/ui/components/ui/sign-in-button.tsx b/llama_stack/ui/components/chat/sign-in-button.tsx similarity index 100% rename from llama_stack/ui/components/ui/sign-in-button.tsx rename to llama_stack/ui/components/chat/sign-in-button.tsx diff --git a/llama_stack/ui/components/ui/skeleton.tsx b/llama_stack/ui/components/chat/skeleton.tsx similarity index 100% rename from llama_stack/ui/components/ui/skeleton.tsx rename to llama_stack/ui/components/chat/skeleton.tsx diff --git a/llama_stack/ui/components/ui/sonner.tsx b/llama_stack/ui/components/chat/sonner.tsx similarity index 100% rename from llama_stack/ui/components/ui/sonner.tsx rename to llama_stack/ui/components/chat/sonner.tsx diff --git a/llama_stack/ui/components/ui/table.tsx b/llama_stack/ui/components/chat/table.tsx similarity index 100% rename from llama_stack/ui/components/ui/table.tsx rename to llama_stack/ui/components/chat/table.tsx diff --git a/llama_stack/ui/components/ui/theme-provider.tsx b/llama_stack/ui/components/chat/theme-provider.tsx similarity index 100% rename from llama_stack/ui/components/ui/theme-provider.tsx rename to llama_stack/ui/components/chat/theme-provider.tsx diff --git a/llama_stack/ui/components/ui/tooltip.tsx b/llama_stack/ui/components/chat/tooltip.tsx similarity index 100% rename from llama_stack/ui/components/ui/tooltip.tsx rename to llama_stack/ui/components/chat/tooltip.tsx diff --git a/llama_stack/ui/components/ui/typing-indicator.tsx b/llama_stack/ui/components/chat/typing-indicator.tsx similarity index 100% rename from llama_stack/ui/components/ui/typing-indicator.tsx rename to llama_stack/ui/components/chat/typing-indicator.tsx diff --git a/llama_stack/ui/components/layout/app-sidebar.tsx b/llama_stack/ui/components/layout/app-sidebar.tsx index 007f88537..ff014d8ab 100644 --- a/llama_stack/ui/components/layout/app-sidebar.tsx +++ b/llama_stack/ui/components/layout/app-sidebar.tsx @@ -21,14 +21,16 @@ import { SidebarMenuButton, SidebarMenuItem, SidebarHeader, -} from "@/components/ui/sidebar"; +} from "@/components/chat/sidebar"; +// Extracted Chat Playground item +const chatPlaygroundItem = { + title: "Chat Playground", + url: "/chat-playground", + icon: MessageCircle, +}; +// Removed Chat Playground from log items const logItems = [ - { - title: "Chat Playground", - url: "/chat-playground", - icon: MessageCircle, - }, { title: "Chat Completions", url: "/logs/chat-completions", @@ -60,6 +62,35 @@ export function AppSidebar() { Llama Stack + {/* Chat Playground as its own section */} + + + + + + + + {chatPlaygroundItem.title} + + + + + + + + {/* Logs section */} Logs diff --git a/llama_stack/ui/components/layout/detail-layout.tsx b/llama_stack/ui/components/layout/detail-layout.tsx index 3013195a2..b18d630fe 100644 --- a/llama_stack/ui/components/layout/detail-layout.tsx +++ b/llama_stack/ui/components/layout/detail-layout.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -import { Skeleton } from "@/components/ui/skeleton"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/chat/card"; +import { Skeleton } from "@/components/chat/skeleton"; export function DetailLoadingView({ title }: { title: string }) { return ( diff --git a/llama_stack/ui/components/layout/page-breadcrumb.tsx b/llama_stack/ui/components/layout/page-breadcrumb.tsx index fdb561d68..ebb477546 100644 --- a/llama_stack/ui/components/layout/page-breadcrumb.tsx +++ b/llama_stack/ui/components/layout/page-breadcrumb.tsx @@ -9,7 +9,7 @@ import { BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, -} from "@/components/ui/breadcrumb"; +} from "@/components/chat/breadcrumb"; export interface BreadcrumbSegment { label: string; diff --git a/llama_stack/ui/components/logs/logs-table.tsx b/llama_stack/ui/components/logs/logs-table.tsx index 3d4e609c7..bb0fb5804 100644 --- a/llama_stack/ui/components/logs/logs-table.tsx +++ b/llama_stack/ui/components/logs/logs-table.tsx @@ -13,8 +13,8 @@ import { TableHead, TableHeader, TableRow, -} from "@/components/ui/table"; -import { Skeleton } from "@/components/ui/skeleton"; +} from "@/components/chat/table"; +import { Skeleton } from "@/components/chat/skeleton"; // Generic table row data interface export interface LogTableRow { diff --git a/llama_stack/ui/components/responses/items/function-call-item.tsx b/llama_stack/ui/components/responses/items/function-call-item.tsx index beca935f0..495344d2e 100644 --- a/llama_stack/ui/components/responses/items/function-call-item.tsx +++ b/llama_stack/ui/components/responses/items/function-call-item.tsx @@ -1,7 +1,7 @@ import { MessageBlock, ToolCallBlock, -} from "@/components/ui/message-components"; +} from "@/components/chat/message-components"; import { FunctionCallItem } from "../utils/item-types"; interface FunctionCallItemProps { diff --git a/llama_stack/ui/components/responses/items/generic-item.tsx b/llama_stack/ui/components/responses/items/generic-item.tsx index 6b6f56603..7bf7a70df 100644 --- a/llama_stack/ui/components/responses/items/generic-item.tsx +++ b/llama_stack/ui/components/responses/items/generic-item.tsx @@ -1,7 +1,7 @@ import { MessageBlock, ToolCallBlock, -} from "@/components/ui/message-components"; +} from "@/components/chat/message-components"; import { BaseItem } from "../utils/item-types"; interface GenericItemProps { diff --git a/llama_stack/ui/components/responses/items/grouped-function-call-item.tsx b/llama_stack/ui/components/responses/items/grouped-function-call-item.tsx index ded0ced71..065ea7573 100644 --- a/llama_stack/ui/components/responses/items/grouped-function-call-item.tsx +++ b/llama_stack/ui/components/responses/items/grouped-function-call-item.tsx @@ -1,7 +1,7 @@ import { MessageBlock, ToolCallBlock, -} from "@/components/ui/message-components"; +} from "@/components/chat/message-components"; import { FunctionCallItem, FunctionCallOutputItem } from "../utils/item-types"; interface GroupedFunctionCallItemProps { diff --git a/llama_stack/ui/components/responses/items/message-item.tsx b/llama_stack/ui/components/responses/items/message-item.tsx index 532fddfaa..77f4d2a2c 100644 --- a/llama_stack/ui/components/responses/items/message-item.tsx +++ b/llama_stack/ui/components/responses/items/message-item.tsx @@ -1,4 +1,4 @@ -import { MessageBlock } from "@/components/ui/message-components"; +import { MessageBlock } from "@/components/chat/message-components"; import { MessageItem } from "../utils/item-types"; interface MessageItemProps { diff --git a/llama_stack/ui/components/responses/items/web-search-item.tsx b/llama_stack/ui/components/responses/items/web-search-item.tsx index aaa5741ce..36f38ab25 100644 --- a/llama_stack/ui/components/responses/items/web-search-item.tsx +++ b/llama_stack/ui/components/responses/items/web-search-item.tsx @@ -1,7 +1,7 @@ import { MessageBlock, ToolCallBlock, -} from "@/components/ui/message-components"; +} from "@/components/chat/message-components"; import { WebSearchCallItem } from "../utils/item-types"; interface WebSearchItemProps { diff --git a/llama_stack/ui/components/responses/responses-detail.tsx b/llama_stack/ui/components/responses/responses-detail.tsx index c8c447ba4..1ad111edd 100644 --- a/llama_stack/ui/components/responses/responses-detail.tsx +++ b/llama_stack/ui/components/responses/responses-detail.tsx @@ -1,8 +1,8 @@ "use client"; import { OpenAIResponse, InputItemListResponse } from "@/lib/types"; -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -import { Skeleton } from "@/components/ui/skeleton"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/chat/card"; +import { Skeleton } from "@/components/chat/skeleton"; import { DetailLoadingView, DetailErrorView, diff --git a/llama_stack/ui/components/vector-stores/vector-store-detail.tsx b/llama_stack/ui/components/vector-stores/vector-store-detail.tsx index 7c5c91dd3..8a93fdbfa 100644 --- a/llama_stack/ui/components/vector-stores/vector-store-detail.tsx +++ b/llama_stack/ui/components/vector-stores/vector-store-detail.tsx @@ -2,8 +2,8 @@ import type { VectorStore } from "llama-stack-client/resources/vector-stores/vector-stores"; import type { VectorStoreFile } from "llama-stack-client/resources/vector-stores/files"; -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -import { Skeleton } from "@/components/ui/skeleton"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/chat/card"; +import { Skeleton } from "@/components/chat/skeleton"; import { DetailLoadingView, DetailErrorView, @@ -20,7 +20,7 @@ import { TableHead, TableHeader, TableRow, -} from "@/components/ui/table"; +} from "@/components/chat/table"; interface VectorStoreDetailViewProps { store: VectorStore | null; diff --git a/llama_stack/ui/package-lock.json b/llama_stack/ui/package-lock.json index e330a4247..567c06f7e 100644 --- a/llama_stack/ui/package-lock.json +++ b/llama_stack/ui/package-lock.json @@ -18,7 +18,7 @@ "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "framer-motion": "^11.18.2", - "llama-stack-client": "^0.2.15", + "llama-stack-client": "0.2.16", "lucide-react": "^0.510.0", "next": "15.3.3", "next-auth": "^4.24.11", @@ -9926,9 +9926,9 @@ "license": "MIT" }, "node_modules/llama-stack-client": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/llama-stack-client/-/llama-stack-client-0.2.15.tgz", - "integrity": "sha512-onfYzgPWAxve4uP7BuiK/ZdEC7w6X1PIXXXpQY57qZC7C4xUAM5kwfT3JWIe/jE22Lwc2vTN1ScfYlAYcoYAsg==", + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/llama-stack-client/-/llama-stack-client-0.2.16.tgz", + "integrity": "sha512-jM7sh1CB5wVumutYb3qfmYJpoTe3IRAa5lm3Us4qO7zVP4tbo3eCE7BOFNWyChpjo9efafUItwogNh28pum9PQ==", "license": "Apache-2.0", "dependencies": { "@types/node": "^18.11.18", diff --git a/llama_stack/ui/package.json b/llama_stack/ui/package.json index c6617bdf4..7f1dad647 100644 --- a/llama_stack/ui/package.json +++ b/llama_stack/ui/package.json @@ -22,6 +22,7 @@ "@radix-ui/react-tooltip": "^1.2.6", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "framer-motion": "^11.18.2", "llama-stack-client": "0.2.16", "lucide-react": "^0.510.0", "next": "15.3.3",