Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class SnippetCompletionProvider implements CompletionItemProvider {
for (let i = 0; i < suggestions.length; i++) {
const item = suggestions[i];
let to = i + 1;
for (; to < suggestions.length && item.label === suggestions[to].label; to++) {
for (; to < suggestions.length && item.label.label === suggestions[to].label.label; to++) {
suggestions[to].label.label = localize('snippetSuggest.longLabel', "{0}, {1}", suggestions[to].label.label, suggestions[to].snippet.name);
Comment on lines +192 to 193
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This change fixes duplicate-prefix detection, but there doesn't appear to be test coverage asserting that multiple snippets with the same prefix get disambiguated (e.g. label becomes ", "). Consider adding a unit test in the existing snippetsService test suite that registers two snippets with the same prefix and asserts the resulting completion labels are distinct.

Copilot uses AI. Check for mistakes.
}
if (to > i + 1) {
Expand Down
Loading