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

Microagent to fix issues with npm #5314

Merged
merged 1 commit into from
Dec 1, 2024
Merged

Microagent to fix issues with npm #5314

merged 1 commit into from
Dec 1, 2024

Conversation

neubig
Copy link
Contributor

@neubig neubig commented Nov 28, 2024

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

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

When using npm, it confirms on the command line if we'd like to install packages, which results in a timeout.
This PR encourages the agent to auto-confirm these changes.

Note that I also tried adding the --yes command line argument to npm, but that doesn't work for things like the create-vite command, which is not confirmed by just adding --yes.


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:bb85aaa-nikolaik   --name openhands-app-bb85aaa   docker.all-hands.dev/all-hands-ai/openhands:bb85aaa

---

When using npm to install packages, you will not be able to use an interactive shell, and it may be hard to confirm your actions.
As an alternative, you can pipe in the output of the unix "yes" command to confirm your actions.
Copy link
Collaborator

Choose a reason for hiding this comment

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

npm could just be called with "-y" flag, iirc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! It can be, but that doesn't work when we use things like "create-vite" (as I briefly mentioned in the original PR).

@neubig neubig merged commit afc94a2 into main Dec 1, 2024
17 checks passed
@neubig neubig deleted the neubig/npm-microagent branch December 1, 2024 15:47
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.

3 participants