Skip to content

Commit

Permalink
build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KastanDay committed May 17, 2024
1 parent b203591 commit 6c1463c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
22 changes: 11 additions & 11 deletions src/components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export const Chat = memo(({ stopConversationRef, courseMetadata }: Props) => {
errorToast({
title: 'Error loading tools',
message:
toolLoadingError.message +
(toolLoadingError as Error).message +
'.\nPlease refresh the page or try again later. Regular chat features may still work.',
})
}
Expand Down Expand Up @@ -351,7 +351,7 @@ export const Chat = memo(({ stopConversationRef, courseMetadata }: Props) => {
for (const url of pestDetectionResponse) {
const presignedUrl = await fetchPresignedUrl(url)
if (presignedUrl) {
;(message.content as Content[]).push({
; (message.content as Content[]).push({
type: 'tool_image_url',
image_url: {
url: presignedUrl,
Expand Down Expand Up @@ -486,12 +486,12 @@ export const Chat = memo(({ stopConversationRef, courseMetadata }: Props) => {
)

if (imgDescIndex !== -1) {
;(message.content as Content[])[imgDescIndex] = {
; (message.content as Content[])[imgDescIndex] = {
type: 'text',
text: `Image description: ${imgDesc}`,
}
} else {
;(message.content as Content[]).push({
; (message.content as Content[]).push({
type: 'text',
text: `Image description: ${imgDesc}`,
})
Expand Down Expand Up @@ -930,7 +930,7 @@ export const Chat = memo(({ stopConversationRef, courseMetadata }: Props) => {

if (imgDescIndex !== -1) {
// Remove the existing image description
;(currentMessage.content as Content[]).splice(imgDescIndex, 1)
; (currentMessage.content as Content[]).splice(imgDescIndex, 1)
}

handleSend(currentMessage, 2, null, tools, enabledDocumentGroups)
Expand Down Expand Up @@ -1023,14 +1023,14 @@ export const Chat = memo(({ stopConversationRef, courseMetadata }: Props) => {

const statements =
courseMetadata?.example_questions &&
courseMetadata.example_questions.length > 0
courseMetadata.example_questions.length > 0
? courseMetadata.example_questions
: [
'Make a bullet point list of key takeaways of the course.',
'What is [your favorite topic] and why is it worth learning about?',
'How can I effectively prepare for the upcoming exam?',
'How many assignments in the course?',
]
'Make a bullet point list of key takeaways of the course.',
'What is [your favorite topic] and why is it worth learning about?',
'How can I effectively prepare for the upcoming exam?',
'How many assignments in the course?',
]

// Add this function to create dividers with statements
const renderIntroductoryStatements = () => {
Expand Down
12 changes: 6 additions & 6 deletions src/components/UIUC-Components/N8nWorkflowsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const N8nWorkflowsTable = ({
),
message: (
<Text className={`${montserrat_med.className} text-neutral-200`}>
{error.message}
{(error as Error).message}
</Text>
),
color: 'red',
Expand Down Expand Up @@ -285,11 +285,11 @@ export const N8nWorkflowsTable = ({
loadingText="Loading..."
// 👇 uncomment the next line to display a custom text when no records were found
noRecordsText="No records found"
// 👇 uncomment the next line to use a custom pagination text
// paginationText={({ from, to, totalRecords }) => `Records ${from} - ${to} of ${totalRecords}`}
// 👇 uncomment the next lines to use custom pagination colors
// paginationActiveBackgroundColor="green"
// paginationActiveTextColor="#e6e348"
// 👇 uncomment the next line to use a custom pagination text
// paginationText={({ from, to, totalRecords }) => `Records ${from} - ${to} of ${totalRecords}`}
// 👇 uncomment the next lines to use custom pagination colors
// paginationActiveBackgroundColor="green"
// paginationActiveTextColor="#e6e348"
/>
</>
)
Expand Down

0 comments on commit 6c1463c

Please sign in to comment.