OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: Multiline/multiple commands look a bit awkward in the UI

Open rbren opened this issue 1 year ago • 1 comments

Is there an existing issue for the same bug?

  • [X] I have checked the troubleshooting document at https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting
  • [X] I have checked the existing issues.

Describe the bug

When CodeAct runs multiple commands, like

pwd
ls -lah

or runs a multiline command like

echo "Name,Age,Location
Alice,30,New York
Bob,25,Los Angeles
Charlie,35,Chicago" > sample.csv

The output looks a little funky (screenshot). The multi-command is printed with the second command looking like it's output. The multiline single command shows $PS2 characters repeating the command in the output.

Here's an example:

$ echo "Name,Age,Location
Alice,30,New York
Bob,25,Los Angeles
Charlie,35,Chicago" > sample.csv
> Alice,30,New York
> Bob,25,Los Angeles
> Charlie,35,Chicago" > sample.csv

$ echo 'awk -F"," '\''NR > 1 {print $2}'\'' sample.csv' > extract_field.sh
chmod +x extract_field.sh
Screenshot 2024-05-06 at 4 36 23 PM

Current Version

0.5.2

Installation and Configuration

Typical

Model and Agent

CodeAct, GPT4

Reproduction Steps

No response

Logs, Errors, Screenshots, and Additional Context

No response

rbren avatar May 06 '24 20:05 rbren

CC @xingyaoww

https://github.com/OpenDevin/OpenDevin/pull/1474 might help a bit with this. It at least introduces logic to split commands.

I've been thinking about a change that would allow agents to return a list of actions, instead of one action at a time. That would let us parse the multi-commands into separate RUN actions

rbren avatar May 06 '24 20:05 rbren

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jun 06 '24 01:06 github-actions[bot]

This issue was closed because it has been stalled for over 30 days with no activity.

github-actions[bot] avatar Jun 13 '24 01:06 github-actions[bot]

I think this is already resolved by https://github.com/OpenDevin/OpenDevin/pull/1474

xingyaoww avatar Jun 13 '24 05:06 xingyaoww