-
Notifications
You must be signed in to change notification settings - Fork 31
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]: Command to run code #2
Comments
@asportnoy : Thank you for creating this issue! 🙇 This was a difficult question the team asked itself when rewriting the GitHub Next technical preview: "How important was being able to execute the code? What are the ramifications if it was destructive or harmful?". At the time, we erred on the side of focusing on the rewrite while hearing back from our users. That said, we have heard this feedback also from Hubbers in the weeks leading up to Universe, so I believe I can say the team is open to the idea. |
The GH Next preview had a confirmation prompt after choosing "execute" to avoid people accidentally running harmful commands, which could definitely be used here. Another potential option which I used for my custom Fish Shell wrapper is to have it set the prompt (using the builtin Regardless, making it exit after copying is an easy step which I think should be done regardless. Also adding the optional flag to output the command to a file lets people build custom wrappers like I made for Fish which would allow people to make it execute automatically if they prefer, or to do other cool things with it as well. |
I use Fish as well, could you tell how you set that wrapper to set the prompt? |
@hamadzidani A little ChatGPT and a little Google suggests:
As for other shells, this is what ChatGPT had to say (I gave this a quick test, and it seemed to work):
And for
Further reading on
Further reading about the zsh line editor: |
Piggybacking on this to suggest that maybe, once the user has selected |
Firstly, I just want to say I love the collaboration! 😻 As I mentioned in #5 (comment), I think the proper way to support this is by implementing something similar to what was done in the GitHub Next technical preview. That said, this alias wrapper solution was very Unix/Linux friendly but not so much PowerShell and possibly others. |
Greetings! To facilitate command execution, I've established |
@yongkangchen nice. Yes honestly @andyfeller too much prompts, the thing about cli is that you can do it fast, or otherwise you would just go to chatgpt or copilot. I even found that the confirmation was too much. We need something very simple. For example: No more no less or I would just go to chatgpt |
It's a bit annoying when the behavior is different to github-copilot-cli npmjs package behavior. Copy should have an option to immediately quit the interactive UI after copied and also will be the best to have another option to output command to anywhere else (cli, file). |
@vuon9 : hear you, loud and clear 👂 |
First, I really love this and the effort and work behind it! About the feature. I actually expected it to provide the command right away, instead of asking me questions back. Questions should be once, reconfiguration allowed (like Custom Instructions) Then it works the same with same principles for all following calls. Then I expect 1 call = 1 command. Experience should be smooth, like part of the flow of working on CLI |
Bit disappointed that the GitHub Next version of the Copilot CLI is going away today as I feel like this version is a downgrade in its current state and much harder to use. Do you have an ETA for when some of the features discussed here will be implemented? Are you able to extend the sunset for the beta until that happens? |
@asportnoy This was in the email sent this morning, that suggests otherwise: |
Didn't get that for some reason, thank you. |
It makes a lot of sense to err on the conservative side when running code without proper inspection. One idea to consider could be to have an option of running the command in a sandbox/lightweight container to not accidentally do something harmful to the user's system. One way to do it would be with a tool like try (disclaimer: I am one of the developers), which runs a command in a lightweight container that is created using Linux namespaces and overlayfs (similarly to docker containers). It has minimal dependencies (it is just a shell script) and can be run very easily. @andyfeller if this is something that people think is useful we would be happy to put some work in it! |
One UX point that hasn't been discussed, and which doesn't change any current functionality:
? Select an option [Use arrows to move, type to filter]
> Copy command to clipboard
Explain command
Revise command
Rate response
Exit Right now, the user either needs to move their hand to the arrow keys to select Renaming to While this doesn't solve the problem of immediate pasting, it at least cuts down on keystrokes between command and exiting. (Another option would be a |
@asportnoy : I'm genuinely happy to say your feedback has been heard as of I can't wait to hear back from you and our other users if this moves the needle toward being the Copilot you need. ❤️ For more information, see https://github.blog/changelog/2024-03-21-github-copilot-general-availability-in-the-cli/. |
Describe the need
One feature that the GitHub next beta had which this is missing is being able to automatically run the command. This version only has a "copy" option, and to make it worse, you have to press "exit" after copying before you can actually do anothing with the command. This a much worse user experience.
Few things I think could be improved here:
Version
v0.5.2-beta
Relevant terminal output
N/A
The text was updated successfully, but these errors were encountered: