copilot_chat: Support data-resident GitHub Enterprise (#63128)

GitHub Enterprise Cloud with Data Residency requires API requests to use
the tenant-specific `api.<subdomain>.ghe.com` hostname. Copilot Chat
previously treated configured enterprise hosts like GHES, which produced
an unsupported `/api/graphql` URL, and stored all OAuth credentials
under the same GitHub.com key.

Use the GHE.com API hostname shape for configured enterprise tenants and
scope stored credentials by GitHub hostname. Changing the configured
host now clears active authentication state and loads credentials for
the new tenant, with guards against stale asynchronous loads.

Enterprise endpoint discovery failures are now surfaced instead of
silently falling back to the public Copilot endpoint. GitHub.com retains
its existing endpoint and fallback behavior.

Release Notes:

- Fixed GitHub Copilot Chat authentication and API routing for GitHub
Enterprise Cloud
fdfd00e44eBennet Bo Fenner committed on 8/24/2026, 12:16:38 PM· committed by GitHubparent99b0ed6
1 file changedLine totals unavailable