-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Cleanup classic autocomplete context #3646
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
Cleanup classic autocomplete context #3646
Conversation
|
src/services/ghost/classic-auto-complete/GhostInlineCompletionProvider.ts
Outdated
Show resolved
Hide resolved
markijbema
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either AutocompleteInput needs to be the input to the inline completion provider, or we should just ignore the type; the whole goal of using it as input is that we have better compatibility with the continue inline completion provider.
Currently we don't use that as we use continue from a higher level, however, we might still want to move towards this way as we don't have continue tied into the rest of our system, and this might hinder that
markijbema
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ive added some suggestions for further cleanup, but they're also slightly out of scope, so fine with merging as is and doing that separately
Remove obsolete context tracking and cleaning up types.
Simplifies getFromLLM() method:
The method extracts prefix, suffix, and languageId from the context, but these could be passed directly since they're already available in the caller.
Reduces duplication in contextToAutocompleteInput():
The function extracts prefix/suffix which is already done in the caller.
Simplifies context building:
Since we're building the context in provideInlineCompletionItems and immediately converting it to AutocompleteInput,