cursorless-dev / cursorless

Don't let the cursor slow you down
https://www.cursorless.org/
MIT License
1.15k stars 81 forks source link

feature request: copilot-assisted snippet variables #1594

Open josharian opened 1 year ago

josharian commented 1 year ago

Daydream idea: A cursorless snippet variable that is specified to be filled in by copilot, with a given prompt. Something like:

"body": [
    "fmt.Println($localvars)"
],
"variables": {
    "localvars": {
        "copilot-prompt": "put nearby local variables here, along with their names, to help with debug printing"
    }
},

Then I could say snippet whale trap fine and get a nice debug helper prepopulated.

I'm not sure that the copilot/VSCodes hooks for this exist, sadly. Maybe with a direct ChatGPT integration, but you'd lose all the copilot context selection and prompt engineering that GitHub has done.

josharian commented 1 year ago

I'm unsure exactly where to file an upstream feature request for this. Tried https://github.com/orgs/community/discussions/60325

pokey commented 1 year ago

Fwiw I tried doing this manually using inline copilot chat, and it is too dumb to figure it out 😅

image

In my experience so far, copilot inline chat is waaay dumber than regular copilot suggestions unfortunately

Here's some experiments with trying to get regular copilot suggestions to work:

image image image
josharian commented 1 year ago

Awesome! The regular copilot suggestions look promising, at least.