Skip to content

fix: gate chat textarea autocomplete on enableChatAutocomplete setting#328

Draft
markijbema wants to merge 1 commit intodevfrom
mark/fix-chat-autocomplete-gate
Draft

fix: gate chat textarea autocomplete on enableChatAutocomplete setting#328
markijbema wants to merge 1 commit intodevfrom
mark/fix-chat-autocomplete-gate

Conversation

@markijbema
Copy link
Contributor

Problem

The enableChatAutocomplete setting in AutocompleteTab.tsx is persisted via VS Code settings, but PromptInput.tsx always requests chat completions regardless of the setting value. The setting had no effect.

Fix

  • PromptInput.tsx now listens for autocompleteSettingsLoaded messages to track the enableChatAutocomplete value
  • Requests autocomplete settings on component init via requestAutocompleteSettings message
  • Gates requestAutocomplete() on the setting being enabled

Changes

  • webview-ui/src/components/chat/PromptInput.tsx: Added chatAutocompleteEnabled signal, settings listener, settings request, and early-return guard

PromptInput.tsx always requested chat completions regardless of the
enableChatAutocomplete setting value. Now it listens for the
autocompleteSettingsLoaded message, requests the settings on init,
and checks chatAutocompleteEnabled() before firing requestAutocomplete().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant