Skip to content

Conversation

@hediet
Copy link
Member

@hediet hediet commented Oct 24, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 24, 2025 14:20
@hediet hediet enabled auto-merge (squash) October 24, 2025 14:20
@hediet hediet self-assigned this Oct 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors inline completion functionality by renaming DisplayLocation to Hint and allowing insertText to be optional. The changes introduce a uri field to support completions that apply to files other than the current document, and consolidate naming conventions across the codebase (e.g., actiongutterMenuLinkAction, labelcontent, kindstyle).

Reviewed Changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
extHostTypeConverters.ts Renames namespace from InlineCompletionDisplayLocationKind to InlineCompletionHintStyle and updates type conversions to use languages.InlineCompletionHintStyle
extHostLanguageFeatures.ts Updates import to remove InlineCompletionDisplayLocationKind, changes action to gutterMenuLinkAction, displayLocation to hint, and adds uri field support
standaloneLanguages.ts Updates exported enum name from InlineCompletionDisplayLocationKind to InlineCompletionHintStyle
suggestInlineCompletions.ts Renames action parameter to gutterMenuLinkAction in constructor
inlineEditsCustomView.ts Updates imports and type signatures to use InlineSuggestHint instead of InlineCompletionDisplayLocation, renames label to content and kind to style
inlineEditsViewInterface.ts Changes type of displayLocation from InlineCompletionDisplayLocation to InlineSuggestHint
inlineEditsView.ts Adds check for uri field to determine when to use custom view
inlineEditsModel.ts Updates type imports and renames displayLocation to hint
inlineEditWithChanges.ts Adds trailing comma to constructor parameters
provideInlineCompletions.ts Handles optional insertText, adds URI support, removes IDisplayLocation interface, and updates to use InlineCompletionHint
inlineSuggestionItem.ts Renames displayLocation to hint throughout, adds uri field support, renames class from InlineSuggestDisplayLocation to InlineSuggestHint, and updates property names (labelcontent, kindstyle)
inlineCompletionsSource.ts Simplifies telemetry logging to use hint directly instead of deconstructing properties
inlineCompletionsModel.ts Updates all references from displayLocation to hint
standaloneEnums.ts Moves and renames enum from InlineCompletionDisplayLocationKind to InlineCompletionHintStyle
languages.ts Updates InlineCompletion interface to allow optional insertText, adds uri field, renames action to gutterMenuLinkAction and displayLocation to hint, renames related types and enums


snippetInfo = undefined;
} else if (inlineCompletion.insertText === undefined) {
insertText = ''; // TODO use undefined
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

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

The TODO comment 'use undefined' conflicts with the actual implementation of setting insertText to an empty string. Either remove the TODO if empty string is the intended behavior, or implement the undefined behavior and remove this fallback.

Suggested change
insertText = ''; // TODO use undefined
insertText = undefined;

Copilot uses AI. Check for mistakes.
if (result) {
for (const item of result.inlineSuggestions.items) {
if (item.isInlineEdit || typeof item.insertText !== 'string') {
if (item.isInlineEdit || typeof item.insertText !== 'string' && item.insertText !== undefined) {
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

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

The condition typeof item.insertText !== 'string' && item.insertText !== undefined should use parentheses for clarity: (typeof item.insertText !== 'string' && item.insertText !== undefined)

Copilot uses AI. Check for mistakes.
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 24, 2025
lramos15
lramos15 previously approved these changes Oct 24, 2025
@bpasero
Copy link
Member

bpasero commented Oct 25, 2025

Red CI

@hediet hediet merged commit 13197dc into main Oct 27, 2025
28 checks passed
@hediet hediet deleted the hediet/b/crowded-silverfish branch October 27, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants