mirror of https://github.com/kortix-ai/suna.git
fix(api): update agent_runs query to select specific fields for improved data retrieval
This commit is contained in:
parent
1ad945fd94
commit
6f85966ec4
|
@ -515,7 +515,7 @@ async def get_agent_runs(thread_id: str, user_id: str = Depends(get_current_user
|
|||
logger.info(f"Fetching agent runs for thread: {thread_id}")
|
||||
client = await db.client
|
||||
await verify_thread_access(client, thread_id, user_id)
|
||||
agent_runs = await client.table('agent_runs').select('*').eq("thread_id", thread_id).order('created_at', desc=True).execute()
|
||||
agent_runs = await client.table('agent_runs').select('id, thread_id, status, started_at, completed_at, error, created_at, updated_at').eq("thread_id", thread_id).order('created_at', desc=True).execute()
|
||||
logger.debug(f"Found {len(agent_runs.data)} agent runs for thread: {thread_id}")
|
||||
return {"agent_runs": agent_runs.data}
|
||||
|
||||
|
|
Loading…
Reference in New Issue