fix(runtime): replace send_request with _send_action_server_request (#6035)

This commit is contained in:
Xingyao Wang 2025-01-04 18:38:34 -05:00 committed by GitHub
parent 411b63159f
commit 56d7dccec9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 9 deletions

View File

@ -114,8 +114,7 @@ class ActionExecutionClient(Runtime):
if path is not None:
data['path'] = path
with send_request(
self.session,
with self._send_action_server_request(
'POST',
f'{self._get_action_execution_server_host()}/list_files',
json=data,
@ -132,8 +131,7 @@ class ActionExecutionClient(Runtime):
try:
params = {'path': path}
with send_request(
self.session,
with self._send_action_server_request(
'GET',
f'{self._get_action_execution_server_host()}/download_files',
params=params,
@ -198,8 +196,7 @@ class ActionExecutionClient(Runtime):
if self.vscode_enabled and self._runtime_initialized:
if self._vscode_token is not None: # cached value
return self._vscode_token
with send_request(
self.session,
with self._send_action_server_request(
'GET',
f'{self._get_action_execution_server_host()}/vscode/connection_token',
timeout=10,

View File

@ -20,9 +20,7 @@ from openhands.runtime.impl.action_execution.action_execution_client import (
)
from openhands.runtime.plugins import PluginRequirement
from openhands.runtime.utils.command import get_remote_startup_command
from openhands.runtime.utils.request import (
send_request,
)
from openhands.runtime.utils.request import send_request
from openhands.runtime.utils.runtime_build import build_runtime_image
from openhands.utils.async_utils import call_sync_from_async
from openhands.utils.tenacity_stop import stop_if_should_exit