Copilot mess

image
Copilot screws up the code when I ask for the docs of the function. It puts in that extraneous “function implementation goes here” when there already is a body of the function defined.

Any idea how to fix that?

I’d say ignore when it doesn’t work but enjoy when it works.

6 Likes

Well, it doesn’t, hence my question. So I guess there is little control over what Copilot does?

There is no control over Copilot. It sends the contents of your file to an LLM, generates a few possible solutions, and then puts the responses from the LLM in front of you as autofill.

Unfortunately, in my case it generates just one (the one with the garbage at the bottom). So no one has been able to use “docs” action successfully?

I use it for docs all the time, but in general my flow is docs first (mostly written by me) and then the function itself (written together).

Part of working with copilot is just understanding that it fucks up, constantly, and that your role tilts more towards and editor and guide.

For what it’s worth, you do not have to accept the entire suggestion – you can step forward through words using (on my editor) Ctrl + Shift + Right arrow.

3 Likes

Actually, there is a chat mode where you can do prompt engineering.

2 Likes

This is true, but doesn’t really solve the problem where OP wants to docs action to be improved!

1 Like