diff --git a/service/file_sync_service.py b/service/file_sync_service.py index 493b7bc..805b763 100644 --- a/service/file_sync_service.py +++ b/service/file_sync_service.py @@ -174,9 +174,10 @@ def dedupe_workflow_ids(): file_path = os.path.join(root, file) check_and_update_workflow_id(file_path, seen_ids) - -dedupe_workflow_ids() - +@server.PromptServer.instance.routes.get('/workspace/deduplicate_workflow_ids') +async def deduplicate_workflow_ids(request): + dedupe_workflow_ids() + return web.json_response(text="success", content_type='application/json') @server.PromptServer.instance.routes.post('/workspace/get_workflow_file') async def get_workflow_file(request): diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 64c6bb8..40ce2c6 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -183,6 +183,7 @@ export default function App() { if (latestWfID) { loadWorkflowIDImpl(latestWfID); } + fetch("/workspace/deduplicate_workflow_ids"); // await validateOrSaveAllJsonFileMyWorkflows(); const twoway = await userSettingsTable?.getSetting("twoWaySync"); !twoway && diff --git a/ui/src/RecentFilesDrawer/MoreActionMenu.tsx b/ui/src/RecentFilesDrawer/MoreActionMenu.tsx index ab84a88..d8c8e01 100644 --- a/ui/src/RecentFilesDrawer/MoreActionMenu.tsx +++ b/ui/src/RecentFilesDrawer/MoreActionMenu.tsx @@ -89,7 +89,7 @@ export default function MoreActionMenu({ workflow }: Props) { > Duplicate - + {/* */}