@@ -34,6 +34,7 @@ import EmailButton from './EmailButton'
34
34
import { MenuBookTwoTone , Tune } from '@mui/icons-material'
35
35
import { useChatScroll } from '../../hooks/useChatScroll'
36
36
import { TestUseInfoV2 } from './TestUseInfo'
37
+ import Footer from '../Footer'
37
38
38
39
function useLocalStorageStateWithURLDefault ( key : string , defaultValue : string , urlKey : string ) {
39
40
const [ value , setValue ] = useLocalStorageState ( key , defaultValue )
@@ -347,10 +348,11 @@ export const ChatV2 = () => {
347
348
sx = { {
348
349
display : 'flex' ,
349
350
flexDirection : 'row' ,
350
- height : '100%' ,
351
+ // height: '100%',
351
352
width : '100%' ,
352
353
maxWidth : '100%' ,
353
354
overflowX : 'clip' ,
355
+ overscrollBehavior : 'none' ,
354
356
} }
355
357
>
356
358
{ /* Chat side panel column -------------------------------------------------------------------------------------------*/ }
@@ -378,7 +380,7 @@ export const ChatV2 = () => {
378
380
/>
379
381
</ Drawer >
380
382
< LeftMenu
381
- sx = { { display : { xs : 'none' , lg : 'block ' } , position : 'sticky' , bottom : '0px' } }
383
+ sx = { { display : { xs : 'none' , lg : 'flex ' } , position : 'sticky' , top : 0 } }
382
384
course = { course }
383
385
handleReset = { handleReset }
384
386
user = { user }
@@ -403,16 +405,13 @@ export const ChatV2 = () => {
403
405
display : 'flex' ,
404
406
position : 'relative' ,
405
407
flexDirection : 'column' ,
406
- height : '100%' ,
407
408
overflowY : 'visible' ,
408
409
// Padding for navbar
409
410
paddingTop : ! isEmbeddedMode ? '4rem' : '0' ,
410
411
} }
411
412
>
412
413
< Box
413
414
sx = { ( theme ) => ( {
414
- height : '80vh' ,
415
-
416
415
[ theme . breakpoints . down ( 'sm' ) ] : {
417
416
width : '95%' ,
418
417
maxWidth : '95%' ,
@@ -557,21 +556,19 @@ export const ChatV2 = () => {
557
556
{ ! isMobile && showAnnotations && activeFileSearchResult && (
558
557
< Box
559
558
sx = { {
560
- flex : 0 ,
561
- position : 'relative' ,
559
+ maxWidth : { xs : 300 , md : 400 } ,
560
+ height : '100vh' ,
561
+ display : 'flex' ,
562
+ flexDirection : 'column' ,
563
+ flex : 1 ,
564
+ position : 'sticky' ,
565
+ top : 0 ,
562
566
borderLeft : '1px solid rgba(0,0,0,0.12)' ,
563
567
width : 400 ,
564
568
minWidth : 400 ,
565
569
} }
566
570
>
567
- < Box
568
- sx = { {
569
- position : 'sticky' ,
570
- top : 20 ,
571
- } }
572
- >
573
- < Annotations fileSearchResult = { activeFileSearchResult } setShowAnnotations = { setShowAnnotations } />
574
- </ Box >
571
+ < Annotations fileSearchResult = { activeFileSearchResult } setShowAnnotations = { setShowAnnotations } />
575
572
</ Box >
576
573
) }
577
574
@@ -606,32 +603,37 @@ const LeftMenu = ({
606
603
messages,
607
604
} ) => {
608
605
return (
609
- < Box sx = { sx } >
610
- < Box
611
- sx = { {
606
+ < Box
607
+ sx = { [
608
+ {
612
609
flex : 1 ,
613
610
minWidth : 300 ,
614
611
maxWidth : { xs : 300 , md : 400 } ,
615
612
position : 'relative' ,
616
- height : '100% ' ,
613
+ height : '100vh ' ,
617
614
borderRight : '1px solid rgba(0, 0, 0, 0.12)' ,
618
- } }
619
- >
620
- < Box sx = { { position : 'sticky' , top : 70 , padding : '2rem 1.5rem' } } >
621
- { course && < ChatInfo course = { course } /> }
622
- < Box sx = { { display : 'flex' , flexDirection : 'column' , gap : '0.6rem' , mb : '2rem' } } >
623
- < OutlineButtonBlack startIcon = { < RestartAltIcon /> } onClick = { handleReset } id = "empty-conversation-button" >
624
- { t ( 'chat:emptyConversation' ) }
625
- </ OutlineButtonBlack >
626
-
627
- < EmailButton messages = { messages } disabled = { ! messages ?. length } />
628
- < OutlineButtonBlack startIcon = { < Tune /> } onClick = { ( ) => setSettingsModalOpen ( true ) } id = "settings-button" >
629
- { t ( 'chat:settings' ) }
630
- </ OutlineButtonBlack >
631
- < OutlineButtonBlack startIcon = { < HelpIcon /> } onClick = { ( ) => setDisclaimerStatus ( true ) } id = "help-button" >
632
- { t ( 'info:title' ) }
633
- </ OutlineButtonBlack >
634
- </ Box >
615
+ paddingTop : '4rem' ,
616
+
617
+ display : 'flex' ,
618
+ flexDirection : 'column' ,
619
+ } ,
620
+ sx ,
621
+ ] }
622
+ >
623
+ < Box p = "1rem" >
624
+ { course && < ChatInfo course = { course } /> }
625
+ < Box sx = { { display : 'flex' , flexDirection : 'column' , gap : '0.6rem' , mb : '2rem' } } >
626
+ < OutlineButtonBlack startIcon = { < RestartAltIcon /> } onClick = { handleReset } id = "empty-conversation-button" >
627
+ { t ( 'chat:emptyConversation' ) }
628
+ </ OutlineButtonBlack >
629
+
630
+ < EmailButton messages = { messages } disabled = { ! messages ?. length } />
631
+ < OutlineButtonBlack startIcon = { < Tune /> } onClick = { ( ) => setSettingsModalOpen ( true ) } id = "settings-button" >
632
+ { t ( 'chat:settings' ) }
633
+ </ OutlineButtonBlack >
634
+ < OutlineButtonBlack startIcon = { < HelpIcon /> } onClick = { ( ) => setDisclaimerStatus ( true ) } id = "help-button" >
635
+ { t ( 'info:title' ) }
636
+ </ OutlineButtonBlack >
635
637
{ course && showRagSelector && (
636
638
< >
637
639
< Typography variant = "h6" sx = { { mb : 1 , display : 'flex' , gap : 1 , alignItems : 'center' } } fontWeight = "bold" >
@@ -645,7 +647,8 @@ const LeftMenu = ({
645
647
</ >
646
648
) }
647
649
</ Box >
648
- </ Box > { ' ' }
650
+ </ Box >
651
+ < Footer />
649
652
</ Box >
650
653
)
651
654
}
0 commit comments