Add confirmation dialog before deleting source documents
Prevents accidental deletion of knowledge base source documents by prompting the user to confirm before proceeding. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ba9c0ebde3
commit
919e8185fa
1 changed files with 1 additions and 0 deletions
|
|
@ -184,6 +184,7 @@ export const KnowledgeBase: React.FC = () => {
|
|||
|
||||
const handleRemoveDoc = async (docId: string) => {
|
||||
if (!selectedKb) return;
|
||||
if (!confirm('Are you sure you want to delete this document? This action cannot be undone.')) return;
|
||||
try {
|
||||
await apiService.removeSourceDocument(selectedKb.id, docId);
|
||||
await loadKbDetail(selectedKb.id);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue