@@ -8,8 +8,10 @@ import {
88  Box , 
99  Chip , 
1010  LinearProgress , 
11+   Sheet , 
1112}  from  '@mui/joy' ; 
1213import  {  FileIcon ,  FolderIcon  }  from  'lucide-react' ; 
14+ import  {  Editor  }  from  '@monaco-editor/react' ; 
1315
1416interface  TaskFilesModalProps  { 
1517  open : boolean ; 
@@ -32,9 +34,8 @@ export default function TaskFilesModal({
3234    < Modal  open = { open }  onClose = { onClose } > 
3335      < ModalDialog 
3436        sx = { { 
35-           maxWidth : 500 , 
36-           width : '100%' , 
37-           maxHeight : '80vh' , 
37+           width : '80vw' , 
38+           height : '80vh' , 
3839          overflow : 'hidden' , 
3940        } } 
4041      > 
@@ -54,11 +55,8 @@ export default function TaskFilesModal({
5455        )  : ( 
5556          < Box 
5657            sx = { { 
57-               maxHeight : '60vh ' , 
58+               height : '100% ' , 
5859              overflow : 'auto' , 
59-               border : '1px solid' , 
60-               borderColor : 'divider' , 
61-               borderRadius : 'sm' , 
6260              p : 2 , 
6361            } } 
6462          > 
@@ -71,31 +69,52 @@ export default function TaskFilesModal({
7169                No files found in src/ directory
7270              </ Typography > 
7371            )  : ( 
74-               < Stack  spacing = { 1 } > 
75-                 { files . map ( ( file ,  index )  =>  ( 
76-                   < Box 
77-                     key = { index } 
78-                     sx = { { 
79-                       display : 'flex' , 
80-                       alignItems : 'center' , 
81-                       gap : 1 , 
82-                       p : 1 , 
83-                       borderRadius : 'sm' , 
84-                       '&:hover' : { 
85-                         backgroundColor : 'background.level1' , 
72+               < Box  display = "flex"  gap = { 4 }  sx = { {  height : '100%'  } } > 
73+                 < Sheet 
74+                   sx = { {  width : 300 ,  gap : 2 ,  overflow : 'hidden'  } } 
75+                   variant = "outlined" 
76+                 > 
77+                   { files . map ( ( file ,  index )  =>  ( 
78+                     < Box 
79+                       key = { index } 
80+                       sx = { { 
81+                         display : 'flex' , 
82+                         alignItems : 'center' , 
83+                         gap : 1 , 
84+                         p : 1 , 
85+                         borderRadius : 'sm' , 
86+                         '&:hover' : { 
87+                           backgroundColor : 'background.level1' , 
88+                         } , 
89+                       } } 
90+                     > 
91+                       < FileIcon  size = { 16 }  /> 
92+                       < Typography 
93+                         level = "body-sm" 
94+                         sx = { {  fontFamily : 'monospace'  } } 
95+                       > 
96+                         { file } 
97+                       </ Typography > 
98+                     </ Box > 
99+                   ) ) } 
100+                 </ Sheet > 
101+                 < Box  sx = { {  flex : 1 ,  height : '100%'  } } > 
102+                   < Editor 
103+                     defaultLanguage = "shell" 
104+                     theme = "my-theme" 
105+                     height = "100%" 
106+                     options = { { 
107+                       minimap : { 
108+                         enabled : false , 
86109                      } , 
110+                       fontSize : 18 , 
111+                       cursorStyle : 'block' , 
112+                       wordWrap : 'on' , 
87113                    } } 
88-                   > 
89-                     < FileIcon  size = { 16 }  /> 
90-                     < Typography 
91-                       level = "body-sm" 
92-                       sx = { {  fontFamily : 'monospace'  } } 
93-                     > 
94-                       { file } 
95-                     </ Typography > 
96-                   </ Box > 
97-                 ) ) } 
98-               </ Stack > 
114+                     onMount = { ( )  =>  { } } 
115+                   /> 
116+                 </ Box > 
117+               </ Box > 
99118            ) } 
100119          </ Box > 
101120        ) } 
0 commit comments