fix: preserve task stop intent and guard remote execution boundaries

This commit is contained in:
Xin Wang
2026-10-23 19:53:17 +08:00
parent 8ac75a1873
commit 89c3bad58e
16 changed files with 199 additions and 20 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ class TaskRepository:
return from_row(row) if row else None
async def list(self, assistant_id: str | None = None, *, active=False) -> list[TaskRecord]:
statement = select(BackgroundTask).order_by(BackgroundTask.created_at.desc())
statement = select(BackgroundTask).order_by(BackgroundTask.status.in_(ACTIVE).desc(), BackgroundTask.created_at.desc())
if not active:
statement = statement.limit(100)
if assistant_id: