Skip to content

Commit b73f09a

Browse files
committed
fix python lint
1 parent e6c7c5e commit b73f09a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

openhands/core/config/app_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
get_field_info,
1111
)
1212
from openhands.core.config.llm_config import LLMConfig
13+
from openhands.core.config.replay_config import ReplayConfig
1314
from openhands.core.config.sandbox_config import SandboxConfig
1415
from openhands.core.config.security_config import SecurityConfig
1516

@@ -42,11 +43,13 @@ class AppConfig:
4243
file_uploads_max_file_size_mb: Maximum file size for uploads in megabytes. 0 means no limit.
4344
file_uploads_restrict_file_types: Whether to restrict file types for file uploads. Defaults to False.
4445
file_uploads_allowed_extensions: List of allowed file extensions for uploads. ['.*'] means all extensions are allowed.
46+
replay: Settings related to replay integration.
4547
"""
4648

4749
llms: dict[str, LLMConfig] = field(default_factory=dict)
4850
agents: dict = field(default_factory=dict)
4951
default_agent: str = OH_DEFAULT_AGENT
52+
replay: ReplayConfig = field(default_factory=ReplayConfig)
5053
sandbox: SandboxConfig = field(default_factory=SandboxConfig)
5154
security: SecurityConfig = field(default_factory=SecurityConfig)
5255
runtime: str = 'eventstream'

openhands/runtime/action_execution_server.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
FileReadAction,
3434
FileWriteAction,
3535
IPythonRunCellAction,
36+
ReplayCmdRunAction,
3637
)
3738
from openhands.events.observation import (
3839
CmdOutputObservation,
@@ -42,6 +43,7 @@
4243
FileWriteObservation,
4344
IPythonRunCellObservation,
4445
Observation,
46+
ReplayCmdOutputObservation,
4547
)
4648
from openhands.events.serialization import event_from_dict, event_to_dict
4749
from openhands.runtime.browser import browse
@@ -171,7 +173,7 @@ async def run(
171173
) -> CmdOutputObservation | FatalErrorObservation:
172174
return self.bash_session.run(action)
173175

174-
async def run_replay(self, action: ReplayCmdRunAction) -> ReplayCmdOutputObservation:
176+
async def run_replay(self, action: ReplayCmdRunAction) -> ReplayCmdOutputObservation | FatalErrorObservation:
175177
command = f'/replay/replayapi/scripts/run.sh {action.command}'
176178
if action.recording_id != '':
177179
command = command + f' -r {action.recording_id}'
@@ -189,6 +191,10 @@ async def run_replay(self, action: ReplayCmdRunAction) -> ReplayCmdOutputObserva
189191
)
190192
cmd_action.timeout = 600
191193
obs = self.bash_session.run(cmd_action)
194+
195+
if isinstance(obs, FatalErrorObservation):
196+
return obs
197+
192198
# we might not actually need a separate observation type for replay...
193199
return ReplayCmdOutputObservation(
194200
command_id=obs.command_id,

0 commit comments

Comments
 (0)