Follow-up to #6729. Repositories now compare by host as well, so acme/app on an Enterprise server and on github.com stay two remotes; the selector shows the host when remotes span hosts, and the saved choice is host/owner/name (an older owner/name still loads). connect passes the target's host and root to its own requests and switches the shared API host only after they succeed, so a failed switch no longer redirects the existing connection's requests. Remotes match an Enterprise host whatever its port, keeping gh's host:port for --hostname. Docs note that gh checks the server certificate against the system trust store.
Co-authored-by: wildcatDownstairs <[email protected]>
gh api does not take the host from the remote as gh pr does, so requests for an Enterprise repository went to github.com. GhApiRequest now carries an optional host passed as gh api --hostname (validated as host[:port]); the GitHub tool window sends the connected repository's host, availability reads the login on that host, and remotes on the host gh resolved count as GitHub remotes. Commit checks in the Git log keep github.com.
Fixes#6717
Co-authored-by: wildcatDownstairs <[email protected]>
A project can pin a GitHub CLI account in vcs.github.account (.openidea/settings.toml, a login, never a token), chosen in Settings > Version Control > GitHub or from the Pull Requests tool window header. With an account chosen, its token is resolved through gh and set as GH_TOKEN in the project environment for the project root and its agent worktrees; a .envrc GH_TOKEN still wins, and the token is cleared when the project closes or loses trust. Copilot keeps billing to its own account through COPILOT_GITHUB_TOKEN.
Automatic (the default) sets no GH_TOKEN and makes no GitHub calls on project open. When the settings page or the Pull Requests window asks for the status with several gh accounts signed in, the project's GitHub remote is probed to suggest a non-active account with access ("Use <login> for this project").
New commands: gh_project_account_status, gh_set_project_account. The gh account listing is shared with the Copilot account selector.
Co-authored-by: dengliu <[email protected]>
Registers the GitHub CLI as a managed tool (cli/cli release archives for
macOS / Linux / Windows on arm64 and x64, verified against the release's
checksums file), and offers Install GitHub CLI next to Download manually in
Pull Requests and Clone Repository > GitHub when gh is missing. An existing gh
(OPENIDEA_GH, PATH, Homebrew, Program Files, Snap) counts as installed, so no
duplicate is offered. gh is now looked up on each use instead of once per
process, so a copy installed while the IDE runs is picked up without a restart;
ide-github drops its `which` dependency for the shared tool_path lookup.
Co-authored-by: dengliu <[email protected]>
The JavaScript page still said there was no ESLint integration, no browser debugging and no Bun debugging, and the GitHub page said files couldn't be opened on GitHub or linked. Document the ESLint server, the JavaScript Debug configuration, bun-dap, Open In / Copy Path/Reference… for GitHub, GitLab and Bitbucket remotes, and the TypeScript inlay hints, in English and Chinese.