sync: UI animations, select styling, TLS verify flag via proxy second line, brand spacing
This commit is contained in:
@@ -25,6 +25,7 @@ from agentui.pipeline.templating import (
|
||||
eval_condition_expr,
|
||||
)
|
||||
from agentui.pipeline.storage import load_var_store, save_var_store, clear_var_store
|
||||
from agentui.common.cancel import is_cancelled, clear_cancel
|
||||
|
||||
|
||||
# --- Templating helpers are imported from agentui.pipeline.templating ---
|
||||
@@ -186,6 +187,12 @@ class PipelineExecutor:
|
||||
except Exception:
|
||||
self._store = {}
|
||||
|
||||
# Перед стартом прогона сбрасываем возможный «старый» флаг отмены
|
||||
try:
|
||||
clear_cancel(self.pipeline_id)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
mode = (self.loop_mode or "dag").lower()
|
||||
if mode == "iterative":
|
||||
res = await self._run_iterative(context, trace)
|
||||
@@ -388,6 +395,36 @@ class PipelineExecutor:
|
||||
|
||||
wave_idx = 0
|
||||
while ready:
|
||||
# Ручная отмена исполнения (DAG)
|
||||
try:
|
||||
if is_cancelled(self.pipeline_id):
|
||||
if trace is not None:
|
||||
try:
|
||||
await trace({
|
||||
"event": "cancelled",
|
||||
"node_id": "",
|
||||
"node_type": "Pipeline",
|
||||
"wave": wave_idx,
|
||||
"ts": int(time.time() * 1000),
|
||||
})
|
||||
except Exception:
|
||||
pass
|
||||
# Снимок и финальный EXEC TRACE
|
||||
try:
|
||||
self._commit_snapshot(context, values, last_node_id or "")
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
summary = " -> ".join(self._exec_log) if getattr(self, "_exec_log", None) else ""
|
||||
if summary and isinstance(self._store.get("snapshot"), dict):
|
||||
self._store["snapshot"]["EXEC_TRACE"] = summary
|
||||
save_var_store(self.pipeline_id, self._store)
|
||||
except Exception:
|
||||
pass
|
||||
return last_result
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
wave_nodes = list(ready)
|
||||
ready = []
|
||||
wave_results: Dict[str, Dict[str, Any]] = {}
|
||||
@@ -745,6 +782,36 @@ class PipelineExecutor:
|
||||
|
||||
# Главный цикл
|
||||
while q:
|
||||
# Ручная отмена исполнения (iterative)
|
||||
try:
|
||||
if is_cancelled(self.pipeline_id):
|
||||
if trace is not None:
|
||||
try:
|
||||
await trace({
|
||||
"event": "cancelled",
|
||||
"node_id": "",
|
||||
"node_type": "Pipeline",
|
||||
"wave": step,
|
||||
"ts": int(time.time() * 1000),
|
||||
})
|
||||
except Exception:
|
||||
pass
|
||||
# Снимок и финальный EXEC TRACE
|
||||
try:
|
||||
self._commit_snapshot(context, values, last_node_id or "")
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
summary = " -> ".join(self._exec_log) if getattr(self, "_exec_log", None) else ""
|
||||
if summary and isinstance(self._store.get("snapshot"), dict):
|
||||
self._store["snapshot"]["EXEC_TRACE"] = summary
|
||||
save_var_store(self.pipeline_id, self._store)
|
||||
except Exception:
|
||||
pass
|
||||
return last_result
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Проверяем лимиты
|
||||
if total_runs >= self.loop_max_iters:
|
||||
raise ExecutionError(f"Iterative mode exceeded loop_max_iters={self.loop_max_iters}")
|
||||
|
||||
Reference in New Issue
Block a user