Add a progress log entry to a task.
(
agent_id: uuid.UUID,
task_id: uuid.UUID,
data: TaskLogCreate,
current_user: User = Depends(get_current_user),
db: AsyncSession = Depends(get_db),
)
| 135 | |
| 136 | @router.post("/{task_id}/logs", response_model=TaskLogOut, status_code=status.HTTP_201_CREATED) |
| 137 | async def add_task_log( |
| 138 | agent_id: uuid.UUID, |
| 139 | task_id: uuid.UUID, |
| 140 | data: TaskLogCreate, |
| 141 | current_user: User = Depends(get_current_user), |
| 142 | db: AsyncSession = Depends(get_db), |
| 143 | ): |
| 144 | """Add a progress log entry to a task.""" |
| 145 | await check_agent_access(db, current_user, agent_id) |
| 146 | log = TaskLog(task_id=task_id, content=data.content) |
| 147 | db.add(log) |
| 148 | await db.flush() |
| 149 | return TaskLogOut.model_validate(log) |
| 150 | |
| 151 | |
| 152 | @router.post("/{task_id}/trigger") |
nothing calls this directly
no test coverage detected