Skip to content

Conversation

@Tyriar
Copy link
Member

@Tyriar Tyriar commented Dec 26, 2025

Part of #284277

@Tyriar Tyriar added this to the December / January 2026 milestone Dec 26, 2025
@Tyriar Tyriar self-assigned this Dec 26, 2025
Copilot AI review requested due to automatic review settings December 26, 2025 00:09
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 updates the terminal suggest status bar to add new actions for controlling IntelliSense behavior and adds icon support to the suggest widget status bar. The changes include refactoring the configuration schema to support boolean values for quickSuggestions, changing default values for suggest settings, and adding new menu actions with icons.

Key Changes

  • Added icon support to SuggestWidgetStatus through a new ISuggestWidgetStatusOptions interface
  • Changed quickSuggestions configuration to accept boolean or object values, with a new normalization function
  • Changed configuration defaults: quickSuggestions from object to false, suggestOnTriggerCharacters from true to false
  • Reorganized terminal suggest status bar menu with new actions for toggling selection modes and IntelliSense visibility

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
suggestWidgetStatus.ts Added ISuggestWidgetStatusOptions interface and updated constructor to support icon display via allowIcons option
simpleSuggestWidget.ts Updated two instances of SuggestWidgetStatus instantiation to pass { allowIcons: true } option
suggestWidget.ts Updated SuggestWidgetStatus instantiation to pass { allowIcons: true } option
terminalSuggestConfiguration.ts Changed quickSuggestions type to accept boolean or object, added normalizeQuickSuggestionsConfig function, changed defaults for quickSuggestions and suggestOnTriggerCharacters to false
terminal.suggest.ts Added six new command IDs for selection mode changes and show/hide IntelliSense actions
terminalSuggestAddon.ts Updated to use normalizeQuickSuggestionsConfig when reading quickSuggestions configuration
terminal.suggest.contribution.ts Refactored status bar actions: added three selection mode toggle actions, two show/hide IntelliSense actions with icons, reorganized existing actions into right group with icons, removed menu entry from AcceptSelectedSuggestion action

Comment on lines +336 to +357
icon: Codicon.eye,
menu: {
id: MenuId.MenubarTerminalSuggestStatusMenu,
group: 'right',
order: 1
order: 1,
when: ContextKeyExpr.and(
ContextKeyExpr.equals(`config.${TerminalSuggestSettingId.QuickSuggestions}`, true),
ContextKeyExpr.equals(`config.${TerminalSuggestSettingId.SuggestOnTriggerCharacters}`, true),
),
},
run: (c, accessor) => accessor.get(IPreferencesService).openSettings({ query: terminalSuggestConfigSection })
run: (c, accessor) => {
accessor.get(IConfigurationService).updateValue(TerminalSuggestSettingId.QuickSuggestions, false);
accessor.get(IConfigurationService).updateValue(TerminalSuggestSettingId.SuggestOnTriggerCharacters, false);
}
});

registerTerminalAction({
id: TerminalSuggestCommandId.ShowOnType,
title: localize2('workbench.action.terminal.showSuggestOnType', 'Show IntelliSense while typing'),
f1: false,
precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), TerminalContextKeys.focus, TerminalContextKeys.isOpen, TerminalContextKeys.suggestWidgetVisible),
icon: Codicon.eyeClosed,
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

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

The icon usage appears reversed. 'DoNotShowOnType' uses 'Codicon.eye' (typically meaning 'visible/show'), while 'ShowOnType' uses 'Codicon.eyeClosed' (typically meaning 'hidden/hide'). The icons should be swapped to match their semantic meaning.

Copilot uses AI. Check for mistakes.
},
}
],
default: false,
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

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

The default value for quickSuggestions changed from an object to false, which is a breaking change that will disable IntelliSense for existing users who haven't explicitly configured this setting. This may negatively impact the user experience. Consider migrating existing configurations or documenting this as a breaking change.

Suggested change
default: false,
default: {
commands: 'on',
arguments: 'on',
unknown: 'on'
},

