sync: UI animations, select styling, TLS verify flag via proxy second line, brand spacing

This commit is contained in:
2025-09-14 14:01:25 +03:00
parent 338e65624f
commit 563663f9f1
9 changed files with 255 additions and 48 deletions

30
agentui/common/cancel.py Normal file
View File

@@ -0,0 +1,30 @@
from __future__ import annotations
from typing import Dict
import threading
# Simple in-process cancel flags storage (per pipeline_id)
# Thread-safe for FastAPI workers in same process
_cancel_flags: Dict[str, bool] = {}
_lock = threading.Lock()
def request_cancel(pipeline_id: str) -> None:
"""Set cancel flag for given pipeline id."""
pid = str(pipeline_id or "pipeline_editor")
with _lock:
_cancel_flags[pid] = True
def clear_cancel(pipeline_id: str) -> None:
"""Clear cancel flag for given pipeline id."""
pid = str(pipeline_id or "pipeline_editor")
with _lock:
_cancel_flags.pop(pid, None)
def is_cancelled(pipeline_id: str) -> bool:
"""Check cancel flag for given pipeline id."""
pid = str(pipeline_id or "pipeline_editor")
with _lock:
return bool(_cancel_flags.get(pid, False))