sync update from LAN repo (source master @ ca48c4ec)

This commit is contained in:
gozeros committed 2026-11-05 10:53:54 +08:00
1 parent 8bc8b0e082
commit ea9dcff9c0
873 files changed
+107866 -14011

No files matched your search

@@ -54,9 +54,22 @@ def is_excluded_system_thread(metadata: dict[str, Any] | None) -> bool:
carry ``task_analysis_seat``. Those rows stay in the execution record and
out of recent chats.
"""
md = metadata or {}
if md.get("system"):
return True
md = metadata or {}
if md.get("system"):
return True
# Task-analysis keeps its user-facing history in task_analysis_runs /
# task_analysis_run_messages. The underlying LangGraph threads are runtime
# implementation details; recognise their task markers as a defensive
# fallback in case a legacy caller omitted ``system`` or ``thread_type``.
if any(
isinstance(md.get(key), str) and md[key].strip()
for key in (
"task_analysis_task_id",
"task_analysis_source_task_id",
"task_analysis_run_id",
)
):
return True
seat = md.get("task_analysis_seat")
if isinstance(seat, str) and seat.strip():
return True