-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Simple Context Deduplication for Autocomplete #6055
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
Conversation
Your cubic subscription is currently inactive. Please reactivate your subscription to receive AI reviews and use cubic. |
✅ Deploy Preview for continuedev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…darsh/enhancement/deduplication
@@ -171,7 +175,9 @@ export const getSnippets = ( | |||
(snippet) => | |||
!(snippet as AutocompleteCodeSnippet).filepath?.startsWith( | |||
"output:extension-output-Continue.continue", |
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.
I know this isn't a change in this PR but these snippets should just never enter the cache in the first place
output:extension-output-Continue.continue
), | ||
) && | ||
((snippet as AutocompleteCodeSnippet).filepath === undefined || | ||
!addedFilepaths.has((snippet as AutocompleteCodeSnippet).filepath)), |
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.
I think this type casting could be removed by checking snippet.type === AutocompleteSnippetType.Code
…darsh/enhancement/deduplication
Description
Implemented simple priority-based context deduplication for autocomplete. There are now no duplicate filepaths among code context snippets.
EDIT: merged main into this branch to avoid showing changes that were already handled by PR #6012 . Also fixed logic error: changed break to continue to ensure as much context is added as possible.
EDIT 2: Cleaned up filtering and validation logic
Checklist