Fix for issue where static system commands are truncated (#10292)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Tim O'Farrell
2025-08-14 22:16:50 -06:00
committed by GitHub
parent e40681ca61
commit 985a634d60
5 changed files with 21 additions and 5 deletions

View File

@@ -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.