Open History to see the last commit
1import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "./ui/empty";
2import { SidebarInset } from "./ui/sidebar";
3import { isElectron } from "../env";
4import { cn } from "~/lib/utils";
5import { COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS } from "~/workspaceTitlebar";
6
7export function NoActiveThreadState() {
8 return (
9 <SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
10 <div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background">
11 <header
12 className={cn(
13 "border-b border-border px-3 transition-[padding-left] duration-200 ease-linear motion-reduce:transition-none sm:px-5",
14 isElectron
15 ? "drag-region flex h-[var(--workspace-topbar-height)] min-h-[var(--workspace-topbar-height)] shrink-0 items-center"
16 : "flex h-[var(--workspace-topbar-height)] min-h-[var(--workspace-topbar-height)] shrink-0 items-center",
17 COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS,
18 )}
19 >
20 {isElectron ? (
21 <span className="text-xs text-muted-foreground/50 wco:pr-[var(--workspace-native-controls-inset)]">
22 No active thread
23 </span>
24 ) : (
25 <div className="flex items-center gap-2">
26 <span className="text-sm font-medium text-foreground md:text-muted-foreground/60">
27 No active thread
28 </span>
29 </div>
30 )}
31 </header>
32
33 <Empty className="flex-1">
34 <div className="w-full max-w-lg px-8 py-12">
35 <EmptyHeader className="max-w-none">
36 <EmptyTitle className="text-foreground text-xl">Pick a thread to continue</EmptyTitle>
37 <EmptyDescription className="mt-2 text-sm text-muted-foreground/78">
38 Select an existing thread or create a new one to get started.
39 </EmptyDescription>
40 </EmptyHeader>
41 </div>
42 </Empty>
43 </div>
44 </SidebarInset>
45 );
46}