fix(api): update agent_runs query to select specific fields for improved data retrieval

This commit is contained in:
sharath 2025-06-22 17:34:47 +00:00
parent 1ad945fd94
commit 6f85966ec4
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -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}