Improve accumulator preview interactions
This commit is contained in:
+7
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user