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

Allow specifying max lines used for AI code completion context #14539

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

JonasHelming
Copy link
Contributor

Review #14537 first, please

What it does

Adds a new user setting allowing to specify max lines used for AI code completion context

How to test

  • Change the setting to other values than 0
  • Open the AI History View => Code Completion
  • Trigger code completion (SHIFT+SPACE) and check the context

Follow-ups

This could be more sophisticated, e.g. with percentages for prefix and suffix or by respecting the AST.

Review checklist

Reminder for reviewers

Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

The change looks good to me and works as expected. Thank you very much, Jonas! However, I do have some questions regarding the setting as a whole that I'd like to clarify before we merge this.

Make suffix calculation robust against beeing at line 0

Signed-off-by: Jonas Helming <[email protected]>
Signed-off-by: Jonas Helming <[email protected]>
Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

I had another look and everything works really nicely! Thank you very much for the quick turnaround!

@JonasHelming JonasHelming merged commit 8ad410c into master Nov 28, 2024
11 checks passed
@github-actions github-actions bot added this to the 1.56.0 milestone Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants