@@ -11,7 +11,6 @@ import useCurrentUser from '../../../hooks/useCurrentUser'
11
11
import { useCreatePromptMutation , useDeletePromptMutation } from '../../../hooks/usePromptMutation'
12
12
import usePrompts from '../../../hooks/usePrompts'
13
13
import type { Responsebility , User } from '../../../types'
14
- import { Conversation } from '../../ChatV2/Conversation'
15
14
import SystemMessage from '../../ChatV2/SystemMessage'
16
15
import Rag from '../../Rag/Rag'
17
16
import { formatDate , getCurTypeLabel } from '../util'
@@ -25,7 +24,6 @@ import apiClient from '../../../util/apiClient'
25
24
import { ActionUserSearch } from '../../Admin/UserSearch'
26
25
import { useCourseRagIndices } from '../../../hooks/useRagIndices'
27
26
import RagSelector , { RagSelectorDescription } from '../../ChatV2/RagSelector'
28
- import type { ChatMessage } from '../../../../shared/chat'
29
27
30
28
const Course = ( ) => {
31
29
const [ showTeachers , setShowTeachers ] = useState ( false )
@@ -326,7 +324,6 @@ const Prompts = ({ courseId, chatInstanceId }: { courseId: string; chatInstanceI
326
324
const { ragIndices } = useCourseRagIndices ( courseId )
327
325
const [ name , setName ] = useState ( '' )
328
326
const [ system , setSystem ] = useState ( '' )
329
- const [ messages , setMessages ] = useState < ChatMessage [ ] > ( [ ] )
330
327
const [ hidden , setHidden ] = useState ( false )
331
328
const [ mandatory , setMandatory ] = useState ( false )
332
329
const [ ragIndexId , setRagIndexId ] = useState < number | undefined > ( undefined )
@@ -335,7 +332,6 @@ const Prompts = ({ courseId, chatInstanceId }: { courseId: string; chatInstanceI
335
332
const deleteMutation = useDeletePromptMutation ( )
336
333
337
334
const handleReset = ( ) => {
338
- setMessages ( [ ] )
339
335
setName ( '' )
340
336
setSystem ( '' )
341
337
setHidden ( false )
@@ -353,7 +349,7 @@ const Prompts = ({ courseId, chatInstanceId }: { courseId: string; chatInstanceI
353
349
type : 'CHAT_INSTANCE' ,
354
350
name,
355
351
systemMessage : system ,
356
- messages,
352
+ messages : [ ] ,
357
353
hidden,
358
354
mandatory,
359
355
ragIndexId,
@@ -401,8 +397,6 @@ const Prompts = ({ courseId, chatInstanceId }: { courseId: string; chatInstanceI
401
397
402
398
< SystemMessage system = { system } setSystem = { setSystem } disabled = { false } creation />
403
399
404
- < Conversation messages = { messages } completion = "" toolCalls = { { } } isStreaming = { false } setActiveToolResult = { ( _d ) => { } } />
405
-
406
400
< Box sx = { { py : 2 , display : 'flex' , alignItems : 'start' } } >
407
401
{ ! mandatoryPromptId ? (
408
402
< FormControlLabel
0 commit comments