diff --git a/src/components/actionbar/ComfyActionbar.vue b/src/components/actionbar/ComfyActionbar.vue
index 11435bd7ec2..baa8cf588e5 100644
--- a/src/components/actionbar/ComfyActionbar.vue
+++ b/src/components/actionbar/ComfyActionbar.vue
@@ -42,6 +42,17 @@
>
+
@@ -77,6 +88,7 @@ import { useSettingStore } from '@/platform/settings/settingStore'
import { useTelemetry } from '@/platform/telemetry'
import { useCommandStore } from '@/stores/commandStore'
import { useExecutionStore } from '@/stores/executionStore'
+import { useQueueStore } from '@/stores/queueStore'
import { cn } from '@/utils/tailwindUtil'
import ComfyRunButton from './ComfyRunButton'
@@ -92,11 +104,15 @@ const emit = defineEmits<{
const settingsStore = useSettingStore()
const commandStore = useCommandStore()
+const { hasPendingTasks } = storeToRefs(useQueueStore())
const { t } = useI18n()
const { isIdle: isExecutionIdle } = storeToRefs(useExecutionStore())
const position = computed(() => settingsStore.get('Comfy.UseNewMenu'))
const visible = computed(() => position.value !== 'Disabled')
+const showClearPendingTasksButton = computed(() =>
+ settingsStore.get('Comfy.Queue.ShowClearPendingTasksButton')
+)
const isQueuePanelV2Enabled = computed(() =>
settingsStore.get('Comfy.Queue.QPOV2')
)
@@ -321,6 +337,10 @@ const cancelCurrentJob = async () => {
await commandStore.execute('Comfy.Interrupt')
}
+const clearPendingTasksTooltipConfig = computed(() =>
+ buildTooltipConfig(t('menuLabels.Clear Pending Tasks'))
+)
+
const actionbarClass = computed(() =>
cn(
'w-[200px] border-dashed border-blue-500 opacity-80',
diff --git a/src/locales/en/settings.json b/src/locales/en/settings.json
index f6addeb5039..3b898234af9 100644
--- a/src/locales/en/settings.json
+++ b/src/locales/en/settings.json
@@ -346,6 +346,10 @@
"name": "Use the unified job queue in the Assets side panel",
"tooltip": "Replaces the floating job queue panel with an equivalent job queue embedded in the Assets side panel. You can disable this to return to the floating panel layout."
},
+ "Comfy_Queue_ShowClearPendingTasksButton": {
+ "name": "Show clear pending tasks button in action bar",
+ "tooltip": "Adds a clear pending tasks button to the action bar."
+ },
"Comfy_QueueButton_BatchCountLimit": {
"name": "Batch count limit",
"tooltip": "The maximum number of tasks added to the queue at one button click"
diff --git a/src/platform/settings/constants/coreSettings.ts b/src/platform/settings/constants/coreSettings.ts
index 05c27585856..fdf24cc7826 100644
--- a/src/platform/settings/constants/coreSettings.ts
+++ b/src/platform/settings/constants/coreSettings.ts
@@ -841,6 +841,14 @@ export const CORE_SETTINGS: SettingParams[] = [
defaultValue: false,
versionAdded: '1.37.0'
},
+ {
+ id: 'Comfy.Queue.ShowClearPendingTasksButton',
+ category: ['Comfy', 'Queue', 'ShowClearPendingTasksButton'],
+ defaultValue: false,
+ name: 'Show clear pending tasks button in action bar',
+ type: 'boolean',
+ tooltip: 'Adds a clear pending tasks button to the action bar.'
+ },
{
id: 'Comfy.Execution.PreviewMethod',
category: ['Comfy', 'Execution', 'PreviewMethod'],
diff --git a/src/schemas/apiSchema.ts b/src/schemas/apiSchema.ts
index 062ef416f2f..c2396845b8a 100644
--- a/src/schemas/apiSchema.ts
+++ b/src/schemas/apiSchema.ts
@@ -346,6 +346,7 @@ const zSettings = z.object({
'Comfy.QueueButton.BatchCountLimit': z.number(),
'Comfy.Queue.MaxHistoryItems': z.number(),
'Comfy.Queue.History.Expanded': z.boolean(),
+ 'Comfy.Queue.ShowClearPendingTasksButton': z.boolean(),
'Comfy.Keybinding.UnsetBindings': z.array(zKeybinding),
'Comfy.Keybinding.NewBindings': z.array(zKeybinding),
'Comfy.Extension.Disabled': z.array(z.string()),