Skip to content

decouple copilot completions from copilot chat (#14764)#14794

Merged
sharon-wang merged 4 commits into
mainfrom
port-copilot-completions-fixes-to-main
Jul 10, 2026
Merged

decouple copilot completions from copilot chat (#14764)#14794
sharon-wang merged 4 commits into
mainfrom
port-copilot-completions-fixes-to-main

Conversation

@sharon-wang

@sharon-wang sharon-wang commented Jul 9, 2026

Copy link
Copy Markdown
Member

Cherry-picks #14764 to main. Resolved some merge conflicts arising from changed upstream completions and auth related code, as well as some minor test fixes.

Closes #14369

  • ensures copilot completions are properly gated behind ai.enabled
  • confirms copilot completions are still enabled even when chat.disableAIFeatures is true
  • confirms copilot completions are disabled only with ai.enabled = false or github.copilot.enable = { "*": false }, or when github copilot is not auth'd with the provider modal
  • updates the chat.disableAIFeatures setting description to be more clear how it affects copilot chat and completions
    • image
  • keep status bar icon visible by default, but don't show chat info unless copilot chat is enabled
    • completions available and enabled
      • image
    • not auth'd with github
      • image
    • chat.disableAIFeatures = false + not auth'd with github
      • image
    • chat.disableAIFeatures = false + auth'd with github
      • image
  • status bar icon updates when ai.enabled and chat.disableAIFeatures change, without having to reload
  • isCompletionsOnlyMode indicates the default state where chat.disableAIFeatures = true, so only completions are applicable to the chat status
  • adds vitest coverage for isCompletionsOnlyMode (ai.enabled off, chat.disableAIFeatures = true, chat.disableAIFeatures = false) and for the ai.enabled gate in isCompletionsEnabled
  • adds a regression check that flipping chat.disableAIFeatures doesn't change inline completions
  • to use github copilot in positron for AI features, you must authenticate using the provider modal

Release Notes

Bug Fixes

Validation Steps

some cases

  • when ai.enabled is true, the status icon should not be present
  • regardless of chat.disableAIFeatures, the status icon should be present
  • see above screenshots for how the status bar popup should look with different settings configurations

What to test

@:assistant

github auth behaviour
  • signing into git source control or github pull requests in positron does not sign you into github for Assistant or Copilot Completions
  • copilot status icon indicates as such (shows signed out)
  • copilot models are not available in posit assistant chat
  • if you already logged into github for something else in positron, then use the provider modal to log into github, you'll get a consent check "can Authentication use your github account"
  • if you haven't logged into github at all, and you use the provider modal to log into github, you'll do the usual browser login flow
  • logging into github in the provider modal enables github completions and next edit suggestions, the github status bar icon shows enabled, and copilot models are available with posit assistant
github provider enablement behaviour
  • setting positron.assistant.provider.githubCopilot.enable to false and reloading positron disables copilot completions, makes the copilot status icon indicate disabled, and removes the github provider from the provider modal
  • setting ai.enabled to false disable copilot completions and copilot next edit suggestions (along with all the other ai functionality in positron)

sharon-wang and others added 2 commits July 9, 2026 10:01
)

Closes #14369

- ensures copilot completions are properly gated behind `ai.enabled`
- confirms copilot completions are still enabled even when
`chat.disableAIFeatures` is true
- confirms copilot completions are disabled only with `ai.enabled =
false` or `github.copilot.enable = { "*": false }`, or when github
copilot is not auth'd with the provider modal
- updates the `chat.disableAIFeatures` setting description to be more
clear how it affects copilot chat and completions
- <img width="428" height="97" alt="image"
src="https://github.com/user-attachments/assets/9a5f4e63-f96d-4445-8b4d-de7df93776d4"
/>
- keep status bar icon visible by default, but don't show chat info
unless copilot chat is enabled
    - completions available and enabled
- <img width="249" height="160" alt="image"
src="https://github.com/user-attachments/assets/870b190e-3676-4315-9a9b-4a0d829bd502"
/>
    - not auth'd with github
- <img width="171" height="91" alt="image"
src="https://github.com/user-attachments/assets/0bdc95cc-e7c3-4a39-aed9-1d7874ff724b"
/>
    - `chat.disableAIFeatures = false` + not auth'd with github
- <img width="198" height="212" alt="image"
src="https://github.com/user-attachments/assets/66217848-c6f6-48cd-a72c-11094fdfc851"
/>
    - `chat.disableAIFeatures = false` + auth'd with github
- <img width="249" height="225" alt="image"
src="https://github.com/user-attachments/assets/7c4eeed8-4200-4f08-b535-4ec0f2acbca4"
/>
- status bar icon updates when `ai.enabled` and `chat.disableAIFeatures`
change, without having to reload
- `isCompletionsOnlyMode` indicates the default state where
`chat.disableAIFeatures = true`, so only completions are applicable to
the chat status
- adds vitest coverage for `isCompletionsOnlyMode` (ai.enabled off,
`chat.disableAIFeatures = true`, `chat.disableAIFeatures = false`) and
for the `ai.enabled` gate in `isCompletionsEnabled`
- adds a regression check that flipping chat.disableAIFeatures doesn't
change inline completions
- to use github copilot in positron for AI features, you must
authenticate using the provider modal

- Show GitHub Copilot completions status icon by default (#14369)

some cases
- when `ai.enabled` is true, the status icon should not be present
- regardless of `chat.disableAIFeatures`, the status icon should be
present
- see above screenshots for how the status bar popup should look with
different settings configurations

---------

Co-authored-by: sharon wang <25834218+sharon-wang@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:assistant

Why these tags?
Tag Source
@:critical Always runs (required)
@:assistant PR description

More on automatic tags from changed files.

readme  valid tags

@sharon-wang sharon-wang requested a review from timtmok July 9, 2026 14:33
@midleman

midleman commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@sharon-wang - can you add a proper mapping (or [] if there isn't one) for the new src dir as listed in the E2E test comment on this PR? 🙏

@sharon-wang

Copy link
Copy Markdown
Member Author

@midleman yes thank you, just pushed 27aae9f to add the mapping!

sharon-wang added a commit that referenced this pull request Jul 9, 2026
test/e2e/tests/assistant/copilot-provider-disabled-status.test.ts is new
as of #14764 but it is flaking
on web

the copilot extension flakily doesn't activate in our web tests, so
let's just not run the copilot e2e tests on web

@:assistant

also made this change to
#14794

Co-authored-by: sharon wang <25834218+sharon-wang@users.noreply.github.com>

@timtmok timtmok left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@sharon-wang sharon-wang merged commit a569981 into main Jul 10, 2026
45 of 46 checks passed
@sharon-wang sharon-wang deleted the port-copilot-completions-fixes-to-main branch July 10, 2026 21:19
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assistant: keep copilot completions enabled when copilot chat is disabled

3 participants