mac: bundle web chat assets
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { icon } from "@mariozechner/mini-lit";
|
||||
import { html } from "lit";
|
||||
import { FileCode2 } from "lucide";
|
||||
export function ArtifactPill(filename, artifactsPanel) {
|
||||
const handleClick = (e) => {
|
||||
if (!artifactsPanel)
|
||||
return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
// openArtifact will show the artifact and call onOpen() to open the panel if needed
|
||||
artifactsPanel.openArtifact(filename);
|
||||
};
|
||||
return html `
|
||||
<span
|
||||
class="inline-flex items-center gap-1 px-2 py-0.5 text-xs bg-muted/50 border border-border rounded ${artifactsPanel ? "cursor-pointer hover:bg-muted transition-colors" : ""}"
|
||||
@click=${artifactsPanel ? handleClick : null}
|
||||
>
|
||||
${icon(FileCode2, "sm")}
|
||||
<span class="text-foreground">${filename}</span>
|
||||
</span>
|
||||
`;
|
||||
}
|
||||
//# sourceMappingURL=ArtifactPill.js.map
|
||||
Reference in New Issue
Block a user