ZIm/crates/language/src
Eli Kaplan a8d56877ee
copilot: Support HTTP/HTTPS proxy for Copilot language server (#24364)
Closes #6701 (one of the top ranking issues as of writing)

Adds the ability to specify an HTTP/HTTPS proxy to route Copilot code
completion API requests through. This should fix copilot functionality
in restricted network environments (where such a proxy is required) but
also opens up the ability to point copilot code completion requests at
your own local LLM, using e.g.:
- https://github.com/jjleng/copilot-proxy
- https://github.com/bernardo-bruning/ollama-copilot/tree/master

External MITM-proxy tools permitting, this can serve as a stop-gap to
allow local LLM code completion in Zed until a proper OpenAI-compatible
local code completions provider is implemented. With this in mind, in
this PR I've added separate `settings.json` variables to configure a
proxy server _specific to the code completions provider_ instead of
using the global `proxy` setting, to allow for cases like this where we
_only_ want to proxy e.g. the Copilot requests, but not all outgoing
traffic from the application.

Currently, two new settings are added:
- `inline_completions.copilot.proxy`: Proxy server URL (HTTP and HTTPS
schemes supported)
- `inline_completions.copilot.proxy_no_verify`: Whether to disable
certificate verification through the proxy

Example:
```js
"features": {
  "inline_completion_provider": "copilot"
},
"show_completions_on_input": true,
// New:
"inline_completions": {
  "copilot": {
    "proxy": "http://example.com:15432",
    "proxy_no_verify": true
  }
}
```


Release Notes:

- Added the ability to specify an HTTP/HTTPS proxy for Copilot.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-24 12:11:00 -05:00
..
syntax_map Bump Tree-sitter for bug fixes affecting YAML parser loaded via WASM (#25054) 2025-02-17 21:29:27 -08:00
buffer.rs Fix relative indentation when pasting content copied from outside Zed (#25300) 2025-02-21 01:25:33 +00:00
buffer_tests.rs Fix relative indentation when pasting content copied from outside Zed (#25300) 2025-02-21 01:25:33 +00:00
diagnostic_set.rs zeta: Send up diagnostics with prediction requests (#24384) 2025-02-06 18:07:26 +00:00
highlight_map.rs Docs for indent_size_for_line and co 2024-01-09 20:50:34 +01:00
language.rs html: Open extra newline between opening and closing HTML tags (#25130) 2025-02-20 01:09:19 -05:00
language_registry.rs cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103) 2025-02-18 20:30:33 +00:00
language_settings.rs copilot: Support HTTP/HTTPS proxy for Copilot language server (#24364) 2025-02-24 12:11:00 -05:00
outline.rs Fix panic when outline items have no name (#24574) 2025-02-10 18:50:26 +00:00
proto.rs Fix #24081 - lsp diagnostic code type conversion (#24347) 2025-02-05 21:23:46 -06:00
syntax_map.rs Revert "file_finder: Remove common segments of long paths in search results (#25049)" (#25163) 2025-02-19 15:32:29 +00:00
task_context.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
text_diff.rs Use line-based and word-based diff when reloading and formatting buffers (#25129) 2025-02-20 00:56:01 +00:00
toolchain.rs Fix missed renames in #22632 (#23688) 2025-01-26 23:37:34 +00:00