File tree Expand file tree Collapse file tree 4 files changed +43
-15
lines changed Expand file tree Collapse file tree 4 files changed +43
-15
lines changed Original file line number Diff line number Diff line change @@ -405,9 +405,7 @@ export function ChatPage({ firstMessage }: ChatPageProps) {
405
405
406
406
// Access chat state directly from the store
407
407
const currentChatState = useCurrentChatState ( ) ;
408
- const chatSessionId = useChatSessionStore (
409
- ( state : any ) => state . currentSessionId
410
- ) ;
408
+ const chatSessionId = useChatSessionStore ( ( state ) => state . currentSessionId ) ;
411
409
const submittedMessage = useSubmittedMessage ( ) ;
412
410
const loadingError = useLoadingError ( ) ;
413
411
const uncaughtError = useUncaughtError ( ) ;
@@ -421,13 +419,13 @@ export function ChatPage({ firstMessage }: ChatPageProps) {
421
419
const documentSidebarVisible = useDocumentSidebarVisible ( ) ;
422
420
const chatSessionSharedStatus = useChatSessionSharedStatus ( ) ;
423
421
const updateHasPerformedInitialScroll = useChatSessionStore (
424
- ( state : any ) => state . updateHasPerformedInitialScroll
422
+ ( state ) => state . updateHasPerformedInitialScroll
425
423
) ;
426
424
const updateCurrentDocumentSidebarVisible = useChatSessionStore (
427
- ( state : any ) => state . updateCurrentDocumentSidebarVisible
425
+ ( state ) => state . updateCurrentDocumentSidebarVisible
428
426
) ;
429
427
const updateCurrentChatSessionSharedStatus = useChatSessionStore (
430
- ( state : any ) => state . updateCurrentChatSessionSharedStatus
428
+ ( state ) => state . updateCurrentChatSessionSharedStatus
431
429
) ;
432
430
433
431
const clientScrollToBottom = useCallback (
Original file line number Diff line number Diff line change @@ -35,9 +35,15 @@ interface PopoverMenuProps {
35
35
export function PopoverMenu ( { children } : PopoverMenuProps ) {
36
36
return (
37
37
< div className = "flex flex-col gap-spacing-inline w-[10rem]" >
38
- { children ?. map ( ( child ) =>
39
- child === null ? < div className = "border-b mx-padding-button" /> : child
40
- ) }
38
+ { children ?. map ( ( child , index ) => (
39
+ < div key = { index } >
40
+ { child === null ? (
41
+ < div className = "border-b mx-padding-button" />
42
+ ) : (
43
+ child
44
+ ) }
45
+ </ div >
46
+ ) ) }
41
47
</ div >
42
48
) ;
43
49
}
Original file line number Diff line number Diff line change @@ -179,17 +179,19 @@ function ChatButtonInner({ chatSession, onChatSessionClick }: ChatButtonProps) {
179
179
popover = {
180
180
< PopoverMenu >
181
181
{ [
182
- < NavigationTab icon = { SvgShare } onClick = { noProp ( ) } >
182
+ < NavigationTab key = "share" icon = { SvgShare } onClick = { noProp ( ) } >
183
183
Share
184
184
</ NavigationTab > ,
185
185
< NavigationTab
186
+ key = "rename"
186
187
icon = { SvgEdit }
187
188
onClick = { noProp ( ( ) => setRenamingChat ( true ) ) }
188
189
>
189
190
Rename
190
191
</ NavigationTab > ,
191
192
null ,
192
193
< NavigationTab
194
+ key = "delete"
193
195
icon = { SvgTrash }
194
196
onClick = { noProp ( ( ) => setDeleteConfirmationModalOpen ( true ) ) }
195
197
danger
@@ -259,6 +261,7 @@ function AgentsButtonInner({
259
261
< PopoverMenu >
260
262
{ [
261
263
< NavigationTab
264
+ key = "pin-unpin-chat"
262
265
icon = { SvgPin }
263
266
onClick = { noProp ( ( ) => onTogglePin ( visibleAgent , ! pinned ) ) }
264
267
>
Original file line number Diff line number Diff line change @@ -82,24 +82,45 @@ function SettingsPopover({
82
82
// </NavigationTab>
83
83
// )),
84
84
showAdminPanel && (
85
- < NavigationTab href = "/admin/indexing/status" icon = { SvgSettings } >
85
+ < NavigationTab
86
+ key = "admin-panel"
87
+ href = "/admin/indexing/status"
88
+ icon = { SvgSettings }
89
+ >
86
90
Admin Panel
87
91
</ NavigationTab >
88
92
) ,
89
93
showCuratorPanel && (
90
- < NavigationTab href = "/admin/indexing/status" icon = { SvgSettings } >
94
+ < NavigationTab
95
+ key = "curator-panel"
96
+ href = "/admin/indexing/status"
97
+ icon = { SvgSettings }
98
+ >
91
99
Curator Panel
92
100
</ NavigationTab >
93
101
) ,
94
- < NavigationTab icon = { SvgUser } onClick = { onUserSettingsClick } >
102
+ < NavigationTab
103
+ key = "user-settings"
104
+ icon = { SvgUser }
105
+ onClick = { onUserSettingsClick }
106
+ >
95
107
User Settings
96
108
</ NavigationTab > ,
97
- < NavigationTab icon = { SvgBell } onClick = { onNotificationsClick } >
109
+ < NavigationTab
110
+ key = "notifications"
111
+ icon = { SvgBell }
112
+ onClick = { onNotificationsClick }
113
+ >
98
114
{ `Notifications ${ ( notifications && notifications . length ) || 0 > 0 ? `(${ notifications ! . length } )` : "" } ` }
99
115
</ NavigationTab > ,
100
116
showLogout && null ,
101
117
showLogout && (
102
- < NavigationTab icon = { SvgLogOut } danger onClick = { handleLogout } >
118
+ < NavigationTab
119
+ key = "log-out"
120
+ icon = { SvgLogOut }
121
+ danger
122
+ onClick = { handleLogout }
123
+ >
103
124
Log out
104
125
</ NavigationTab >
105
126
) ,
You can’t perform that action at this time.
0 commit comments