Skip to content

Commit 6f83e9b

Browse files
committed
width and lint fix
1 parent 48464a5 commit 6f83e9b

File tree

5 files changed

+47
-33
lines changed

5 files changed

+47
-33
lines changed

src/client/components/Admin/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const Admin = () => {
5757
<Route path="/edit-texts" element={<EditTexts />} />
5858
<Route path="/usersearch" element={<UserSearch />} />
5959
</Routes>
60-
</ Container>
60+
</Container>
6161
)
6262
}
6363

src/client/components/Chat/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ const Chat = () => {
351351

352352
return (
353353
<Container sx={{ mt: '4rem', mb: '10rem' }} maxWidth="xl">
354-
355354
<Banner disclaimer={disclaimer} />
356355
{course && <CourseInfo course={course} />}
357356
<Box sx={{ mb: 3 }} />

src/client/components/ChatV2/ChatBox.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export const ChatBox = ({ disabled, onSubmit }: { disabled: boolean; onSubmit: (
3434
sx={{
3535
position: 'fixed',
3636
bottom: '8rem',
37-
// width: '100%',
3837
}}
3938
>
4039
<Paper

src/client/components/ChatV2/ChatV2.tsx

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { FileSearchResult, ResponseStreamEventData } from '../../../shared/types
1010
import useRetryTimeout from '../../hooks/useRetryTimeout'
1111
import { useTranslation } from 'react-i18next'
1212
import { handleCompletionStreamError } from './error'
13-
import { Box, Button, IconButton } from '@mui/material'
13+
import { Box, Button, IconButton, Container } from '@mui/material'
1414
import { Disclaimer } from './Disclaimer'
1515
import { Conversation } from './Conversation'
1616
import { ChatBox } from './ChatBox'
@@ -198,35 +198,48 @@ export const ChatV2 = () => {
198198
useScrollToBottom(chatContainerRef, appContainerRef, messages)
199199

200200
return (
201-
<Box
202-
sx={{
203-
position: 'relative',
204-
display: 'flex',
205-
flexDirection: 'column',
206-
}}
207-
>
208-
<SettingsModal
209-
open={settingsModalOpen}
210-
setOpen={setSettingsModalOpen}
211-
model={model.name}
212-
setModel={(name) => setModel({ name })}
213-
setRagIndex={setRagIndexId}
214-
ragIndices={ragIndices}
215-
currentRagIndex={ragIndex}
216-
/>
217-
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
218-
<Box sx={{ display: 'flex', gap: '1rem' }}>
219-
{disclaimerInfo && <Disclaimer disclaimer={disclaimerInfo} />}
220-
<SystemPrompt content={system.content} setContent={(content) => setSystem({ content })} />
221-
<Button onClick={handleReset}>Reset</Button>
222-
<IconButton onClick={() => setSettingsModalOpen(true)} title="Settings">
223-
<Settings></Settings>
224-
</IconButton>
225-
</Box>
226-
{courseId ? <Link to={'/v2'}>CurreChat</Link> : <Link to={'/v2/sandbox'}>Ohtu Sandbox</Link>}
201+
<Box sx={{ display: 'flex', flexDirection: 'row', p: 0 }}>
202+
{/* Course chats columns */}
203+
<Box sx={{ flex: 1, borderRight: '1px solid lightgray' }}>
204+
<div>Course Chats</div>
227205
</Box>
228-
<Box sx={{ display: 'flex' }}>
229-
<Box ref={chatContainerRef} flex={1}>
206+
207+
<Box
208+
sx={{
209+
flex: 4,
210+
position: 'relative',
211+
display: 'flex',
212+
flexDirection: 'column',
213+
p: '2rem',
214+
}}
215+
>
216+
<SettingsModal
217+
open={settingsModalOpen}
218+
setOpen={setSettingsModalOpen}
219+
model={model.name}
220+
setModel={(name) => setModel({ name })}
221+
setRagIndex={setRagIndexId}
222+
ragIndices={ragIndices}
223+
currentRagIndex={ragIndex}
224+
/>
225+
<Box
226+
sx={{
227+
display: 'flex',
228+
justifyContent: 'space-between',
229+
alignItems: 'center',
230+
}}
231+
>
232+
<Box sx={{ display: 'flex', gap: '1rem' }}>
233+
{disclaimerInfo && <Disclaimer disclaimer={disclaimerInfo} />}
234+
<SystemPrompt content={system.content} setContent={(content) => setSystem({ content })} />
235+
<Button onClick={handleReset}>Reset</Button>
236+
<IconButton onClick={() => setSettingsModalOpen(true)} title="Settings">
237+
<Settings></Settings>
238+
</IconButton>
239+
</Box>
240+
{courseId ? <Link to={'/v2'}>CurreChat</Link> : <Link to={'/v2/sandbox'}>Ohtu Sandbox</Link>}
241+
</Box>
242+
<Box sx={{ display: 'flex', width: '100%' }}>
230243
<Conversation messages={messages} completion={completion} fileSearchResult={fileSearchResult} />
231244
<ChatBox
232245
disabled={false}
@@ -244,6 +257,9 @@ export const ChatV2 = () => {
244257
</Box>
245258
)}
246259
</Box>
260+
261+
{/* Annotations columns */}
262+
<Box sx={{ flex: 1 }}></Box>
247263
</Box>
248264
)
249265
}

src/client/components/Rag/RagIndex.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,6 @@ export const RagIndex: React.FC = () => {
124124
))}
125125
</Box>
126126
</Box>
127-
</ Container>
127+
</Container>
128128
)
129129
}

0 commit comments

Comments
 (0)