fix freeze on zip-files endpoint (#4487)

This commit is contained in:
Robert Brennan
2024-10-18 15:29:07 -04:00
committed by GitHub
parent 126bf316bc
commit cc68756b26

View File

@@ -741,7 +741,7 @@ async def zip_current_workspace(request: Request):
runtime: Runtime = request.state.conversation.runtime
path = runtime.config.workspace_mount_path_in_sandbox
zip_file_bytes = runtime.copy_from(path)
zip_file_bytes = await call_sync_from_async(runtime.copy_from, path)
zip_stream = io.BytesIO(zip_file_bytes) # Wrap to behave like a file stream
response = StreamingResponse(
zip_stream,