feat: Added UI functions related to data-flow knowledge base #3221 (#10038)

### What problem does this PR solve?

feat: Added UI functions related to data-flow knowledge base #3221

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
chanx
2025-09-11 09:51:18 +08:00
committed by GitHub
parent df8d31451b
commit 8a09f07186
64 changed files with 5079 additions and 81 deletions

View File

@ -0,0 +1,29 @@
import SvgIcon from '@/components/svg-icon';
import { Button } from '@/components/ui/button';
import { CircleAlert } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { useRerunDataflow } from '../../hooks';
interface RerunButtonProps {
className?: string;
}
const RerunButton = (props: RerunButtonProps) => {
const { t } = useTranslation();
const { loading } = useRerunDataflow();
const clickFunc = () => {
console.log('click rerun button');
};
return (
<div className="flex flex-col gap-2">
<div className="text-xs text-text-primary flex items-center gap-1">
<CircleAlert color="#d29e2d" strokeWidth={1} size={12} />
{t('dataflowParser.rerunFromCurrentStepTip')}
</div>
<Button onClick={clickFunc} disabled={loading}>
<SvgIcon name="rerun" width={16} />
{t('dataflowParser.rerunFromCurrentStep')}
</Button>
</div>
);
};
export default RerunButton;