Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/code takes code output and inserts it into the editor where cursor is. #622

Open
1 of 2 tasks
webber-naut opened this issue Nov 13, 2023 · 4 comments
Open
1 of 2 tasks
Labels
area:slash-commands Relates to the slash commands feature kind:enhancement Indicates a new feature request, imrovement, or extension

Comments

@webber-naut
Copy link

Validations

  • I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • I'm not able to find an open issue that requests the same enhancement

Problem

Im still fresh into the extension. Using ollama with custom model to run locally, setup was pretty easy. What I really would like is to not have to copy and paste code snippets from the chat pane to my file. So for instance if there was a command like /code

/code using bootstrap 5.0, write html code for an image caoursel

This would write only the code snippets in the response to where the cursor is currently in the document. Or you can use the /edit functionally where it previews it first then you accept/edit/cancel ect. I think this is similar to the tab completion feature some one referenced but this seems like something easier to implement and actually cut down on lag time for tab completion, plus less messy in my opinion.

Solution

No response

@sestinj
Copy link
Contributor

sestinj commented Nov 13, 2023

@webber-naut This is an awesome idea. I do agree that we could do better than just inserting at the cursor, so some kind of "smart insertion". I'm thinking it would make sense to have a button on any code block next to the "copy" button in the top right? Displaying the diff definitely makes sense

@webber-naut
Copy link
Author

Yes a button next to copy for inserting into editor would be fantastic. Or even something like your edit highlight feature where you have the keyboard shortcodes of highlight and then editing.

For example if I typed the command in my editor.
/code using bootstrap 5.0, write html code for an image caoursel
Then highlighted it, then had some keyboard short cut that would output the code snippets into the editor and remove the /code line instructions.

@sestinj
Copy link
Contributor

sestinj commented Feb 3, 2024

@webber-naut We now have this button in the VS Code extension. Would love to hear your thoughts on it!

@dosubot dosubot bot added area:slash-commands Relates to the slash commands feature kind:enhancement Indicates a new feature request, imrovement, or extension and removed enhancement labels Jul 8, 2024
@khanakia
Copy link

khanakia commented Sep 1, 2024

I do not see it /code
Screenshot 2024-09-02 at 12 11 07 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:slash-commands Relates to the slash commands feature kind:enhancement Indicates a new feature request, imrovement, or extension
Projects
None yet
Development

No branches or pull requests

5 participants