Skip to content

Commit 744e0e9

Browse files
lj3954AidanVimumesh18bennetboagu-z
authored andcommitted
language_models: Dynamically detect Copilot Chat models (zed-industries#29027)
I noticed the discussion in zed-industries#28881, and had thought of exactly the same a few days prior. This implementation should preserve existing functionality fairly well. I've added a dependency (serde_with) to allow the deserializer to skip models which cannot be deserialized, which could occur if a future provider, for instance, is added. Without this modification, such a change could break all models. If extra dependencies aren't desired, a manual implementation could be used instead. - Closes zed-industries#29369 Release Notes: - Dynamically detect available Copilot Chat models, including all models with tool support --------- Co-authored-by: AidanV <aidanvanduyne@gmail.com> Co-authored-by: imumesh18 <umesh4257@gmail.com> Co-authored-by: Bennet Bo Fenner <bennet@zed.dev> Co-authored-by: Agus Zubiaga <hi@aguz.me>
1 parent 9cad3fa commit 744e0e9

File tree

5 files changed

+318
-180
lines changed

5 files changed

+318
-180
lines changed

Cargo.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/copilot/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ doctest = false
1414

1515
[features]
1616
default = []
17-
schemars = ["dep:schemars"]
1817
test-support = [
1918
"collections/test-support",
2019
"gpui/test-support",
@@ -43,16 +42,15 @@ node_runtime.workspace = true
4342
parking_lot.workspace = true
4443
paths.workspace = true
4544
project.workspace = true
46-
schemars = { workspace = true, optional = true }
4745
serde.workspace = true
4846
serde_json.workspace = true
4947
settings.workspace = true
50-
strum.workspace = true
5148
task.workspace = true
5249
ui.workspace = true
5350
util.workspace = true
5451
workspace.workspace = true
5552
workspace-hack.workspace = true
53+
itertools.workspace = true
5654

5755
[target.'cfg(windows)'.dependencies]
5856
async-std = { version = "1.12.0", features = ["unstable"] }

0 commit comments

Comments
 (0)