
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>
82 lines
2.4 KiB
TOML
82 lines
2.4 KiB
TOML
[package]
|
|
name = "copilot"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
path = "src/copilot.rs"
|
|
doctest = false
|
|
|
|
[features]
|
|
default = []
|
|
schemars = ["dep:schemars"]
|
|
test-support = [
|
|
"collections/test-support",
|
|
"gpui/test-support",
|
|
"language/test-support",
|
|
"lsp/test-support",
|
|
"settings/test-support",
|
|
"util/test-support",
|
|
]
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
async-compression.workspace = true
|
|
async-tar.workspace = true
|
|
chrono.workspace = true
|
|
client.workspace = true
|
|
collections.workspace = true
|
|
command_palette_hooks.workspace = true
|
|
fs.workspace = true
|
|
futures.workspace = true
|
|
gpui.workspace = true
|
|
http_client.workspace = true
|
|
inline_completion.workspace = true
|
|
language.workspace = true
|
|
log.workspace = true
|
|
lsp.workspace = true
|
|
menu.workspace = true
|
|
node_runtime.workspace = true
|
|
parking_lot.workspace = true
|
|
paths.workspace = true
|
|
project.workspace = true
|
|
schemars = { workspace = true, optional = true }
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
settings.workspace = true
|
|
smol.workspace = true
|
|
strum.workspace = true
|
|
task.workspace = true
|
|
ui.workspace = true
|
|
util.workspace = true
|
|
workspace.workspace = true
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
async-std = { version = "1.12.0", features = ["unstable"] }
|
|
|
|
[dev-dependencies]
|
|
client = { workspace = true, features = ["test-support"] }
|
|
clock = { workspace = true, features = ["test-support"] }
|
|
collections = { workspace = true, features = ["test-support"] }
|
|
ctor.workspace = true
|
|
editor = { workspace = true, features = ["test-support"] }
|
|
env_logger.workspace = true
|
|
fs = { workspace = true, features = ["test-support"] }
|
|
gpui = { workspace = true, features = ["test-support"] }
|
|
http_client = { workspace = true, features = ["test-support"] }
|
|
indoc.workspace = true
|
|
language = { workspace = true, features = ["test-support"] }
|
|
lsp = { workspace = true, features = ["test-support"] }
|
|
node_runtime = { workspace = true, features = ["test-support"] }
|
|
project = { workspace = true, features = ["test-support"] }
|
|
rpc = { workspace = true, features = ["test-support"] }
|
|
serde_json.workspace = true
|
|
settings = { workspace = true, features = ["test-support"] }
|
|
theme = { workspace = true, features = ["test-support"] }
|
|
util = { workspace = true, features = ["test-support"] }
|
|
workspace = { workspace = true, features = ["test-support"] }
|