close_workspace_tab
Close unnecessary ComfyUI workflow tabs to free up the interface, with safeguards against losing unsaved work and preventing the last tab from closing.
Instructions
Close one of the workflow tabs open in the ComfyUI window.
The counterpart to switch_workspace_tab, and the way to tidy up after a run of loads - each one opens its own tab, and they stay until something closes them.
Nothing here is written to disk and nothing can be undone. A closed
workflow is out of the tab bar; if it had unsaved changes, they are gone. So
a tab with unsaved changes is refused unless force says otherwise, and only
ComfyUI's own Save in the browser clears that flag - save_workspace writes a
copy to disk and leaves the workflow just as modified.
Closing the tab on screen moves to a neighbour first, so the canvas never ends up showing a workflow that is no longer open. The last remaining tab is refused: closing it would leave the window with nothing.
Args: tab: which one - an index from switch_workspace_tab, its path, or its filename. Empty closes the tab currently on screen. A name matching two open tabs is refused rather than guessed. force: close even when the tab has unsaved changes, losing them. client_id: which browser tab to ask; defaults to the most recently focused.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | ||
| force | No | ||
| client_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||