Skip to content

Commit 76aa555

Browse files
committed
starting to associate every RAGged response with an annotations trigger
1 parent 75310b8 commit 76aa555

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

src/client/components/ChatV2/ChatV2.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ export const ChatV2 = () => {
508508
completion={completion}
509509
isCompletionDone={isCompletionDone}
510510
fileSearchResult={fileSearch}
511-
hasRagIndex={!!ragIndex}
512511
ragDisplay={ragDisplay}
513512
toggleRagDisplay={handleRagDisplay}
514513
/>

src/client/components/ChatV2/Conversation.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import AttachFileIcon from '@mui/icons-material/AttachFile'
22
import { Box, Typography } from '@mui/material'
33
import ReactMarkdown from 'react-markdown'
4-
import { useParams } from 'react-router-dom'
54
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
65
import { oneDark } from 'react-syntax-highlighter/dist/cjs/styles/prism'
76
import rehypeKatex from 'rehype-katex'
@@ -72,8 +71,6 @@ const UserMessage = ({
7271
const AssistantMessage = ({
7372
content,
7473
error,
75-
hasRagIndex,
76-
hasAnnotations,
7774
isLastAssistantNode,
7875
expandedNodeHeight,
7976
fileSearchStatus,
@@ -82,8 +79,6 @@ const AssistantMessage = ({
8279
}: {
8380
content: string
8481
error?: string
85-
hasRagIndex: boolean
86-
hasAnnotations: boolean
8782
isLastAssistantNode: boolean
8883
expandedNodeHeight: number
8984
fileSearchStatus: boolean
@@ -138,7 +133,6 @@ const AssistantMessage = ({
138133
padding: '0 1.5rem',
139134
borderRadius: '5px',
140135
overflowX: 'auto',
141-
borderLeft: hasAnnotations ? '5px solid #3f51b5' : 'none',
142136
}}
143137
>
144138
<ReactMarkdown
@@ -229,28 +223,21 @@ const MessageItem = ({
229223
message,
230224
isLastAssistantNode,
231225
expandedNodeHeight,
232-
hasRagIndex,
233226
ragDisplay,
234227
toggleRagDisplay,
235228
}: {
236229
message: Message
237230
isLastAssistantNode: boolean
238231
expandedNodeHeight: number
239-
hasRagIndex: boolean
240232
ragDisplay: boolean
241233
toggleRagDisplay: () => void
242234
}) => {
243-
const { courseId } = useParams()
244-
// @todo when has annotations?
245-
const hasAnnotations_Leikisti = false
246235

247236
if (message.role === 'assistant') {
248237
return (
249238
<AssistantMessage
250239
content={message.content}
251240
error={message.error}
252-
hasAnnotations={!!hasAnnotations_Leikisti}
253-
hasRagIndex={hasRagIndex}
254241
isLastAssistantNode={isLastAssistantNode}
255242
expandedNodeHeight={expandedNodeHeight}
256243
fileSearchStatus={message.fileSearchResult?.status == 'completed'}
@@ -279,7 +266,6 @@ export const Conversation = ({
279266
completion,
280267
isCompletionDone,
281268
fileSearchResult,
282-
hasRagIndex,
283269
ragDisplay,
284270
toggleRagDisplay,
285271
}: {
@@ -291,7 +277,6 @@ export const Conversation = ({
291277
completion: string
292278
isCompletionDone: boolean
293279
fileSearchResult?: FileSearchCompletedData
294-
hasRagIndex: boolean
295280
ragDisplay: boolean
296281
toggleRagDisplay: () => void
297282
}) => (
@@ -315,7 +300,6 @@ export const Conversation = ({
315300
message={message}
316301
isLastAssistantNode={isLastAssistantNode}
317302
expandedNodeHeight={expandedNodeHeight}
318-
hasRagIndex={hasRagIndex}
319303
ragDisplay={ragDisplay}
320304
toggleRagDisplay={toggleRagDisplay}
321305
/>
@@ -328,7 +312,6 @@ export const Conversation = ({
328312
message={{ role: 'assistant', content: completion, fileSearchResult }}
329313
isLastAssistantNode={true}
330314
expandedNodeHeight={expandedNodeHeight}
331-
hasRagIndex={hasRagIndex}
332315
ragDisplay={ragDisplay}
333316
toggleRagDisplay={toggleRagDisplay}
334317
/>

0 commit comments

Comments
 (0)