MCPcopy Index your code
hub / github.com/11cafe/comfyui-workspace-manager

github.com/11cafe/comfyui-workspace-manager @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
679 symbols 1,666 edges 170 files 23 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

☕️ ComfyUI Workspace Manager - Comfyspace

This is a document specially prepared for developers, explaining some special development details.Installation

Clean up indexdb if it's in bad state

Make sure you have .json files under ComfyUI/comfyui-workspace-manager/db, so your indexdb data (version history, gallery image data) can be recovered after deleting

Screenshot 2024-03-12 at 12 35 24 PM

  1. F12 -> Application -> IndexedDB -> delete current indexdb

Screenshot 2024-03-12 at 12 30 48 PM

  1. If you want to recover your data like version history, gallery image data, F12 -> Application -> Local Storage -> delete WORKSPACE_INDEXDB_BACKFILL key in localstorage so your indexdb can be backedup (you don't have to do this if you only need workflows .json data)

Screenshot 2024-03-12 at 12 33 08 PM

Install custom git hooks

When running the project for the first time, it is recommended that you execute the following command to install our customized git hooks

cd ui
npm run setupGithooks

Current hooks include:

  1. When switching to a non-main/beta branch, additional .gitignore logic is automatically added to ignore the "/dist" folder.

How to use Hot Module Replacement

  1. npm run dev starts the project;
  2. If the dist directory currently exists, please delete the dist directory or keep the dist directory empty;
  3. Modify ComfyUI/web/index.html and add the following code. It should be noted that the port number in localhost:5173 needs to be consistent with the port number of the vite local service started by npm run dev.image

```javascript import RefreshRuntime from "http://localhost:5173/@react-refresh"; RefreshRuntime.injectIntoGlobalHook(window); window.$RefreshReg$ = () => {}; window.$RefreshSig$ = () => (type) => type; window.vite_plugin_react_preamble_installed = true;

const head = document.getElementsByTagName("head")[0]; const viteClientScript = document.createElement("script"); viteClientScript.src = "http://localhost:5173/@vite/client"; viteClientScript.type = "module"; head.appendChild(viteClientScript); const workspaceMainScript = document.createElement("script"); workspaceMainScript.src = "http://localhost:5173/src/main.tsx"; workspaceMainScript.type = "module"; head.appendChild(workspaceMainScript); ```

Extension points exported contracts — how you extend this code

ComfyExtension (Interface)
(no doc)
ui/src/types/comfy.d.ts
SortableItem (Interface)
(no doc)
ui/src/types/dbTypes.ts
Workflow (Interface)
(no doc)
ui/src/types/dbTypes.ts
TableBaseModel (Interface)
(no doc)
ui/src/types/dbTypes.ts
ModelManagerPosition (Interface)
(no doc)
ui/src/types/dbTypes.ts

Core symbols most depended-on inside this repo

get
called by 69
ui/src/db-tables/TableBase.ts
getSetting
called by 41
ui/src/db-tables/UserSettingsTable.ts
fetchApi
called by 31
ui/src/Api.ts
filter
called by 29
ui/src/db-tables/TableBase.ts
get_my_workflows_dir
called by 19
service/setting_service.py
upsert
called by 15
ui/src/db-tables/UserSettingsTable.ts
load
called by 14
ui/src/db-tables/tagsTable.ts
listAll
called by 13
ui/src/db-tables/TableBase.ts

Shape

Function 439
Method 89
Interface 74
Route 37
Class 34
Enum 6

Languages

TypeScript81%
Python19%

Modules by API surface

service/file_sync_service.py34 symbols
ui/src/types/litegraph.d.ts33 symbols
ui/src/db-tables/WorkflowsTable.ts26 symbols
ui/src/utils.tsx16 symbols
__init__.py16 symbols
ui/src/db-tables/TableBase.ts15 symbols
ui/src/Api.ts13 symbols
ui/src/model-manager/civitSearchTypes.ts12 symbols
ui/src/components/SpotlightSearch.tsx12 symbols
service/twoway_sync_folder_service.py12 symbols
service/model_manager/model_installer.py12 symbols
ui/src/App.tsx11 symbols

For agents

$ claude mcp add comfyui-workspace-manager \
  -- python -m otcore.mcp_server <graph>