@@ -43,7 +43,6 @@ export const ChatV2 = () => {
43
43
const [ model , setModel ] = useLocalStorageState < { name : string } > ( 'model-v2' , {
44
44
name : DEFAULT_MODEL ,
45
45
} )
46
- // TODO: Do translation
47
46
const [ assistantInstructions , setAssistantInstructions ] = useLocalStorageState < { content : string } > ( `${ localStoragePrefix } -chat-instructions` , {
48
47
content : DEFAULT_ASSISTANT_INSTRUCTIONS ,
49
48
} )
@@ -56,13 +55,13 @@ export const ChatV2 = () => {
56
55
const [ fileSearchResult , setFileSearchResult ] = useLocalStorageState < FileSearchResult > ( 'last-file-search' , null )
57
56
58
57
// UI States
59
- const [ settingsModalOpen , setSettingsModalOpen ] = useState ( true )
58
+ const [ settingsModalOpen , setSettingsModalOpen ] = useState < boolean > ( false )
60
59
const [ fileName , setFileName ] = useState < string > ( '' )
61
- const [ alertOpen , setAlertOpen ] = useState ( false )
62
- const [ disallowedFileType , setDisallowedFileType ] = useState ( '' )
63
- const [ tokenUsageWarning , setTokenUsageWarning ] = useState ( '' )
64
- const [ tokenWarningVisible , setTokenWarningVisible ] = useState ( false )
65
- const [ saveConsent , setSaveConsent ] = useState ( true )
60
+ const [ alertOpen , setAlertOpen ] = useState < boolean > ( false )
61
+ const [ disallowedFileType , setDisallowedFileType ] = useState < string > ( '' )
62
+ const [ tokenUsageWarning , setTokenUsageWarning ] = useState < string > ( '' )
63
+ const [ tokenWarningVisible , setTokenWarningVisible ] = useState < boolean > ( false )
64
+ const [ saveConsent , setSaveConsent ] = useState < boolean > ( true )
66
65
67
66
// Chat Streaming states
68
67
const [ completion , setCompletion ] = useState < string > ( '' )
@@ -289,7 +288,7 @@ export const ChatV2 = () => {
289
288
290
289
< Box sx = { { display : 'flex' , flexDirection : 'column' , gap : '0.2rem' , padding : '0.5rem' } } >
291
290
< CourseOption link = "/v2/sandbox" isActive = { ! ! course } >
292
- OHTE sandbox
291
+ Sandbox
293
292
</ CourseOption >
294
293
</ Box >
295
294
</ Box >
@@ -321,7 +320,7 @@ export const ChatV2 = () => {
321
320
< Collapse in = { ! ! course } timeout = { 100 } >
322
321
< Fade in = { true } timeout = { 800 } >
323
322
< Typography variant = "h5" sx = { { textAlign : 'center' , fontWeight : 'bold' , mb : '1.5rem' } } >
324
- { course ?. id === 'sandbox' ? 'OHTE Sandbox' : course ?. id }
323
+ { course ?. id === 'sandbox' ? 'Sandbox' : course ?. id }
325
324
</ Typography >
326
325
</ Fade >
327
326
</ Collapse >
@@ -359,6 +358,7 @@ export const ChatV2 = () => {
359
358
completion = { completion }
360
359
isCompletionDone = { isCompletionDone }
361
360
fileSearchResult = { fileSearchResult }
361
+ hasRagIndex = { ! ! ragIndex }
362
362
/>
363
363
</ Box >
364
364
@@ -387,8 +387,7 @@ export const ChatV2 = () => {
387
387
} }
388
388
>
389
389
< Box sx = { { position : 'sticky' , top : 80 , padding : '4rem 2rem 2rem 0' } } >
390
- { /* {ragIndex && ( */ }
391
- { course && (
390
+ { ragIndex && course && (
392
391
< Box sx = { { height : '100%' , display : 'flex' , flexDirection : 'column' , gap : '1.5rem' } } >
393
392
< Typography variant = "h6" > Lähteet</ Typography >
394
393
{ /* <CitationsBox messages={messages} fileSearchResult={fileSearchResult} /> */ }
0 commit comments