Copilot uses AI. Check for mistakes.
},
[TerminalSuggestSettingId.SuggestOnTriggerCharacters]: {
restricted: true,
markdownDescription: localize('suggest.suggestOnTriggerCharacters', "Controls whether suggestions should automatically show up when typing trigger characters."),
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

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

The default value for suggestOnTriggerCharacters changed from true to false, which is a breaking change that will disable trigger character suggestions for existing users. This change should be documented or consider providing a migration path for existing users.

Suggested change
markdownDescription: localize('suggest.suggestOnTriggerCharacters', "Controls whether suggestions should automatically show up when typing trigger characters."),
markdownDescription: localize('suggest.suggestOnTriggerCharacters', "Controls whether suggestions should automatically show up when typing trigger characters. This is disabled by default; set this to `true` to restore trigger character suggestions if they were previously enabled."),

Copilot uses AI. Check for mistakes.
order: 1
order: 1,
when: ContextKeyExpr.and(
ContextKeyExpr.equals(`config.${TerminalSuggestSettingId.QuickSuggestions}`, true),
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

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

The menu condition checks if quickSuggestions equals true, but quickSuggestions can be either a boolean or an object. When it's an object like {commands: 'on', arguments: 'on', unknown: 'off'}, this condition will fail even though IntelliSense is enabled. The condition should handle both boolean and object values, or the menu logic needs to be updated to work with the normalized config value.

Suggested change
ContextKeyExpr.equals(`config.${TerminalSuggestSettingId.QuickSuggestions}`, true),
ContextKeyExpr.notEquals(`config.${TerminalSuggestSettingId.QuickSuggestions}`, false),

Copilot uses AI. Check for mistakes.
Comment on lines +363 to +364
ContextKeyExpr.notEquals(`config.${TerminalSuggestSettingId.QuickSuggestions}`, true),
ContextKeyExpr.notEquals(`config.${TerminalSuggestSettingId.SuggestOnTriggerCharacters}`, true),
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

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

Similar to the DoNotShowOnType action, this menu condition uses notEquals to check for true, which won't work correctly when quickSuggestions is an object. This will cause the ShowOnType action to appear even when IntelliSense is enabled via object configuration.

Suggested change
ContextKeyExpr.notEquals(`config.${TerminalSuggestSettingId.QuickSuggestions}`, true),
ContextKeyExpr.notEquals(`config.${TerminalSuggestSettingId.SuggestOnTriggerCharacters}`, true),
ContextKeyExpr.equals(`config.${TerminalSuggestSettingId.QuickSuggestions}`, false),
ContextKeyExpr.equals(`config.${TerminalSuggestSettingId.SuggestOnTriggerCharacters}`, false),

Copilot uses AI. Check for mistakes.
id: TerminalSuggestCommandId.ConfigureSettings,
title: localize2('workbench.action.terminal.configureSuggestSettings', 'Configure'),
id: TerminalSuggestCommandId.ChangeSelectionModeNever,
title: localize2('workbench.action.terminal.changeSelectionMode.never', 'Change Keybinding: None'),
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

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

The action title 'Change Keybinding: None' is misleading. This action is visible when the selection mode is 'never', but clicking it sets the mode to 'partial'. The title should reflect what the action does (e.g., 'Use Tab to Accept Suggestions') rather than describing the current state.

Suggested change
title: localize2('workbench.action.terminal.changeSelectionMode.never', 'Change Keybinding: None'),
title: localize2('workbench.action.terminal.changeSelectionMode.never', "Use Tab to Accept Suggestions"),

Copilot uses AI. Check for mistakes.
});
registerTerminalAction({
id: TerminalSuggestCommandId.ChangeSelectionModePartial,
title: localize2('workbench.action.terminal.changeSelectionMode.partial', 'Change Keybinding: Tab'),
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

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

Similar to the previous action, this title describes the current state ('Change Keybinding: Tab') but the action sets the mode to 'always'. The title should describe what will happen when clicked (e.g., 'Use Tab + Enter to Accept Suggestions').

Suggested change
title: localize2('workbench.action.terminal.changeSelectionMode.partial', 'Change Keybinding: Tab'),
title: localize2('workbench.action.terminal.changeSelectionMode.partial', 'Use Tab and Enter to Accept Suggestions'),

Copilot uses AI. Check for mistakes.
});
registerTerminalAction({
id: TerminalSuggestCommandId.ChangeSelectionModeAlways,
title: localize2('workbench.action.terminal.changeSelectionMode.always', 'Change Keybinding: Tab + Enter'),
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

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

This title describes the current state ('Change Keybinding: Tab + Enter') but the action sets the mode to 'never'. The title should describe what will happen when clicked (e.g., 'Disable Tab/Enter for Accepting Suggestions').

Suggested change
title: localize2('workbench.action.terminal.changeSelectionMode.always', 'Change Keybinding: Tab + Enter'),
title: localize2('workbench.action.terminal.changeSelectionMode.always', 'Disable Tab/Enter For Accepting Suggestions'),

Copilot uses AI. Check for mistakes.
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.

2 participants