Skip to content

Conversation

alexdima
Copy link
Member

@alexdima alexdima commented Jun 15, 2021

Only when inline suggestions are visible:

  • quick suggestions will no longer auto-trigger.
    • As an emergency, there is a hidden setting editor.inlineSuggest.allowQuickSuggestions that can be set to true to get the old behavior.
  • trigger characters will no longer auto-trigger.
    • As an emergency, there is a hidden setting editor.inlineSuggest.allowSuggestOnTriggerCharacters that can be set to true to get the old behavior.

There is no change if inline suggestions are not visible.


Fixes https://github.com/microsoft/vscode-internalbacklog/issues/2208


  • Removes errornous trailing space in inlineSuggestionVisible context key (not detected in tests - it is only a bug when users want to use that key). This is important if users/copilot want to check if an inline suggestion is visible / use it in keybindings.
  • Activates controller when editor.inlineSuggest.enabled is changed. This is important when copilot sets this setting to true.

@alexdima alexdima added the candidate Issue identified as probable candidate for fixing in the next release label Jun 15, 2021
@alexdima alexdima added this to the May 2021 Recovery milestone Jun 15, 2021
@alexdima alexdima requested review from jrieken and hediet June 15, 2021 21:18
function shouldPreventQuickSuggest(contextKeyService: IContextKeyService, configurationService: IConfigurationService): boolean {
return (
Boolean(contextKeyService.getContextKeyValue<boolean>('inlineSuggestionVisible'))
&& !Boolean(configurationService.getValue<boolean>('editor.inlineSuggest.allowQuickSuggestions'))
Copy link
Member

Choose a reason for hiding this comment

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

For a small change you could be reading the config via the context key service, e.g config.editor.inlineSuggest.allowQuickSuggestions

Copy link
Member

Choose a reason for hiding this comment

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

Oh, each config is exposed as context key? Should we change that?

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine, it was more for fyi

@hediet hediet merged commit 2650c2e into release/1.57 Jun 16, 2021
@hediet hediet deleted the inline-suggest-prevent-auto-suggest branch June 16, 2021 08:28
@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
candidate Issue identified as probable candidate for fixing in the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants