chore: move src/llama_stack/ui to src/llama_stack_ui (#4068)

# What does this PR do?
This better separates UI from backend code, which was a point of
confusion often for our beloved AI friends.


## Test Plan
CI
This commit is contained in:
ehhuang 2025-11-04 15:21:49 -08:00 committed by GitHub
parent 5850e3473f
commit 95b0493fae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
156 changed files with 20 additions and 20 deletions

View file

@ -0,0 +1,44 @@
"use client";
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";
type CopyButtonProps = {
content: string;
copyMessage?: string;
};
export function CopyButton({ content, copyMessage }: CopyButtonProps) {
const { isCopied, handleCopy } = useCopyToClipboard({
text: content,
copyMessage,
});
return (
<Button
variant="ghost"
size="icon"
className="relative h-6 w-6"
aria-label="Copy to clipboard"
onClick={handleCopy}
>
<div className="absolute inset-0 flex items-center justify-center">
<Check
className={cn(
"h-4 w-4 transition-transform ease-in-out",
isCopied ? "scale-100" : "scale-0"
)}
/>
</div>
<Copy
className={cn(
"h-4 w-4 transition-transform ease-in-out",
isCopied ? "scale-0" : "scale-100"
)}
/>
</Button>
);
}