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:
michael 2026-02-12 16:28:25 -06:00
parent ba9c0ebde3
commit 919e8185fa

View file

@ -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);