mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-10 12:42:34 +00:00
Merge remote-tracking branch 'origin/new-page-framework' into dev_ty_06_end
This commit is contained in:
commit
2af2f07580
@ -4,10 +4,9 @@ import { useRouter } from 'next/navigation'
|
|||||||
import React, { useState, useEffect } from 'react'
|
import React, { useState, useEffect } from 'react'
|
||||||
import { InboxOutlined } from '@ant-design/icons'
|
import { InboxOutlined } from '@ant-design/icons'
|
||||||
import CheckCircleOutlinedIcon from '@mui/icons-material/CheckCircleOutlined'
|
import CheckCircleOutlinedIcon from '@mui/icons-material/CheckCircleOutlined'
|
||||||
import AddBoxOutlinedIcon from '@mui/icons-material/AddBoxOutlined';
|
|
||||||
import ContentPasteSearchOutlinedIcon from '@mui/icons-material/ContentPasteSearchOutlined';
|
import ContentPasteSearchOutlinedIcon from '@mui/icons-material/ContentPasteSearchOutlined';
|
||||||
import type { UploadProps } from 'antd'
|
import type { UploadProps } from 'antd'
|
||||||
import { message, Upload, Popover } from 'antd'
|
import { message, Upload } from 'antd'
|
||||||
import {
|
import {
|
||||||
useColorScheme,
|
useColorScheme,
|
||||||
Modal,
|
Modal,
|
||||||
@ -114,8 +113,8 @@ const Index = () => {
|
|||||||
sx={{
|
sx={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
backgroundColor: mode === 'light' ? 'rgb(238, 240, 245)' : 'rgb(33, 33, 33)'
|
|
||||||
}}
|
}}
|
||||||
|
className='bg-[#F1F2F5] dark:bg-[#212121]'
|
||||||
>
|
>
|
||||||
<Box className="page-body p-4" sx={{
|
<Box className="page-body p-4" sx={{
|
||||||
'&': {
|
'&': {
|
||||||
@ -140,6 +139,8 @@ const Index = () => {
|
|||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
display: 'flex',
|
||||||
|
alignContent: 'start',
|
||||||
boxSizing: "content-box",
|
boxSizing: "content-box",
|
||||||
width: '390px',
|
width: '390px',
|
||||||
height: '79px',
|
height: '79px',
|
||||||
@ -149,16 +150,35 @@ const Index = () => {
|
|||||||
fontSize: '18px',
|
fontSize: '18px',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
color: 'black',
|
color: 'black',
|
||||||
backgroundColor: mode === 'light' ? 'rgb(224, 228, 237)' : 'rgb(72, 72, 72)',
|
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
flexGrow: 0,
|
flexGrow: 0,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
|
borderRadius: '16px',
|
||||||
'&: hover': {
|
'&: hover': {
|
||||||
boxShadow: '0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);'
|
boxShadow: '0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);'
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onClick={() => setIsAddKnowledgeSpaceModalShow(true)}
|
onClick={() => setIsAddKnowledgeSpaceModalShow(true)}
|
||||||
><AddBoxOutlinedIcon sx={{ marginRight: '10px', fontSize: '30px' }} />Space</Box>
|
className='bg-[#E9EBEE] dark:bg-[#484848]'
|
||||||
|
>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: '32px',
|
||||||
|
height: '32px',
|
||||||
|
lineHeight: '28px',
|
||||||
|
border: '1px solid gray',
|
||||||
|
textAlign: 'center',
|
||||||
|
borderRadius: '5px',
|
||||||
|
marginRight: '5px',
|
||||||
|
fontWeight: '300'
|
||||||
|
}}
|
||||||
|
>+</Box>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
fontSize: '16px',
|
||||||
|
}}
|
||||||
|
>space</Box>
|
||||||
|
</Box>
|
||||||
{knowledgeSpaceList.map((item: any, index: number) => (
|
{knowledgeSpaceList.map((item: any, index: number) => (
|
||||||
<Box
|
<Box
|
||||||
key={index}
|
key={index}
|
||||||
@ -166,11 +186,11 @@ const Index = () => {
|
|||||||
padding: '30px 20px 40px',
|
padding: '30px 20px 40px',
|
||||||
marginRight: '30px',
|
marginRight: '30px',
|
||||||
marginBottom: '30px',
|
marginBottom: '30px',
|
||||||
backgroundColor: mode === 'light' ? 'rgb(255, 255, 255)' : 'rgb(72, 72, 72)',
|
borderTop: '4px solid rgb(84, 164, 248)',
|
||||||
borderTop: '3px solid rgb(82, 196, 26)',
|
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
flexGrow: 0,
|
flexGrow: 0,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
|
borderRadius: '10px',
|
||||||
'&: hover': {
|
'&: hover': {
|
||||||
boxShadow: '0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);'
|
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={() => {
|
onClick={() => {
|
||||||
router.push(`/datastores/documents?name=${item.name}`);
|
router.push(`/datastores/documents?name=${item.name}`);
|
||||||
}}
|
}}
|
||||||
|
className='bg-[#FFFFFF] dark:bg-[#484848]'
|
||||||
>
|
>
|
||||||
<Box sx={{
|
<Box sx={{
|
||||||
fontSize: '18px',
|
fontSize: '18px',
|
||||||
marginBottom: '10px',
|
marginBottom: '10px',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
color: 'black'
|
color: 'black'
|
||||||
}}><ContentPasteSearchOutlinedIcon sx={{ marginRight: '5px' }}/>{item.name}</Box>
|
}}><ContentPasteSearchOutlinedIcon sx={{ marginRight: '5px', color: '#2AA3FF' }}/>{item.name}</Box>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -200,7 +221,7 @@ const Index = () => {
|
|||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
color: 'black'
|
color: '#2AA3FF'
|
||||||
}}
|
}}
|
||||||
>{item.vector_type}</Box>
|
>{item.vector_type}</Box>
|
||||||
<Box sx={{ fontSize: '12px', color: 'black' }}>Vector</Box>
|
<Box sx={{ fontSize: '12px', color: 'black' }}>Vector</Box>
|
||||||
@ -214,7 +235,7 @@ const Index = () => {
|
|||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
color: 'black'
|
color: '#2AA3FF'
|
||||||
}}
|
}}
|
||||||
>{item.owner}</Box>
|
>{item.owner}</Box>
|
||||||
<Box sx={{ fontSize: '12px', color: 'black' }}>Owner</Box>
|
<Box sx={{ fontSize: '12px', color: 'black' }}>Owner</Box>
|
||||||
@ -228,7 +249,7 @@ const Index = () => {
|
|||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
color: 'black'
|
color: '#2AA3FF'
|
||||||
}}
|
}}
|
||||||
>{item.docs || 0}</Box>
|
>{item.docs || 0}</Box>
|
||||||
<Box sx={{ fontSize: '12px', color: 'black' }}>Docs</Box>
|
<Box sx={{ fontSize: '12px', color: 'black' }}>Docs</Box>
|
||||||
|
@ -49,7 +49,7 @@ import { useDialogueContext } from '@/app/context/dialogue';
|
|||||||
const ctrl = new AbortController();
|
const ctrl = new AbortController();
|
||||||
let buffer = '';
|
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',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
Loading…
Reference in New Issue
Block a user