@@ -16,7 +16,7 @@ import {
16
16
Typography ,
17
17
CircularProgress ,
18
18
} from '@mui/material'
19
- import { DEFAULT_RAG_SYSTEM_MESSAGE , validModels } from '@config'
19
+ import { validModels } from '@config'
20
20
import { useTranslation } from 'react-i18next'
21
21
import type { RagIndexAttributes } from '@shared/types'
22
22
import { useCreatePromptMutation , useEditPromptMutation } from '../../hooks/usePromptMutation'
@@ -41,7 +41,7 @@ export const PromptEditor = ({ prompt, ragIndices, type, chatInstanceId, setEdit
41
41
const [ name , setName ] = useState < string > ( prompt ?. name ?? '' )
42
42
const [ systemMessage , setSystemMessage ] = useState < string > ( prompt ?. systemMessage ?? '' )
43
43
const [ ragSystemMessage , setRagSystemMessage ] = useState < string > ( ( ) =>
44
- prompt ? prompt . messages ?. find ( ( m ) => m . role === 'system' ) ?. content || '' : t ( DEFAULT_RAG_SYSTEM_MESSAGE ) ,
44
+ prompt ? prompt . messages ?. find ( ( m ) => m . role === 'system' ) ?. content || '' : t ( 'prompt:defaultRagMessage' ) ,
45
45
)
46
46
const [ hidden , setHidden ] = useState < boolean > ( prompt ?. hidden ?? false )
47
47
const [ mandatory , setMandatory ] = useState < boolean > ( prompt ?. mandatory ?? false )
@@ -196,7 +196,7 @@ export const PromptEditor = ({ prompt, ragIndices, type, chatInstanceId, setEdit
196
196
< OpenableTextfield
197
197
value = { ragSystemMessage }
198
198
onChange = { ( e ) => setRagSystemMessage ( e . target . value ) }
199
- onAppend = { ( text ) => setRagSystemMessage ( prev => prev + ( prev . trim ( ) . length ? ' ' : '' ) + text ) }
199
+ onAppend = { ( text ) => setRagSystemMessage ( ( prev ) => prev + ( prev . trim ( ) . length ? ' ' : '' ) + text ) }
200
200
slotProps = { {
201
201
htmlInput : { 'data-testid' : 'rag-system-message-input' } ,
202
202
} }
@@ -228,7 +228,7 @@ export const PromptEditor = ({ prompt, ragIndices, type, chatInstanceId, setEdit
228
228
</ Box >
229
229
230
230
< DialogActions >
231
- { loading && < CircularProgress color = ' secondary' /> }
231
+ { loading && < CircularProgress color = " secondary" /> }
232
232
< BlueButton disabled = { loading } type = "submit" variant = "contained" sx = { { mt : 2 } } >
233
233
{ t ( 'common:save' ) }
234
234
</ BlueButton >
0 commit comments