From 918151bda85731306ac61e0c309700952ff8243b Mon Sep 17 00:00:00 2001 From: gahusb Date: Sat, 23 May 2026 02:11:28 +0900 Subject: [PATCH] =?UTF-8?q?feat(agent-office):=20GET=20/agents/{id}/tasks?= =?UTF-8?q?=EC=97=90=20task=5Ftype/days=20=ED=95=84=ED=84=B0=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent-office/app/main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/agent-office/app/main.py b/agent-office/app/main.py index 75d34b7..ef70bc1 100644 --- a/agent-office/app/main.py +++ b/agent-office/app/main.py @@ -1,5 +1,6 @@ import os import json +from typing import Optional from fastapi import FastAPI, HTTPException, WebSocket, WebSocketDisconnect from fastapi.middleware.cors import CORSMiddleware @@ -104,8 +105,13 @@ def update_agent(agent_id: str, body: AgentConfigUpdate): return {"ok": True} @app.get("/api/agent-office/agents/{agent_id}/tasks") -def agent_tasks(agent_id: str, limit: int = 20): - return {"tasks": get_agent_tasks(agent_id, limit)} +def agent_tasks( + agent_id: str, + limit: int = 20, + task_type: Optional[str] = None, + days: Optional[int] = None, +): + return {"items": get_agent_tasks(agent_id, limit=limit, task_type=task_type, days=days)} @app.get("/api/agent-office/agents/{agent_id}/logs") def agent_logs(agent_id: str, limit: int = 50):