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

chore: polish AI code completion #14192

Merged

Conversation

sdirix
Copy link
Member

@sdirix sdirix commented Sep 18, 2024

What it does

  • removes code completion item provider as it blocks the completion popup
  • reworks the code completion prompt so that it can be easier customized
  • catches abort errors in the Open AI Api which are triggered very often when using code completion. This avoids spamming the log with "non-errors".

How to test

  • Check the preferences that only the enable for inline code completion exists
  • Test the new code completion template
    • Note that if you customized the template before, then you need to reset it
  • Observe in the console that abort errors are no longer thrown

Follow-ups

Review checklist

Reminder for reviewers

- removes code completion item provider as it blocks the completion
  popup
- reworks the code completion prompt so that it can be easier
  customized
- catches abort errors in the Open AI Api which are triggered very
  often when using code completion. This avoids spamming the log with
  "non-errors".
suggestions.push(completionItem);
return { suggestions };
}
tags?: String[] | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

if tags is optional I think typescript automatically adds the undefined type

@eneufeld
Copy link
Contributor

nice cleanup and code removal, I like it!

Code completion still works.

@planger planger self-requested a review September 19, 2024 10:10
Copy link
Contributor

@planger planger left a comment

Choose a reason for hiding this comment

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

Thank you, excellent improvement!

@planger planger merged commit 5f6b21e into eclipse-theia:master Sep 19, 2024
11 checks passed
@sdirix sdirix deleted the focus-on-inline-completion branch September 19, 2024 10:51
@sdirix sdirix mentioned this pull request Sep 20, 2024
24 tasks
@sgraband sgraband added this to the 1.54.0 milestone Sep 26, 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.

4 participants