@@ -3,7 +3,6 @@ import { Box, IconButton, Modal, Slider, Typography } from '@mui/material'
3
3
import { useEffect , useRef , useState } from 'react'
4
4
import { useTranslation } from 'react-i18next'
5
5
import { DEFAULT_ASSISTANT_INSTRUCTIONS , DEFAULT_MODEL_TEMPERATURE } from '../../../config'
6
- import type { RagIndexAttributes } from '../../../shared/types'
7
6
import type { Course , Prompt } from '../../types'
8
7
import AssistantInstructionsInput from './AssistantInstructionsInput'
9
8
import PromptSelector from './PromptSelector'
@@ -14,6 +13,7 @@ import { useSearchParams } from 'react-router-dom'
14
13
import { BlueButton , OutlineButtonBlack } from './generics/Buttons'
15
14
import { useAnalyticsDispatch } from '../../stores/analytics'
16
15
import useLocalStorageState from '../../hooks/useLocalStorageState'
16
+ import { IframeCopy } from '../common/IframeCopy'
17
17
18
18
const useUrlPromptId = ( ) => {
19
19
const [ searchParams ] = useSearchParams ( )
@@ -28,12 +28,6 @@ interface SettingsModalProps {
28
28
setAssistantInstructions : ( instructions : string ) => void
29
29
modelTemperature : number
30
30
setModelTemperature : ( value : number ) => void
31
- model : string
32
- setModel : ( model : string ) => void
33
- showRagSelector : boolean
34
- setRagIndex : ( ragIndex : number | undefined ) => void
35
- ragIndices ?: RagIndexAttributes [ ]
36
- currentRagIndex ?: RagIndexAttributes
37
31
course ?: Course
38
32
}
39
33
@@ -105,7 +99,6 @@ export const SettingsModal: React.FC<SettingsModalProps> = ({
105
99
106
100
const handleChangePrompt = ( newPrompt : Prompt | undefined ) => {
107
101
if ( ! newPrompt ) {
108
- console . log ( 'Setting default prompt' )
109
102
setActivePrompt ( undefined )
110
103
setLocalStoragePrompt ( undefined )
111
104
setAssistantInstructions ( DEFAULT_ASSISTANT_INSTRUCTIONS )
@@ -121,14 +114,12 @@ export const SettingsModal: React.FC<SettingsModalProps> = ({
121
114
if ( mandatoryPrompt ) {
122
115
handleChangePrompt ( mandatoryPrompt )
123
116
} else if ( urlPrompt ) {
124
- console . log ( `Using promptId=${ urlPrompt . id } defined by URL search param` )
125
117
handleChangePrompt ( urlPrompt )
126
118
}
127
119
} , [ mandatoryPrompt , urlPrompt ] )
128
120
const handleClose = async ( ) => {
129
121
//handles if the user wants to update current promts
130
122
if ( activePrompt ) {
131
- console . log ( 'updating active promt' )
132
123
await promptSaveMutation . mutateAsync ( { name : activePrompt . name , promptToSave : activePrompt } )
133
124
}
134
125
//default promt is not a saved promt so this handles the change to it
0 commit comments