@@ -3,11 +3,7 @@ import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow";
33import { Badge } from "@/components/ui/badge" ;
44import { Button } from "@/components/ui/button" ;
55import type { Account } from "@3rdweb-sdk/react/hooks/useApi" ;
6- import {
7- ChevronRightIcon ,
8- FlaskConicalIcon ,
9- MessageSquareDashedIcon ,
10- } from "lucide-react" ;
6+ import { MessagesSquareIcon , SquareDashedBottomCodeIcon } from "lucide-react" ;
117import Link from "next/link" ;
128import type { TruncatedSessionInfo } from "../api/types" ;
139import { useNewChatPageLink } from "../hooks/useNewChatPageLink" ;
@@ -33,31 +29,45 @@ export function ChatSidebar(props: {
3329 < NebulaIcon className = "size-8 text-foreground" />
3430 </ Link >
3531
36- < Badge variant = "outline" className = "gap-1" >
37- < FlaskConicalIcon className = "size-2.5" />
32+ < Badge variant = "secondary" className = "gap-1 py-1" >
3833 Alpha
3934 </ Badge >
4035 </ div >
4136
42- < div className = "p-2" >
43- < div className = "h-3" />
44- < Button asChild variant = "primary" className = "w-full gap-2" >
45- < Link href = { newChatPage } >
46- < MessageSquareDashedIcon className = "size-4" />
47- New Chat
48- </ Link >
37+ < div className = "h-4" />
38+
39+ < div className = "flex flex-col gap-2 px-2" >
40+ < Button asChild variant = "outline" className = "w-full gap-2 rounded-lg" >
41+ < Link href = { newChatPage } > New Chat</ Link >
4942 </ Button >
5043 </ div >
5144
45+ < div className = "h-4" />
46+
47+ < div >
48+ < SidebarIconLink
49+ href = "/chat/history"
50+ icon = { MessagesSquareIcon }
51+ label = "All Chats"
52+ />
53+
54+ < SidebarIconLink
55+ href = "https://portal.thirdweb.com/nebula"
56+ icon = { SquareDashedBottomCodeIcon }
57+ label = "Documentation"
58+ target = "_blank"
59+ />
60+ </ div >
61+
5262 { sessionsToShow . length > 0 && (
5363 < ScrollShadow
54- className = "my-5 flex-1 border-t border-dashed pt-2"
64+ className = "my-4 flex-1 border-t border-dashed pt-2"
5565 scrollableClassName = "max-h-full"
56- shadowColor = "hsl(var(--muted)) "
66+ shadowColor = "transparent "
5767 shadowClassName = "z-10"
5868 >
5969 < div className = "flex flex-col gap-1" >
60- < h3 className = "px-2 py-3 text-muted-foreground text-sm " >
70+ < h3 className = "px-2 py-3 text-muted-foreground text-xs " >
6171 Recent Chats
6272 </ h3 >
6373 { sessionsToShow . map ( ( session ) => {
@@ -70,13 +80,6 @@ export function ChatSidebar(props: {
7080 />
7181 ) ;
7282 } ) }
73-
74- < Link
75- href = "/chat/history"
76- className = "inline-flex items-center gap-1.5 px-2 py-3 text-muted-foreground text-sm underline-offset-4 hover:text-foreground hover:underline"
77- >
78- View All < ChevronRightIcon className = "size-4 text-foreground" />
79- </ Link >
8083 </ div >
8184 </ ScrollShadow >
8285 ) }
@@ -89,3 +92,23 @@ export function ChatSidebar(props: {
8992 </ div >
9093 ) ;
9194}
95+
96+ function SidebarIconLink ( props : {
97+ icon : React . FC < { className ?: string } > ;
98+ label : string ;
99+ target ?: "_blank" ;
100+ href : string ;
101+ } ) {
102+ return (
103+ < Button asChild variant = "ghost" >
104+ < Link
105+ href = { props . href }
106+ target = { props . target }
107+ className = "!justify-start !px-3 w-full gap-2.5 rounded-lg text-left"
108+ >
109+ < props . icon className = "size-4" />
110+ { props . label }
111+ </ Link >
112+ </ Button >
113+ ) ;
114+ }
0 commit comments