import { html, icon, type TemplateResult } from "@mariozechner/mini-lit"; import { FileCode2 } from "lucide"; import type { ArtifactsPanel } from "./artifacts.js"; export function ArtifactPill(filename: string, artifactsPanel?: ArtifactsPanel): TemplateResult { const handleClick = () => { if (!artifactsPanel) return; // openArtifact will show the artifact and call onOpen() to open the panel if needed (artifactsPanel as any).openArtifact(filename); }; return html` ${icon(FileCode2, "sm")} ${filename} `; }