feat: enhance sandbox functionality with threading support and file download capabilities

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-04-13 16:41:46 -07:00
parent 38b9e8dcc5
commit b5301fa438
5 changed files with 103 additions and 29 deletions

View file

@ -86,9 +86,8 @@ async def download_sandbox_file(
# Fall back to live sandbox download
try:
sandbox = await get_or_create_sandbox(thread_id)
raw_sandbox = sandbox._sandbox
content: bytes = await asyncio.to_thread(raw_sandbox.fs.download_file, path)
sandbox, _ = await get_or_create_sandbox(thread_id)
content: bytes = await asyncio.to_thread(sandbox.download_file, path)
except Exception as exc:
logger.warning("Sandbox file download failed for %s: %s", path, exc)
raise HTTPException(