Feat: Fixed the issue where the dataset configuration page kept refreshing #3221 (#7666)

### What problem does this PR solve?

Feat: Fixed the issue where the dataset configuration page kept
refreshing #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-05-16 09:53:47 +08:00
committed by GitHub
parent d373c46976
commit 0e9ff8c1f7
24 changed files with 263 additions and 175 deletions

View File

@ -46,6 +46,7 @@ export const showGraphRagItems = (parserId: DocumentParserType | undefined) => {
type GraphRagItemsProps = {
marginBottom?: boolean;
className?: string;
};
export function UseGraphRagFormField() {
@ -75,7 +76,10 @@ export function UseGraphRagFormField() {
}
// The three types "table", "resume" and "one" do not display this configuration.
const GraphRagItems = ({ marginBottom = false }: GraphRagItemsProps) => {
const GraphRagItems = ({
marginBottom = false,
className = 'p-10',
}: GraphRagItemsProps) => {
const { t } = useTranslate('knowledgeConfiguration');
const form = useFormContext();
@ -99,7 +103,7 @@ const GraphRagItems = ({ marginBottom = false }: GraphRagItemsProps) => {
);
return (
<FormContainer className={cn({ 'mb-4': marginBottom })}>
<FormContainer className={cn({ 'mb-4': marginBottom }, className)}>
<UseGraphRagFormField></UseGraphRagFormField>
{useRaptor && (
<>