opencode
opencode copied to clipboard
fix(tui): enable GitHub Copilot Enterprise authentication in /connect…
Problem
GitHub Copilot Enterprise authentication is missing in TUI /connect command. The CLI (auth login) supports enterprise login with deployment type selection and conditional prompts, but TUI /connect has no option for enterprise authentication at all.
Solution
Added enterprise authentication support to TUI /connect by implementing the same prompt collection logic as CLI:
- Added prompt collection loop to gather user inputs (deployment type, enterprise URL, etc.)
- Implemented conditional prompt logic for enterprise-specific fields
- OAuth callback now returns actual provider ID (
github-copilot-enterprisevsgithub-copilot)
Changes
- dialog-provider.tsx - Added prompt collection before authorization
- auth.ts, server.ts - Return actual provider ID from OAuth callback
-
dialog-model.tsx - Filter by
provider.idinstead ofmodel.providerID - provider.ts - Check both regular and enterprise auth for github-copilot plugin
Testing
- ✅
/connectwith GitHub Copilot (public) - ✅
/connectwith GitHub Copilot Enterprise - ✅ Enterprise models display correctly
Note: If these changes are approved, I will raise a separate PR for Desktop app support.
Before :
https://github.com/user-attachments/assets/b7c35429-771e-4443-ae0e-db90160cc12d
After :
https://github.com/user-attachments/assets/88673ad8-4bf1-4485-8fcf-9f8512ba1e72