ZIm/crates/language/src
Umesh Yadav b13144eb1f
copilot: Allow enterprise to sign in and use copilot (#32296)
This addresses:
https://github.com/zed-industries/zed/pull/32248#issuecomment-2952060834.

This PR address two main things one allowing enterprise users to use
copilot chat and completion while also introducing the new way to handle
copilot url specific their subscription. Simplifying the UX around the
github copilot and removes the burden of users figuring out what url to
use for their subscription.

- [x] Pass enterprise_uri to copilot lsp so that it can redirect users
to their enterprise server. Ref:
https://github.com/github/copilot-language-server-release#configuration-management
- [x] Remove the old ui and config language_models.copilot which allowed
users to specify their copilot_chat specific endpoint. We now derive
that automatically using token endpoint for copilot so that we can send
the requests to specific copilot endpoint for depending upon the url
returned by copilot server.
- [x] Tested this for checking the both enterprise and non-enterprise
flow work. Thanks to @theherk for the help to debug and test it.
- [ ] Udpdate the zed.dev/docs to refelect how to setup enterprise
copilot.

What this doesn't do at the moment:

* Currently zed doesn't allow to have two seperate accounts as the token
used in chat is same as the one generated by lsp. After this changes
also this behaviour remains same and users can't have both enterprise
and personal copilot installed.

P.S: Might need to do some bit of code cleanup and other things but
overall I felt this PR was ready for atleast first pass of review to
gather feedback around the implementation and code itself.


Release Notes:

- Add enterprise support for GitHub copilot

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-06-17 11:36:53 +02:00
..
syntax_map Add a test demonstrating ERB language loading bug (#32278) 2025-06-11 04:03:42 +00:00
buffer.rs language: Don't add final newline on format for an empty buffer (#32320) 2025-06-09 09:00:17 -04:00
buffer_tests.rs Add #[track_caller] to test utilities that involve marked text (#32043) 2025-06-04 02:37:27 +00:00
diagnostic_set.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
highlight_map.rs Docs for indent_size_for_line and co 2024-01-09 20:50:34 +01:00
language.rs Move r-a status into the activity indicator (#32726) 2025-06-13 22:33:02 +00:00
language_registry.rs Move r-a status into the activity indicator (#32726) 2025-06-13 22:33:02 +00:00
language_settings.rs copilot: Allow enterprise to sign in and use copilot (#32296) 2025-06-17 11:36:53 +02:00
manifest.rs python: Re-land usage of source file path in toolchain picker (#31893) 2025-06-02 16:29:06 +00:00
outline.rs Fix panic when outline items have no name (#24574) 2025-02-10 18:50:26 +00:00
proto.rs lsp: Implement support for the textDocument/diagnostic command (#19230) 2025-06-05 19:42:52 +00:00
syntax_map.rs Add a test demonstrating ERB language loading bug (#32278) 2025-06-11 04:03:42 +00:00
task_context.rs Add initial package.json scripts task autodetection (#32497) 2025-06-10 22:16:27 +00:00
text_diff.rs agent: Improve Gemini support in the edit_file tool (#31116) 2025-05-22 12:01:43 +03:00
toolchain.rs python: Re-land usage of source file path in toolchain picker (#31893) 2025-06-02 16:29:06 +00:00