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

Thank you! + A couple ideas #2

Open
Kelin2025 opened this issue Apr 19, 2023 · 5 comments
Open

Thank you! + A couple ideas #2

Kelin2025 opened this issue Apr 19, 2023 · 5 comments

Comments

@Kelin2025
Copy link

Hi!
Just wanted to say thank you, awesome extension!
I have a couple ideas on how to improve DX

Save snippets

When using text-davinci-003 model, it's really useful to use the following pattern:

Prompt 1
Solution 1

Prompt 2
%let it complete solution 2%

And since indexing the whole codebase is a painful task, having snippets library for that could be a good workaround

Insert mode

It's not that critical, but in OpenAI Playground there's "Insert mode". The way how it works is that you put [insert] keyword to your prompt, and the model puts its response here. Could be useful for some cases when you want to patch some nested thing instead of making a new solution below

@minosvasilias
Copy link
Owner

Hey, thank you very much, glad you found it useful!

Appreciate the suggestions as well.

Regarding Save Snippets:

That's a great idea, i like it. And it could serve as a stepping stone towards more comprehensive solutions to the same problem, which would probably involve embeddings to retrieve context for the entire codebase.

Perhaps selecting some text in the editor and pressing a shortcut/button could save that piece of code as a snippet, and we assign a certain number of slots or maximum character length for saved snippets.
I'll look into that when i have time. 👍

Regarding Insert Mode:

The insert-mode in their playground actually just adds a suffix parameter to the API-call. (try pressing View Code in their playground to see). godot-copilot is already using that for the davinci-model and will always attempt to send code before and after the caret to the model, in order to insert code at the caret-position.

I can imagine improving the UX somewhat though, such as replacing currently selected text when pressing the shortcut, instead of just using the caret-position.

Will need to look into whether or not selected text can actually be retrieved by the addon-scripts in both 4.x and 3.x, since that seems relevant for both suggestions.

@MatMice
Copy link

MatMice commented Apr 18, 2024

I feel a bit dumb, but I managed to get my API token but I have no clue where to put it. I have the plugin enabled

@minosvasilias
Copy link
Owner

@MatMice there should be a Copilot tab in the right hand panel with an API key field. You might need to scroll the tabs to see it if your panel is not wide enough.

Screenshot 2024-04-19 at 00 22 09

@MatMice
Copy link

MatMice commented Apr 19, 2024

Success; thank you <3 Now I may code within Godot and use copilot ty so much!!

also the guides on how to get the key are a bit hard to find, but after digging around other repo sites figured it out as well

@minosvasilias
Copy link
Owner

also the guides on how to get the key are a bit hard to find, but after digging around other repo sites figured it out as well

Yeah, i don't want to advertise these approaches too much on this repo since it risks it being banned, so the links to external sources will have to do for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants