enhance: add a command to gc current graph

This commit is contained in:
Tienson Qin
2025-05-29 21:43:10 +08:00
parent 4d540f57c4
commit 08bbe5c82d
4 changed files with 46 additions and 20 deletions

View File

@@ -599,6 +599,10 @@
:db-graph? true
:fn #(repo-handler/fix-broken-graph! (state/get-current-repo))}
:dev/gc-graph {:binding []
:db-graph? true
:fn #(repo-handler/gc-graph! (state/get-current-repo))}
:dev/replace-graph-with-db-file {:binding []
:inactive (or (not (util/electron?)) (not (state/developer-mode?)))
:fn :frontend.handler.common.developer/replace-graph-with-db-file}
@@ -876,6 +880,7 @@
:dev/replace-graph-with-db-file
:dev/validate-db
:dev/fix-broken-graph
:dev/gc-graph
:dev/rtc-stop
:dev/rtc-start
:ui/customize-appearance])
@@ -1072,6 +1077,7 @@
:dev/replace-graph-with-db-file
:dev/validate-db
:dev/fix-broken-graph
:dev/gc-graph
:dev/rtc-stop
:dev/rtc-start
:ui/clear-all-notifications]