Fix: Restore the sidebar description of DP slicing method #9869 (#10633)

### What problem does this PR solve?

Fix: Restore the sidebar description of DP slicing method #9869

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-10-17 15:39:45 +08:00
committed by GitHub
parent 617faee718
commit f50b2461cb
11 changed files with 677 additions and 8 deletions

View File

@ -0,0 +1,39 @@
import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';
import { t } from 'i18next';
import { X } from 'lucide-react';
import { useState } from 'react';
import CategoryPanel from './category-panel';
export default ({ parserId }: { parserId: string }) => {
const [visible, setVisible] = useState(false);
return (
<div className={cn('hidden flex-1', 'flex flex-col')}>
<div>
<Button
variant="outline"
onClick={() => {
setVisible(!visible);
}}
>
{t('knowledgeDetails.learnMore')}
</Button>
</div>
<div
className="bg-[#FFF]/10 p-[20px] rounded-[12px] mt-[10px] relative flex-1 overflow-auto"
style={{ display: visible ? 'block' : 'none' }}
>
<CategoryPanel chunkMethod={parserId}></CategoryPanel>
<div
className="absolute right-1 top-1 cursor-pointer hover:text-[#FFF]/30"
onClick={() => {
setVisible(false);
}}
>
<X />
</div>
</div>
</div>
);
};