confirm_workspace
Ask a yes/no question on the ComfyUI canvas and wait for the user's decision before proceeding, preventing mistakes on slow or irreversible actions.
Instructions
Ask the person at the ComfyUI screen a yes/no question, and wait.
The same interruption as ask_workspace, for when the answer is a decision rather than a value - before something slow, or something with no undo.
Asked in the panel below the canvas by default, so the graph stays visible;
modal=True puts it in a dialog over it. In the panel all three answers always
have a button. In a dialog they do not:
confirmed has three values, and which are reachable depends on kind.
True is agreement and null is dismissal - they closed the box, which says only
that they did not engage with the question, and must not be read as either
answer. A plain false needs a deny button, and ComfyUI draws one for
dirtyClose and nothing else: every other kind offers Cancel and Confirm, so
Cancel answers null and false never arrives. Ask for dirtyClose when telling
"no" from "never mind" actually matters.
Args:
question: what to ask.
title: heading above it. Defaults to "Confirm".
hint: smaller helper text under the question.
deny_label: caption for the deny button. Only kind="dirtyClose" has one,
so this is refused with any other kind rather than silently ignored.
modal: ask in a dialog over the canvas instead of the panel below it.
kind and deny_label describe ComfyUI's dialog and apply only then;
the panel always offers Yes, No and Dismiss.
kind: which of ComfyUI's confirmation dialogs to use - "default",
"delete" and "overwrite" style the confirming button for a
destructive act, "dirtyClose" is the three-way one, "reinstall" is
ComfyUI's own. Only the wording and the buttons differ; nothing here
acts on the answer.
seconds: how long to wait, 1 to 600.
client_id: which tab to ask; defaults to the most recently focused one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | No | ||
| kind | No | default | |
| modal | No | ||
| title | No | ||
| seconds | No | ||
| question | Yes | ||
| client_id | No | ||
| deny_label | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||