mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Fix for issue where static system commands are truncated (#10292)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -312,7 +312,11 @@ class BashSession:
|
||||
return command_output.rstrip()
|
||||
|
||||
def _handle_completed_command(
|
||||
self, command: str, pane_content: str, ps1_matches: list[re.Match]
|
||||
self,
|
||||
command: str,
|
||||
pane_content: str,
|
||||
ps1_matches: list[re.Match],
|
||||
hidden: bool,
|
||||
) -> CmdOutputObservation:
|
||||
is_special_key = self._is_special_key(command)
|
||||
assert len(ps1_matches) >= 1, (
|
||||
@@ -359,6 +363,7 @@ class BashSession:
|
||||
content=command_output,
|
||||
command=command,
|
||||
metadata=metadata,
|
||||
hidden=hidden,
|
||||
)
|
||||
|
||||
def _handle_nochange_timeout_command(
|
||||
@@ -566,6 +571,7 @@ class BashSession:
|
||||
command=command,
|
||||
content=command_output,
|
||||
metadata=metadata,
|
||||
hidden=getattr(action, 'hidden', False),
|
||||
)
|
||||
|
||||
# Send actual command/inputs to the pane
|
||||
@@ -616,6 +622,7 @@ class BashSession:
|
||||
command,
|
||||
pane_content=cur_pane_output,
|
||||
ps1_matches=ps1_matches,
|
||||
hidden=getattr(action, 'hidden', False),
|
||||
)
|
||||
|
||||
# Timeout checks should only trigger if a new prompt hasn't appeared yet.
|
||||
|
||||
Reference in New Issue
Block a user