Skip to content

Commit 029c217

Browse files
committed
fix(Chat): sidebar display
1 parent 31c671b commit 029c217

File tree

1 file changed

+42
-43
lines changed

1 file changed

+42
-43
lines changed

admin/inertia/components/chat/ChatSidebar.tsx

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -71,47 +71,46 @@ export default function ChatSidebar({
7171
</div>
7272
)}
7373
</div>
74-
75-
{sessions.length > 0 && (
76-
<div className="p-4 flex flex-col items-center justify-center gap-y-2">
77-
<img src="/project_nomad_logo.png" alt="Project Nomad Logo" className="h-28 w-28 mb-6" />
78-
<StyledButton
79-
onClick={() => {
80-
if (isInModal) {
81-
window.open('/chat', '_blank')
82-
} else {
83-
router.visit('/home')
84-
}
85-
}}
86-
icon={isInModal ? 'IconExternalLink' : 'IconHome'}
87-
variant="outline"
88-
size="sm"
89-
fullWidth
90-
>
91-
{isInModal ? 'Open in New Tab' : 'Back to Home'}
92-
</StyledButton>
93-
<StyledButton
94-
onClick={() => {
95-
router.visit('/settings/models')
96-
}}
97-
icon="IconDatabase"
98-
variant="primary"
99-
size="sm"
100-
fullWidth
101-
>
102-
Models
103-
</StyledButton>
104-
<StyledButton
105-
onClick={() => {
106-
router.visit('/knowledge-base')
107-
}}
108-
icon="IconBrain"
109-
variant="primary"
110-
size="sm"
111-
fullWidth
112-
>
113-
Knowledge Base
114-
</StyledButton>
74+
<div className="p-4 flex flex-col items-center justify-center gap-y-2">
75+
<img src="/project_nomad_logo.png" alt="Project Nomad Logo" className="h-28 w-28 mb-6" />
76+
<StyledButton
77+
onClick={() => {
78+
if (isInModal) {
79+
window.open('/chat', '_blank')
80+
} else {
81+
router.visit('/home')
82+
}
83+
}}
84+
icon={isInModal ? 'IconExternalLink' : 'IconHome'}
85+
variant="outline"
86+
size="sm"
87+
fullWidth
88+
>
89+
{isInModal ? 'Open in New Tab' : 'Back to Home'}
90+
</StyledButton>
91+
<StyledButton
92+
onClick={() => {
93+
router.visit('/settings/models')
94+
}}
95+
icon="IconDatabase"
96+
variant="primary"
97+
size="sm"
98+
fullWidth
99+
>
100+
Models
101+
</StyledButton>
102+
<StyledButton
103+
onClick={() => {
104+
router.visit('/knowledge-base')
105+
}}
106+
icon="IconBrain"
107+
variant="primary"
108+
size="sm"
109+
fullWidth
110+
>
111+
Knowledge Base
112+
</StyledButton>
113+
{sessions.length > 0 && (
115114
<StyledButton
116115
onClick={onClearHistory}
117116
icon="IconTrash"
@@ -121,8 +120,8 @@ export default function ChatSidebar({
121120
>
122121
Clear History
123122
</StyledButton>
124-
</div>
125-
)}
123+
)}
124+
</div>
126125
</div>
127126
)
128127
}

0 commit comments

Comments
 (0)