Improve accumulator preview interactions

This commit is contained in:
2026-06-25 10:01:09 +02:00
parent 1a3068fc77
commit 1340c32732
3 changed files with 331 additions and 45 deletions
+7 -1
View File
@@ -508,7 +508,10 @@ if PromptServer is not None and web is not None:
async def sxcp_accumulator_list(request):
try:
payload = await request.json()
result = accumulator_list_entries(str(payload.get("store_key") or ""))
result = accumulator_list_entries(
str(payload.get("store_key") or ""),
preview_limit=int(payload.get("preview_limit") or 0),
)
return web.json_response(result)
except Exception as exc:
return web.json_response({"error": str(exc)}, status=400)
@@ -522,6 +525,7 @@ if PromptServer is not None and web is not None:
entry_id=str(payload.get("entry_id") or ""),
index=int(payload.get("index") or 0),
clear=bool(payload.get("clear")),
preview_limit=int(payload.get("preview_limit") or 0),
)
return web.json_response(result)
except Exception as exc:
@@ -536,6 +540,8 @@ if PromptServer is not None and web is not None:
entry_id=str(payload.get("entry_id") or ""),
index=int(payload.get("index") or 0),
direction=str(payload.get("direction") or "up"),
target_index=int(payload.get("target_index") or 0),
preview_limit=int(payload.get("preview_limit") or 0),
)
return web.json_response(result)
except Exception as exc: