Feat: Delete and rename files in the knowledge base #3221 (#7268)

### What problem does this PR solve?

Feat: Delete and rename files in the knowledge base #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-04-24 14:51:20 +08:00
committed by GitHub
parent ff442c48b5
commit 9a8dda8fc7
9 changed files with 259 additions and 75 deletions

View File

@ -16,7 +16,7 @@ export function RenameDialog({
initialName,
onOk,
loading,
}: IModalProps<any> & { initialName: string }) {
}: IModalProps<any> & { initialName?: string }) {
const { t } = useTranslation();
return (

View File

@ -22,7 +22,7 @@ export function RenameForm({
initialName,
hideModal,
onOk,
}: IModalProps<any> & { initialName: string }) {
}: IModalProps<any> & { initialName?: string }) {
const { t } = useTranslation();
const FormSchema = z.object({
name: z
@ -46,7 +46,9 @@ export function RenameForm({
}
useEffect(() => {
form.setValue('name', initialName);
if (initialName) {
form.setValue('name', initialName);
}
}, [form, initialName]);
return (