MCPcopy
hub / github.com/marimo-team/marimo / FileAttachmentPill

Function FileAttachmentPill

frontend/src/components/chat/chat-components.tsx:46–74  ·  view source on GitHub ↗
({
  file,
  className,
  onRemove,
}: {
  file: File;
  className?: string;
  onRemove: () => void;
})

Source from the content-addressed store, hash-verified

44};
45
46export const FileAttachmentPill = ({
47 file,
48 className,
49 onRemove,
50}: {
51 file: File;
52 className?: string;
53 onRemove: () => void;
54}) => {
55 const [isHovered, setIsHovered] = useState(false);
56
57 return (
58 <div
59 className={cn(
60 "py-1 px-1.5 bg-muted rounded-md cursor-pointer flex flex-row gap-1 items-center text-xs",
61 className,
62 )}
63 onMouseEnter={() => setIsHovered(true)}
64 onMouseLeave={() => setIsHovered(false)}
65 >
66 {isHovered ? (
67 <XIcon className="h-3 w-3 mt-0.5" onClick={onRemove} />
68 ) : (
69 renderFileIcon(file)
70 )}
71 {file.name}
72 </div>
73 );
74};
75
76export const SendButton = ({
77 isLoading,

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
renderFileIconFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…