1
1
import AttachFileIcon from '@mui/icons-material/AttachFile'
2
2
import { Box , Typography } from '@mui/material'
3
3
import ReactMarkdown from 'react-markdown'
4
- import { useParams } from 'react-router-dom'
5
4
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
6
5
import { oneDark } from 'react-syntax-highlighter/dist/cjs/styles/prism'
7
6
import rehypeKatex from 'rehype-katex'
@@ -72,8 +71,6 @@ const UserMessage = ({
72
71
const AssistantMessage = ( {
73
72
content,
74
73
error,
75
- hasRagIndex,
76
- hasAnnotations,
77
74
isLastAssistantNode,
78
75
expandedNodeHeight,
79
76
fileSearchStatus,
@@ -82,8 +79,6 @@ const AssistantMessage = ({
82
79
} : {
83
80
content : string
84
81
error ?: string
85
- hasRagIndex : boolean
86
- hasAnnotations : boolean
87
82
isLastAssistantNode : boolean
88
83
expandedNodeHeight : number
89
84
fileSearchStatus : boolean
@@ -138,7 +133,6 @@ const AssistantMessage = ({
138
133
padding : '0 1.5rem' ,
139
134
borderRadius : '5px' ,
140
135
overflowX : 'auto' ,
141
- borderLeft : hasAnnotations ? '5px solid #3f51b5' : 'none' ,
142
136
} }
143
137
>
144
138
< ReactMarkdown
@@ -229,28 +223,21 @@ const MessageItem = ({
229
223
message,
230
224
isLastAssistantNode,
231
225
expandedNodeHeight,
232
- hasRagIndex,
233
226
ragDisplay,
234
227
toggleRagDisplay,
235
228
} : {
236
229
message : Message
237
230
isLastAssistantNode : boolean
238
231
expandedNodeHeight : number
239
- hasRagIndex : boolean
240
232
ragDisplay : boolean
241
233
toggleRagDisplay : ( ) => void
242
234
} ) => {
243
- const { courseId } = useParams ( )
244
- // @todo when has annotations?
245
- const hasAnnotations_Leikisti = false
246
235
247
236
if ( message . role === 'assistant' ) {
248
237
return (
249
238
< AssistantMessage
250
239
content = { message . content }
251
240
error = { message . error }
252
- hasAnnotations = { ! ! hasAnnotations_Leikisti }
253
- hasRagIndex = { hasRagIndex }
254
241
isLastAssistantNode = { isLastAssistantNode }
255
242
expandedNodeHeight = { expandedNodeHeight }
256
243
fileSearchStatus = { message . fileSearchResult ?. status == 'completed' }
@@ -279,7 +266,6 @@ export const Conversation = ({
279
266
completion,
280
267
isCompletionDone,
281
268
fileSearchResult,
282
- hasRagIndex,
283
269
ragDisplay,
284
270
toggleRagDisplay,
285
271
} : {
@@ -291,7 +277,6 @@ export const Conversation = ({
291
277
completion : string
292
278
isCompletionDone : boolean
293
279
fileSearchResult ?: FileSearchCompletedData
294
- hasRagIndex : boolean
295
280
ragDisplay : boolean
296
281
toggleRagDisplay : ( ) => void
297
282
} ) => (
@@ -315,7 +300,6 @@ export const Conversation = ({
315
300
message = { message }
316
301
isLastAssistantNode = { isLastAssistantNode }
317
302
expandedNodeHeight = { expandedNodeHeight }
318
- hasRagIndex = { hasRagIndex }
319
303
ragDisplay = { ragDisplay }
320
304
toggleRagDisplay = { toggleRagDisplay }
321
305
/>
@@ -328,7 +312,6 @@ export const Conversation = ({
328
312
message = { { role : 'assistant' , content : completion , fileSearchResult } }
329
313
isLastAssistantNode = { true }
330
314
expandedNodeHeight = { expandedNodeHeight }
331
- hasRagIndex = { hasRagIndex }
332
315
ragDisplay = { ragDisplay }
333
316
toggleRagDisplay = { toggleRagDisplay }
334
317
/>
0 commit comments