Commit 7ffbe59 1 parent 9655371 commit 7ffbe59 Copy full SHA for 7ffbe59
File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 28
28
"react" : " ^18.2.0" ,
29
29
"react-dom" : " ^18.2.0" ,
30
30
"react-icons" : " ^4.10.1" ,
31
- "react-router-dom" : " ^6.17.0"
31
+ "react-router-dom" : " ^6.17.0" ,
32
+ "reactjs-popup" : " ^2.0.6"
32
33
},
33
34
"devDependencies" : {
34
35
"@types/react" : " ^18.2.15" ,
Original file line number Diff line number Diff line change @@ -310,6 +310,10 @@ export default function DocumentsPage() {
310
310
. then ( updateEmbeddings ) ;
311
311
} ;
312
312
const clearDocuments = ( ) => {
313
+ const userConfirmed = window . confirm (
314
+ "Are you sure you want to clear all documents? This action cannot be undone." ,
315
+ ) ;
316
+ if ( ! userConfirmed ) return ; // Exit the function if the user cancels
313
317
notifications . clean ( ) ;
314
318
fetch ( `/api/admin/clear_documents` , {
315
319
method : "POST" ,
You can’t perform that action at this time.
0 commit comments