- 点选金框滑动 + 检视区 150ms 交叉淡变;↑↓/J/K 即时切换、空格播放、 Delete 删除、] 检视区、浮层让位;新记录入场/完成金光/失败抖动,减动效只余短淡变 - 单条删除 5 秒撤销(Toast 金色动作钮),窗口过后才提交 DELETE,离页 flush; 任务页同队列同步;工作流删除保留旧记录并标识「工作流已删除」 - 红/琥珀界线:失败红 + 中文结论展开;done 但文件取不到 → 琥珀「文件缺失」 + 用相同参数重做/移除记录 - 参数页提交自动切结果页;工作流选择器 ↑↓ 真高亮 + Enter 使用(ShellPop arrowRoving 开关) - 记录流 80 条分页(220 条专项:50 次轮询 490ms);任务页 §3.5 芯片+搜索+ 行内进度条+ghost 重试;i18n 七语种 +17 键 Co-authored-by: multica-agent <github@multica.ai>
50 lines
1.5 KiB
Python
50 lines
1.5 KiB
Python
"""Seed ~220 quick-finished jobs to check the feed at 200+ records (§五)."""
|
|
import json
|
|
import time
|
|
import urllib.request
|
|
|
|
BASE = "http://127.0.0.1:8247"
|
|
|
|
|
|
def call(method, path, payload=None):
|
|
data = json.dumps(payload).encode() if payload is not None else None
|
|
req = urllib.request.Request(
|
|
BASE + path, data=data, method=method, headers={"Content-Type": "application/json"}
|
|
)
|
|
with urllib.request.urlopen(req, timeout=10) as r:
|
|
body = r.read()
|
|
return json.loads(body) if body else {}
|
|
|
|
|
|
def main():
|
|
n0 = len(call("GET", "/api/playground/jobs"))
|
|
target = 230
|
|
prompts = [
|
|
"雨后霓虹街道", "水墨山水长卷", "复古胶片人像", "微缩城市模型",
|
|
"极光下的雪原", "蒸汽朋克飞行器", "油画风格的果园", "赛博废墟",
|
|
]
|
|
for i in range(target - n0):
|
|
call(
|
|
"POST",
|
|
"/api/playground/generate",
|
|
{
|
|
"workflow_id": 1,
|
|
"input_values": {1: {"text": f"{prompts[i % len(prompts)]} #{i}"}, 2: i},
|
|
"source": "studio-image",
|
|
},
|
|
)
|
|
time.sleep(0.15)
|
|
# wait for the queue to drain
|
|
for _ in range(600):
|
|
jobs = call("GET", "/api/playground/jobs")
|
|
active = [j for j in jobs if j["status"] in ("pending", "running")]
|
|
if not active:
|
|
print(f"done: {len(jobs)} jobs")
|
|
return
|
|
time.sleep(1)
|
|
print("timeout waiting for drain")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|