This commit is contained in:
Archer
2023-12-18 16:24:50 +08:00
committed by GitHub
parent d33c99f564
commit 703583fff7
130 changed files with 3418 additions and 2579 deletions

View File

@@ -311,7 +311,7 @@ const CollectionCard = () => {
target="_blank"
mr={2}
textDecoration={'underline'}
color={'myBlue.700'}
color={'blue.600'}
>
{datasetDetail.websiteConfig.url}
</Link>
@@ -371,7 +371,7 @@ const CollectionCard = () => {
Button={
<MenuButton
_hover={{
color: 'myBlue.600'
color: 'blue.500'
}}
fontSize={['sm', 'md']}
>
@@ -381,7 +381,7 @@ const CollectionCard = () => {
py={2}
borderRadius={'md'}
cursor={'pointer'}
bg={'myBlue.600'}
bg={'blue.500'}
overflow={'hidden'}
color={'white'}
h={['28px', '35px']}
@@ -489,7 +489,7 @@ const CollectionCard = () => {
data-drag-id={
collection.type === DatasetCollectionTypeEnum.folder ? collection._id : undefined
}
bg={dragTargetId === collection._id ? 'myBlue.200' : ''}
bg={dragTargetId === collection._id ? 'blue.100' : ''}
userSelect={'none'}
onDragStart={(e) => {
setDragStartId(collection._id);
@@ -579,7 +579,7 @@ const CollectionCard = () => {
h={'22px'}
borderRadius={'md'}
_hover={{
color: 'myBlue.600',
color: 'blue.500',
'& .icon': {
bg: 'myGray.100'
}

View File

@@ -163,7 +163,7 @@ const DataCard = () => {
<Flex alignItems={'center'}>
<IconButton
mr={3}
icon={<MyIcon name={'backFill'} w={['14px', '18px']} color={'myBlue.600'} />}
icon={<MyIcon name={'backFill'} w={['14px', '18px']} color={'blue.500'} />}
bg={'white'}
boxShadow={'1px 1px 9px rgba(0,0,0,0.15)'}
size={'sm'}

View File

@@ -182,7 +182,7 @@ const FileSelect = ({
if (text) {
text = simpleText(text);
const splitRes = splitText2Chunks({
const { chunks, tokens } = splitText2Chunks({
text,
chunkLen,
overlapRatio
@@ -193,10 +193,10 @@ const FileSelect = ({
filename: file.name,
icon,
rawText: text,
tokens: splitRes.tokens,
tokens,
type: DatasetCollectionTypeEnum.file,
fileId,
chunks: splitRes.chunks.map((chunk) => ({
chunks: chunks.map((chunk) => ({
q: chunk,
a: ''
}))
@@ -219,7 +219,7 @@ const FileSelect = ({
const onUrlFetch = useCallback(
(e: UrlFetchResponse) => {
const result: FileItemType[] = e.map<FileItemType>(({ url, content }) => {
const splitRes = splitText2Chunks({
const { chunks, tokens } = splitText2Chunks({
text: content,
chunkLen,
overlapRatio
@@ -229,10 +229,10 @@ const FileSelect = ({
filename: url,
icon: '/imgs/files/link.svg',
rawText: content,
tokens: splitRes.tokens,
tokens,
type: DatasetCollectionTypeEnum.link,
rawLink: url,
chunks: splitRes.chunks.map((chunk) => ({
chunks: chunks.map((chunk) => ({
q: chunk,
a: ''
}))
@@ -259,7 +259,7 @@ const FileSelect = ({
metadata: { datasetId: datasetDetail._id }
});
const splitRes = splitText2Chunks({
const { chunks, tokens } = splitText2Chunks({
text: content,
chunkLen,
overlapRatio
@@ -271,10 +271,10 @@ const FileSelect = ({
filename,
icon: '/imgs/files/txt.svg',
rawText: content,
tokens: splitRes.tokens,
tokens,
type: DatasetCollectionTypeEnum.file,
fileId: fileIds[0],
chunks: splitRes.chunks.map((chunk) => ({
chunks: chunks.map((chunk) => ({
q: chunk,
a: ''
}))
@@ -352,7 +352,7 @@ const FileSelect = ({
ml: 1,
as: 'span',
cursor: 'pointer',
color: 'myBlue.700',
color: 'blue.600',
_hover: {
textDecoration: 'underline'
}
@@ -417,7 +417,7 @@ const FileSelect = ({
mt={1}
cursor={'pointer'}
textDecoration={'underline'}
color={'myBlue.600'}
color={'blue.500'}
fontSize={'12px'}
onClick={() =>
fileDownload({

View File

@@ -195,7 +195,7 @@ const Provider = ({
setFiles((state) =>
state.map((file) => {
const splitRes = splitText2Chunks({
const { chunks, tokens } = splitText2Chunks({
text: file.rawText,
chunkLen,
overlapRatio: chunkOverlapRatio
@@ -203,8 +203,8 @@ const Provider = ({
return {
...file,
tokens: splitRes.tokens,
chunks: splitRes.chunks.map((chunk) => ({
tokens,
chunks: chunks.map((chunk) => ({
q: chunk,
a: ''
}))
@@ -475,7 +475,7 @@ export const SelectorContainer = ({
position={'relative'}
alignItems={'center'}
_hover={{
bg: 'myBlue.100',
bg: 'blue.50',
'& .delete': {
display: 'block'
}

View File

@@ -313,7 +313,7 @@ const InputDataModal = ({
borderColor={'transparent'}
px={0}
_focus={{
borderColor: 'myBlue.400',
borderColor: 'blue.400',
px: 3
}}
placeholder={t('dataset.data.Index Placeholder')}
@@ -332,7 +332,7 @@ const InputDataModal = ({
border={theme.borders.base}
cursor={'pointer'}
_hover={{
bg: 'myBlue.100'
bg: 'blue.50'
}}
minH={'100px'}
onClick={() =>

View File

@@ -102,10 +102,10 @@ const Test = ({ datasetId }: { datasetId: string }) => {
py={4}
borderRight={['none', theme.borders.base]}
>
<Box border={'2px solid'} borderColor={'myBlue.600'} p={3} mx={4} borderRadius={'md'}>
<Box border={'2px solid'} borderColor={'blue.500'} p={3} mx={4} borderRadius={'md'}>
<Flex alignItems={'center'}>
<Box fontSize={'sm'} fontWeight={'bold'} flex={1}>
<MyIcon mr={2} name={'text'} w={'18px'} h={'18px'} color={'myBlue.700'} />
<MyIcon mr={2} name={'text'} w={'18px'} h={'18px'} color={'blue.600'} />
{t('core.dataset.test.Test Text')}
</Box>
<Button