INNER CODE UNIT · Python
list_recent
browser-use/bux · agent/agency_db.py:283
def list_recent(
db: sqlite3.Connection, status: str | None = None, limit: int = 20
) -> list[dict[str, Any]]:
if status:
cur = db.execute(
"SELECT * FROM suggestions WHERE status = ? ORDER BY id DESC LIMIT ?",
(status, limit),
)
else:
cur = db.execute(
"SELECT * FROM suggestions ORDER BY id DESC LIMIT ?", (limit,)
)
return [dict(r) for r in cur.fetchall()]
def pop_refine_context_for_thread(
db: sqlite3.Connection, thread_id: int | None
) -> str | None: