diff --git a/datacenter/app/datastores/page.tsx b/datacenter/app/datastores/page.tsx index d6f2e5469..5c399f780 100644 --- a/datacenter/app/datastores/page.tsx +++ b/datacenter/app/datastores/page.tsx @@ -4,10 +4,9 @@ import { useRouter } from 'next/navigation' import React, { useState, useEffect } from 'react' import { InboxOutlined } from '@ant-design/icons' import CheckCircleOutlinedIcon from '@mui/icons-material/CheckCircleOutlined' -import AddBoxOutlinedIcon from '@mui/icons-material/AddBoxOutlined'; import ContentPasteSearchOutlinedIcon from '@mui/icons-material/ContentPasteSearchOutlined'; import type { UploadProps } from 'antd' -import { message, Upload, Popover } from 'antd' +import { message, Upload } from 'antd' import { useColorScheme, Modal, @@ -114,8 +113,8 @@ const Index = () => { sx={{ width: '100%', height: '100%', - backgroundColor: mode === 'light' ? 'rgb(238, 240, 245)' : 'rgb(33, 33, 33)' }} + className='bg-[#F1F2F5] dark:bg-[#212121]' > { > { fontSize: '18px', fontWeight: 'bold', color: 'black', - backgroundColor: mode === 'light' ? 'rgb(224, 228, 237)' : 'rgb(72, 72, 72)', flexShrink: 0, flexGrow: 0, cursor: 'pointer', + borderRadius: '16px', '&: hover': { boxShadow: '0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);' } }} onClick={() => setIsAddKnowledgeSpaceModalShow(true)} - >Space + className='bg-[#E9EBEE] dark:bg-[#484848]' + > + + + space + {knowledgeSpaceList.map((item: any, index: number) => ( { padding: '30px 20px 40px', marginRight: '30px', marginBottom: '30px', - backgroundColor: mode === 'light' ? 'rgb(255, 255, 255)' : 'rgb(72, 72, 72)', - borderTop: '3px solid rgb(82, 196, 26)', + borderTop: '4px solid rgb(84, 164, 248)', flexShrink: 0, flexGrow: 0, cursor: 'pointer', + borderRadius: '10px', '&: hover': { boxShadow: '0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);' } @@ -178,13 +198,14 @@ const Index = () => { onClick={() => { router.push(`/datastores/documents?name=${item.name}`); }} + className='bg-[#FFFFFF] dark:bg-[#484848]' > {item.name} + }}>{item.name} { > {item.vector_type} Vector @@ -214,7 +235,7 @@ const Index = () => { > {item.owner} Owner @@ -228,7 +249,7 @@ const Index = () => { > {item.docs || 0} Docs diff --git a/datacenter/hooks/useAgentChat.ts b/datacenter/hooks/useAgentChat.ts index d9c734e20..f14f72b05 100644 --- a/datacenter/hooks/useAgentChat.ts +++ b/datacenter/hooks/useAgentChat.ts @@ -49,7 +49,7 @@ import { useDialogueContext } from '@/app/context/dialogue'; const ctrl = new AbortController(); let buffer = ''; - await fetchEventSource(`${process.env.API_BASE_URL + "/api" + queryAgentURL}`, { + await fetchEventSource(`${process.env.API_BASE_URL ? process.env.API_BASE_URL : ''}${"/api" + queryAgentURL}`, { method: 'POST', headers: { 'Content-Type': 'application/json',