⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
[] The relevant docs, if any, have been updated or created
Screenshots
Before:
After:
Testing
[ For new or modified features, provide step-by-step testing instructions to validate the intended behavior of the change. ]
[ For new UI features, ensure that the changes look good across viewport widths, light/dark theme, etc ]
Description
This PR addresses a bug in the autocomplete service where suggestions were not properly deduplicated when the cursor was positioned in the middle of a line. The issue arose because
textAfterCursor
could include newline characters, leading to a mismatch when the completion was only one line: https://github.com/continuedev/continue/blob/a9845386f054179651bd1e71e768175a3b873c2e/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteService.kt#L126-L132 By detecting and truncatingtextAfterCursor
at the first newline, we ensure that the deduplication process correctly recognizes already existing text after the cursor.Checklist
Screenshots
Before: After:
Testing
[ For new or modified features, provide step-by-step testing instructions to validate the intended behavior of the change. ] [ For new UI features, ensure that the changes look good across viewport widths, light/dark theme, etc ]