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]: Provide history prompts when "Suggestion not readily available." occurred

doggy8088 opened this issue · comments

Describe the need

When I give a prompt and the suggestion not readily available. I might want to modify my prompts to another version.

image

If I can press Up-arrow key to shown last prompt, then I can change a bit to re-submit a new prompt, thenI might able to get new result.

Version

gh-copilot version 0.5.3-beta (2023-11-09)

Relevant terminal output

Welcome to GitHub Copilot in the CLI!
version 0.5.3-beta (2023-11-09)

I'm powered by AI, so surprises and mistakes are possible. Make sure to verify any generated code or suggestions, and share feedback so that we can learn and improve.

? What kind of command can I help you with?
> generic shell command

? What would you like the shell command to do?

? What would you like the shell command to do?
> I want to analyze audio streamming from comes from YouTube using ffprobe.

Suggestion not readily available. Please revise for better results.

? What would you like the shell command to do?
>

@doggy8088: Thank you for opening up this issue! ❤ I can see how simulating terminals' history capabilities would facilitate situations like this.

That said, I think there might be some limitations of what we can do given limitations in our current prompting library and privacy concerns over holding onto user context within memory or on disk.

  • our current prompting library has a limitation in this regard: prompting libraries like the one we use take control over standard input, reacting to key presses including arrow keys. in order to provide this capability, we will likely need to replace the dependency all together or write it from scratch

  • Copilot products and features cannot hold onto user context within memory or on disk: GitHub Copilot in the CLI only holds onto responses from prompts long enough to communicate with the backend Copilot API services, so providing this type of history conflicts with current privacy controls

@doggy8088 : Not exactly what you were hoping for as I don't think we can incorporate shell history within the gh experience, but as I mentioned in #2 that v1.0.0 supports the use of ghcs alias supports executing commands and making them available in your shell history.

So, at least you will have history available somewhere 😬.

As such, I'm going to close this issue for now as I don't see this feasibly working.