Skip to content

feat: add autocomplete prompt template #5176

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

Merged
merged 5 commits into from
Apr 23, 2025

Conversation

uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Apr 15, 2025

Description

promptTemplates.autocomplete now works for autocomplete. we used to have this feature in config.json (tabAutocompleteOptions) and was missing in config.yaml

reference discussion: https://discord.com/channels/1108621136150929458/1359484060371783741/1360375811332505730

Checklist

  • The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screenshots

image

Testing instructions

  • open your local config in .continue folder
  • add an autocomplete key and value in your model's prompt templates
  • when you type anything in the editor, see that the autocomplete suggestions are different

@uinstinct uinstinct requested a review from a team as a code owner April 15, 2025 13:33
@uinstinct uinstinct requested review from sestinj and removed request for a team April 15, 2025 13:33
Copy link

netlify bot commented Apr 15, 2025

Deploy Preview for continuedev ready!

Name Link
🔨 Latest commit 3f98dd3
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/6809161c7369600008e263cb
😎 Deploy Preview https://deploy-preview-5176--continuedev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@PhilipAD
Copy link

lgtm- @sestinj @TyDunn, mind taking a look when you get a chance?

@@ -122,6 +122,7 @@ export class CompletionProvider {

private async _getAutocompleteOptions() {
const { config } = await this.configHandler.loadConfig();
// console.log('debug1 the config was', config?.selectedModelByRole.autocomplete, config.)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// console.log('debug1 the config was', config?.selectedModelByRole.autocomplete, config.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -181,6 +186,8 @@ export class CompletionProvider {
helper,
});

console.log('debug1 the prompt was->', prompt)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('debug1 the prompt was->', prompt)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed


Example:

```yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing an actual example of the prompt templating

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@@ -566,7 +566,7 @@ export interface LLMOptions {
completionOptions?: CompletionOptions;
requestOptions?: RequestOptions;
template?: TemplateType;
promptTemplates?: Record<string, PromptTemplate>;
promptTemplates?: Partial<Record<keyof PromptTemplates, PromptTemplate>>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👌

Copy link
Collaborator

@Patrick-Erichsen Patrick-Erichsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few console logs to remove/docs feedback, thanks for adding this! Also looks like a merge conflict popped up.

Copy link
Contributor

@sestinj sestinj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for making the adjustments!

@sestinj sestinj merged commit 6714db3 into continuedev:main Apr 23, 2025
31 checks passed
@uinstinct uinstinct deleted the autocomplete-prompt-template branch April 24, 2025 04:12
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

Successfully merging this pull request may close these issues.

4 participants