>(({ className, sideOffset = 4, ...props }, ref) => (
-
+
+
+
));
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
@@ -35,11 +37,12 @@ export const FormTooltip = ({ tooltip }: { tooltip: React.ReactNode }) => {
{
e.preventDefault(); // Prevent clicking the tooltip from triggering form save
}}
>
-
+
{tooltip}
diff --git a/web/src/less/mixins.less b/web/src/less/mixins.less
index e6c99f601a..c77eac838c 100644
--- a/web/src/less/mixins.less
+++ b/web/src/less/mixins.less
@@ -17,8 +17,8 @@
caption {
color: @blurBackground;
font-size: 14px;
- height: 20px;
- line-height: 20px;
+ // height: 20px;
+ line-height: 1.25;
font-weight: 600;
margin-bottom: 6px;
}
diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts
index debbcf593c..99c7955a91 100644
--- a/web/src/locales/en.ts
+++ b/web/src/locales/en.ts
@@ -584,8 +584,9 @@ Example: A 1 KB message with 1024-dim embedding uses ~9 KB. The 5 MB default lim
naive: `Supported file formats are MD, MDX, DOCX, XLSX, XLS (Excel 97-2003), PPTX, PDF, TXT, JPEG, JPG, PNG, TIF, GIF, CSV, JSON, EML, HTML.
This method chunks files using a 'naive' method:
+
- Use vision detection model to split the texts into smaller segments.
- - Then, combine adjacent segments until the token count exceeds the threshold specified by 'Chunk token number for text', at which point a chunk is created.
`,
+ - Then, combine adjacent segments until the token count exceeds the threshold specified by 'Chunk token number for text', at which point a chunk is created.
`,
paper: `Only PDF file is supported.
Papers will be split by section, such as abstract, 1.1, 1.2.
This approach enables the LLM to summarize the paper more effectively and to provide more comprehensive, understandable responses.
@@ -597,6 +598,7 @@ Example: A 1 KB message with 1024-dim embedding uses ~9 KB. The 5 MB default lim
This chunking method supports XLSX and CSV/TXT file formats.
+
-
If a file is in XLSX or XLS (Excel 97-2003) format, it should contain two columns without headers: one for questions and the other for answers, with the question column preceding the answer column. Multiple sheets are
acceptable, provided the columns are properly structured.
@@ -604,6 +606,7 @@ Example: A 1 KB message with 1024-dim embedding uses ~9 KB. The 5 MB default lim
-
If a file is in CSV/TXT format, it must be UTF-8 encoded with TAB as the delimiter to separate questions and answers.
+
Lines of texts that fail to follow the above rules will be ignored, and
@@ -726,6 +729,8 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-s
table: 'Table',
text: 'Text',
},
+ size: 'Size',
+ uploadedTime: 'Uploaded time',
chunk: 'Chunk',
bulk: 'Bulk',
selectAll: 'Select all',
diff --git a/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-card/index.tsx b/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-card/index.tsx
index 32f7dd2ed1..4372c42154 100644
--- a/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-card/index.tsx
+++ b/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-card/index.tsx
@@ -73,10 +73,11 @@ const ChunkCard = ({
return (
-
+
+
{/* Using
instead of to avoid flickering when hovering over the image */}
{item.image_id && (
@@ -98,41 +103,44 @@ const ChunkCard = ({
+
)}
+ className={classNames(
+ // Keep whitespaces?
+ 'text-wrap break-words whitespace-pre',
+ textMode === ChunkTextMode.Ellipse && 'line-clamp-3',
+ )}
+ />
-
+
void;
removeChunk: (e?: any) => void;
switchChunk: (available: number) => void;
@@ -13,6 +20,7 @@ type ICheckboxSetProps = {
};
export default (props: ICheckboxSetProps) => {
const {
+ className,
selectAllChunk,
removeChunk,
switchChunk,
@@ -45,39 +53,28 @@ export default (props: ICheckboxSetProps) => {
}, [selectedChunkIds]);
return (
-
-
-
-
-
+
+
+
{isSelected && (
<>
-
-
- {t('chunk.enable')}
-
-
-
+
+
+
-
-
- {t('chunk.delete')}
-
+
+
+
>
)}
diff --git a/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-result-bar/index.tsx b/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-result-bar/index.tsx
index e5221a15c9..e05c4c121a 100644
--- a/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-result-bar/index.tsx
+++ b/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/components/chunk-result-bar/index.tsx
@@ -8,7 +8,8 @@ import {
import { Radio } from '@/components/ui/radio';
import { Segmented } from '@/components/ui/segmented';
import { useTranslate } from '@/hooks/common-hooks';
-import { ListFilter, Plus } from 'lucide-react';
+import { cn } from '@/lib/utils';
+import { LucideFilter, Plus } from 'lucide-react';
import { useState } from 'react';
import { ChunkTextMode } from '../../constant';
interface ChunkResultBarProps {
@@ -21,6 +22,7 @@ interface ChunkResultBarProps {
searchString: string;
}
export default function ChunkResultBar({
+ className,
changeChunkTextMode,
available,
selectAllChunk,
@@ -59,42 +61,46 @@ export default function ChunkResultBar({
changeChunkTextMode(value);
};
return (
-
+
-
-
-
}
- onChange={handleInputChange}
- value={searchString}
- />
-
-
-
-
-
- {filterContent}
-
-
-
-
+
+
+
+
+
+
+ {filterContent}
+
+
+
+
+
+
{/*
*/}
diff --git a/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/index.tsx b/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/index.tsx
index 5c3a840404..3e53d6171e 100644
--- a/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/index.tsx
+++ b/web/src/pages/chunk/parsed-result/add-knowledge/components/knowledge-chunk/index.tsx
@@ -24,6 +24,7 @@ import DocumentHeader from '@/components/document-preview/document-header';
import { useGetDocumentUrl } from '@/components/document-preview/hooks';
import { PageHeader } from '@/components/page-header';
import { Button } from '@/components/ui/button';
+import { Card, CardContent } from '@/components/ui/card';
import message from '@/components/ui/message';
import {
RAGFlowPagination,
@@ -174,7 +175,7 @@ const Chunk = () => {
}, [documentInfo]);
return (
- <>
+
-
-
-
+
+
+
-
-
-
-
{t('chunk.chunkResult')}
-
- {t('chunk.chunkResultTip')}
-
-
+