@@ -3,11 +3,7 @@ import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow";
3
3
import { Badge } from "@/components/ui/badge" ;
4
4
import { Button } from "@/components/ui/button" ;
5
5
import 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" ;
11
7
import Link from "next/link" ;
12
8
import type { TruncatedSessionInfo } from "../api/types" ;
13
9
import { useNewChatPageLink } from "../hooks/useNewChatPageLink" ;
@@ -33,31 +29,45 @@ export function ChatSidebar(props: {
33
29
< NebulaIcon className = "size-8 text-foreground" />
34
30
</ Link >
35
31
36
- < Badge variant = "outline" className = "gap-1" >
37
- < FlaskConicalIcon className = "size-2.5" />
32
+ < Badge variant = "secondary" className = "gap-1 py-1" >
38
33
Alpha
39
34
</ Badge >
40
35
</ div >
41
36
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 >
49
42
</ Button >
50
43
</ div >
51
44
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
+
52
62
{ sessionsToShow . length > 0 && (
53
63
< 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"
55
65
scrollableClassName = "max-h-full"
56
- shadowColor = "hsl(var(--muted)) "
66
+ shadowColor = "transparent "
57
67
shadowClassName = "z-10"
58
68
>
59
69
< 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 " >
61
71
Recent Chats
62
72
</ h3 >
63
73
{ sessionsToShow . map ( ( session ) => {
@@ -70,13 +80,6 @@ export function ChatSidebar(props: {
70
80
/>
71
81
) ;
72
82
} ) }
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 >
80
83
</ div >
81
84
</ ScrollShadow >
82
85
) }
@@ -89,3 +92,23 @@ export function ChatSidebar(props: {
89
92
</ div >
90
93
) ;
91
94
}
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