Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) Add button to export trajectory on chat panel #6378

Merged
merged 9 commits into from
Jan 21, 2025

Conversation

li-boxuan
Copy link
Collaborator

@li-boxuan li-boxuan commented Jan 21, 2025

End-user friendly description of the problem this fixes or functionality that this introduces

  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

Add a button on chat panel that allows the user to download current trajectory


Give a summary of what the PR does, explaining any non-trivial design decisions

Screenshot 2025-01-20 at 9 27 46 PM Screenshot 2025-01-20 at 9 45 14 PM

Here's an example of a downloaded trajectory:

trajectory-3775bdcc03e94d888885c86f221ee9c3.json

This is (logically) a pre-requisite for #6348, which is implementation-ready, but wouldn't make sense if users don't have a way to download trajectory.


Link of any specific issues this addresses

#6049


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:587859d-nikolaik   --name openhands-app-587859d   docker.all-hands.dev/all-hands-ai/openhands:587859d

Copy link
Member

@amanape amanape left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool stuff

Copy link
Collaborator

@xingyaoww xingyaoww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super cool!

@xingyaoww xingyaoww merged commit b7f34c3 into main Jan 21, 2025
17 checks passed
@xingyaoww xingyaoww deleted the boxuanli/dump-traj-json branch January 21, 2025 14:10
zchn pushed a commit to zchn/OpenHands that referenced this pull request Feb 4, 2025
"""
try:
async_stream = AsyncEventStreamWrapper(
request.state.conversation.event_stream, filter_hidden=True
Copy link
Collaborator

@enyst enyst Feb 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to comment on a closed PR, I was just thinking: hidden=True will probably hides commands like clone the selected repo, the one performed automatically when the user selects it from the home page. Is that intended?

Cc: @li-boxuan

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I don't think that's intended. Actually I wasn't even aware of

hidden=True will probably hides commands like clone the selected repo, the one performed automatically when the user selects it from the home page

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't try it, I was thinking what does it take to restore the runtime environment, and with UI, the agent history is replayed over a workspace which... starts with a repo (if the user chose a repo). The initial command to clone the repo is 'hidden', as in hidden from the agent, so it's not in history. And it's not in traj.

So if I have a traj, I want to replay, I need to start with a repo that was cloned the same way 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that sounds legitimate! Created an issue to track this: #6749 will get to this once I got a chance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants