continue icon indicating copy to clipboard operation
continue copied to clipboard

Custom command doesn't include code in Visual Studio

Open Robinsane opened this issue 1 year ago • 1 comments

Before submitting your bug report

Relevant environment info

- OS:Windows
- Continue: v0.8.25 as well as v0.9.123
- IDE:Visual Studio code

Description

I'm having problems with custom commands in Visual Studio code, It sounds similar to https://github.com/continuedev/continue/issues/838

The first time it seems to not send my selected / highlighted code together with the command to the llm. It gives some bullocks answer about the Python re module or it answers as follows: "Sure, I'd be happy to help! However, I'll need you to provide the code...". If I continue the conversation (aka second time and up) the answers do seem to make sense.

Awhile ago (weeks? months?) I did not experience this problem. At the same time I'm not experiencing this problem in the PyCharm extension.

Update: Starting a new Continue session /w the +-button and rightclicking my selected code + choosing "Add Highlighted Code to Context" results in the same problem.

To reproduce

No response

Log output

No response

Robinsane avatar May 02 '24 13:05 Robinsane

@Robinsane is this using custom commands like here? We did recently change the format to be much more flexible, so that you will have to add the {{{ input }}} templating variable wherever you prefer in the prompt (typically at the start). That should also explain why it's not happening in JetBrains (hasn't been released there yet)

sestinj avatar May 02 '24 20:05 sestinj

@Robinsane is this using custom commands like here? We did recently change the format to be much more flexible, so that you will have to add the {{{ input }}} templating variable wherever you prefer in the prompt (typically at the start). That should also explain why it's not happening in JetBrains (hasn't been released there yet)

That's it, thanks a ton for the fast reply! I just tested and the {{{ input }}}\n\n in front of the custom command prompt doesn't seem to disrupt the older version in Pycharm much, so even if it doesn't use it yet, I can distribute this config within my company :)

Thanks again!

Robinsane avatar May 03 '24 09:05 Robinsane