Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Add missing last ps1 match output into combined output (#8097)

Ryan H. Tran107789b5a87a
diff --git a/openhands/runtime/utils/bash.py b/openhands/runtime/utils/bash.py
index 4f241cb280..fec9f92170 100644
--- a/openhands/runtime/utils/bash.py
+++ b/openhands/runtime/utils/bash.py
@@ -462,6 +462,8 @@ class BashSession:
ps1_matches[i].end() + 1 : ps1_matches[i + 1].start()
]
combined_output += output_segment + '\n'
+ # Add the content after the last PS1 prompt
+ combined_output += pane_content[ps1_matches[-1].end() + 1 :]
logger.debug(f'COMBINED OUTPUT: {combined_output}')
return combined_output