Open History to see the last commit
1import { ChevronDownIcon, PaperclipIcon } from "lucide-react";
2
3import { Button } from "../ui/button";
4
5export function WorkspaceFileDropOverlay() {
6 return (
7 <div
8 className="pointer-events-none absolute inset-2 z-40 flex items-center justify-center rounded-2xl border-2 border-dashed border-primary/60 bg-primary/[0.035]"
9 data-chat-workspace-drop-overlay="true"
10 >
11 <div
12 role="status"
13 className="flex items-center gap-2 rounded-full border border-primary/25 bg-background/95 px-4 py-2.5 text-sm font-medium text-foreground shadow-lg"
14 >
15 <PaperclipIcon className="size-4 text-primary" aria-hidden="true" />
16 Drop files to attach
17 </div>
18 </div>
19 );
20}
21
22/** Sits `bottom` pixels up, clear of the composer and its attached banners. */
23export function ScrollToEndButton(props: {
24 readonly bottom: number;
25 readonly onScrollToEnd: () => void;
26}) {
27 return (
28 <div
29 className="chat-scroll-to-bottom pointer-events-none absolute z-30 flex justify-center py-1.5"
30 style={{ bottom: props.bottom }}
31 >
32 <Button
33 aria-label="Scroll to end"
34 onPointerDown={(event) => event.preventDefault()}
35 onClick={props.onScrollToEnd}
36 className="pointer-events-auto"
37 size="xs"
38 variant="glass"
39 >
40 <ChevronDownIcon className="size-3.5" />
41 Scroll to end
42 </Button>
43 </div>
44 );
45}