OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

feat: support controlling agent task state.

Open iFurySt opened this issue 1 year ago β€’ 11 comments

  • feat: add agent task state to agent status bar.

  • feat: add agent task control bar to FE.

#1049

iFurySt avatar Apr 14 '24 12:04 iFurySt

https://github.com/OpenDevin/OpenDevin/assets/16201837/45699d1f-1dd0-4160-ab2f-04f4d5db4c25

ignore the error BE threw, i just started a 2b LLM to fastly demonstrate.

iFurySt avatar Apr 14 '24 12:04 iFurySt

have been updated. sorry for the force push, take care next timeπŸ˜…

iFurySt avatar Apr 14 '24 14:04 iFurySt

the changes mainly includes:

  • delete asyncio.Event(), i think it's unnecessary for now.
  • add TaskStateChangedAction to carry the changed task state which is sent to the client.

iFurySt avatar Apr 14 '24 15:04 iFurySt

sorry for the force push, take care next time

I force push to my branches all the time πŸ˜„ as long as you don't force push to main it's all good!

I use git push origin +branch-name to only force push a single branch.

rbren avatar Apr 15 '24 05:04 rbren

Tried this locally. Seems to work well!

Two things I think we can improve on:

  • "pause" waits for the current step to complete before giving feedback. If the step is taking a long time (e.g. step 0) then it feels kind of broken, because you don't get any feedback that it worked. In the future it'd be cool if we can just cancel the current step
  • "reset" and "stop" feel duplicative. I kind of like that "reset" totally clears everything--I wonder if that should be the "stop" behavior.

I'm good merging this as-is as it's already a big improvement. But the second bullet might be easy to address at least

rbren avatar Apr 15 '24 05:04 rbren

Tried this locally. Seems to work well!

Two things I think we can improve on:

  • "pause" waits for the current step to complete before giving feedback. If the step is taking a long time (e.g. step 0) then it feels kind of broken, because you don't get any feedback that it worked. In the future it'd be cool if we can just cancel the current step
  • "reset" and "stop" feel duplicative. I kind of like that "reset" totally clears everything--I wonder if that should be the "stop" behavior.

I'm good merging this as-is as it's already a big improvement. But the second bullet might be easy to address at least

do you mean removing the stop and just keeping the reset for now?

yep, pause may get the feedback for a long time. i originally added an icon loading overlapping with the pause button, but then i removed it. i'll try to handle it to get better ux.

iFurySt avatar Apr 15 '24 05:04 iFurySt

Tried locally and it worked well, this is awesome!

I think it would be great if we could disable some buttons in certain states, e.g. the pause button could be disabled when already in pause state. Could be a follow-up, though.

image

li-boxuan avatar Apr 15 '24 05:04 li-boxuan

image

i've deleted the stop action for now.

iFurySt avatar Apr 15 '24 05:04 iFurySt

Tried locally and it worked well, this is awesome!

I think it would be great if we could disable some buttons in certain states, e.g. the pause button could be disabled when already in pause state.

image

yep, i think we can add disabled and loading status to improve UX.

iFurySt avatar Apr 15 '24 05:04 iFurySt

@iFurySt we should probably combine play and pause into the same button (showing "play" if it's paused, and showing "pause" if it's running)

rbren avatar Apr 17 '24 17:04 rbren

@iFurySt we should probably combine play and pause into the same button (showing "play" if it's paused, and showing "pause" if it's running)

Okay, let me adjust it.

iFurySt avatar Apr 18 '24 00:04 iFurySt

https://github.com/OpenDevin/OpenDevin/assets/16201837/3097d380-cd20-4c77-a124-d4f29949bd5a

@rbren have a look. i've just combined pause and resume into one button. and made some improvements to the loading and disabled status for buttons.

iFurySt avatar Apr 18 '24 06:04 iFurySt