Fix workflow key detection — use .key/.filename instead of .name

The ComfyUI activeWorkflow object doesn't have a .name property. It uses
.key (path minus workflows/ prefix) and .filename (no extension). The old
code always fell through to "default", making all snapshots share one key.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 19:39:08 +01:00
parent b90ebba068
commit 4eec4cf135

View File

@@ -199,7 +199,7 @@ function quickHash(str) {
function getWorkflowKey() {
try {
const wf = app.workflowManager?.activeWorkflow;
return wf?.name || wf?.path || "default";
return wf?.key || wf?.filename || wf?.path || "default";
} catch {
return "default";
}