Skip to content

Conversation

@planger
Copy link
Contributor

@planger planger commented Jan 16, 2026

What it does

Introduces a new @theia/ai-copilot package that integrates GitHub Copilot as a language model provider in Theia's AI framework. This allows users to authenticate with their GitHub Copilot subscription and use Copilot models (e.g., GPT-4o, Claude 3.5 Sonnet) through Theia's AI features.

Therefore, we add:

  • OAuth device flow authentication with GitHub
  • Language model implementation using Copilot's chat completions API
  • Status bar indicator showing authentication state
  • Commands for login/logout and model management
  • Preferences for configuring available Copilot models

How to test

  1. Build and start the browser example: npm run build:browser && npm run start:browser
  2. Check the status bar - you should see a "Copilot" indicator showing "Not signed in"
  3. Click the status bar item or run command "Copilot: Sign In"
  4. A dialog appears with a device code - click the link to open GitHub's device authorization page
  5. Enter the code and authorize the application
  6. The dialog should update to show "Authenticated" and the status bar should reflect the signed-in state
  7. Open AI agent configuration - Copilot models should now be available as language models for your agent
  8. Test the models by using any AI feature (e.g., AI chat) with a Copilot model selected

Note: The OAuth flow currently uses a GitHub App registered in the EclipseSource organization. We need this GitHub App just for authentication, no access is required or resources are shared. Before merging, this should be changed to an app owned by eclipse-theia under the Eclipse Foundation. This PR is primarily to get the discussion rolling and enable testing of the draft implementation.

Note: Obviously this will only work, if your Github user has access to the Copilot features (i.e. an active Copilot suscription).

Follow-ups

  • Register GitHub App under Eclipse Foundation / eclipse-theia organization
  • Add support for Copilot-specific features (e.g., code completions API)
  • Add more comprehensive error handling for API rate limits

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

Introduce `@theia/ai-copilot` package that enables using GitHub Copilot
as a language model provider in Theia. The integration includes:

- OAuth device flow authentication with GitHub
- Language model implementation using Copilot's chat API
- Status bar indicator for authentication state
- Commands for login/logout and model management
- Preferences for configuring available Copilot models
@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Jan 16, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

New @theia Package(s) Detected

This PR adds the following new package(s): ai-copilot

Please ensure the following checklist items are completed before merging:

@ndoschek ndoschek self-requested a review January 22, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

2 participants