github / gh-copilot

Ask for assistance right in your terminal.

Home Page:https://docs.github.com/en/copilot/github-copilot-in-the-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEAT]: Allow the user to predefine the prompt

kusutori opened this issue · comments

Thanks for taking the time to fill out this out! 🙇
By submitting this issue, you agree to follow our Code of Conduct.

Describe the need

I just read the suggestions in #8 , and it seems that the discussion outcome is to let Copilot understand some machine states through configuring the config. However, due to security considerations, there are still some limitations.

I think that providing a prompt in advance can effectively and flexibly help Copilot understand the current context. Similar to using ChatGPT, we can inform it in advance about my current background and what I'm going to do next, and then ask it to generate specific responses. This approach tends to yield more accurate and effective results.

You can see the image below, What do you think?

Version

version 0.5.3-beta (2023-11-09)

Relevant terminal output

c27d183641b7d86055b1cb3d4651ed3c
7681b3cf6f1cd7856bcd129e8292d793
As depicted in these two images, all I had to do was tell it what system and shell I was using beforehand, and it would generate the correct answer!

Therefore, it may be possible to provide an option to configure multiple prompts and select the corresponding prompts in advance, which is more secure than using config and allows for easy customization.

+1

@okyan123 : sincere apologies for such a late follow up, but thank you for opening this issue and capturing ideas on improving the user experience!

Therefore, it may be possible to provide an option to configure multiple prompts and select the corresponding prompts in advance, which is more secure than using config and allows for easy customization.

I would like to toss around ideas of what this might look like given that the example above involves the user explicitly including this as part of the initial suggestion loop.

  • are prompts focused on operating system and shell only?
  • when might a user have multiple prompts on the same machine?
  • is this information only used on the initial suggestion, not on subsequent revisions?

Once again, I appreciate whatever you might capture on what this experience looks like and what trade offs it might bring. 🙇 For example, extras clicks / keystrokes versus a default behavior you can change for the majority of uses.