
This PR adds a new `CredentialsProvider` trait that abstracts over interacting with the system keychain. We had previously introduced a version of this scoped just to Zed auth in https://github.com/zed-industries/zed/pull/11505. However, after landing https://github.com/zed-industries/zed/pull/25123, we now have a similar issue with the credentials for language model providers that are also stored in the keychain (and thus also produce a spam of popups when running a development build of Zed). This PR takes the existing approach and makes it more generic, such that we can use it everywhere that we need to read/store credentials in the keychain. There are still two credential provider implementations: - `KeychainCredentialsProvider` will interact with the system keychain (using the existing GPUI APIs) - `DevelopmentCredentialsProvider` will use a local file on the file system We only use the `DevelopmentCredentialsProvider` when: 1. We are running a development build of Zed 2. The `ZED_DEVELOPMENT_AUTH` environment variable is set - I am considering removing the need for this and making it the default, but that will be explored in a follow-up PR. Release Notes: - N/A
68 lines
2 KiB
TOML
68 lines
2 KiB
TOML
[package]
|
|
name = "client"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
path = "src/client.rs"
|
|
doctest = false
|
|
|
|
[features]
|
|
test-support = ["clock/test-support", "collections/test-support", "gpui/test-support", "rpc/test-support"]
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
async-recursion = "0.3"
|
|
async-tungstenite = { workspace = true, features = ["async-std", "async-tls"] }
|
|
chrono = { workspace = true, features = ["serde"] }
|
|
clock.workspace = true
|
|
collections.workspace = true
|
|
credentials_provider.workspace = true
|
|
feature_flags.workspace = true
|
|
futures.workspace = true
|
|
gpui.workspace = true
|
|
http_client.workspace = true
|
|
log.workspace = true
|
|
paths.workspace = true
|
|
parking_lot.workspace = true
|
|
postage.workspace = true
|
|
rand.workspace = true
|
|
release_channel.workspace = true
|
|
rpc = { workspace = true, features = ["gpui"] }
|
|
schemars.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
settings.workspace = true
|
|
sha2.workspace = true
|
|
smol.workspace = true
|
|
telemetry_events.workspace = true
|
|
text.workspace = true
|
|
thiserror.workspace = true
|
|
time.workspace = true
|
|
tiny_http = "0.8"
|
|
tokio-socks = { version = "0.5.2", default-features = false, features = ["futures-io"] }
|
|
url.workspace = true
|
|
util.workspace = true
|
|
worktree.workspace = true
|
|
telemetry.workspace = true
|
|
|
|
[dev-dependencies]
|
|
clock = { workspace = true, features = ["test-support"] }
|
|
collections = { workspace = true, features = ["test-support"] }
|
|
gpui = { workspace = true, features = ["test-support"] }
|
|
rpc = { workspace = true, features = ["test-support"] }
|
|
settings = { workspace = true, features = ["test-support"] }
|
|
util = { workspace = true, features = ["test-support"] }
|
|
http_client = { workspace = true, features = ["test-support"] }
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
windows.workspace = true
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
cocoa.workspace = true
|
|
async-native-tls = { version = "0.5.0", features = ["vendored"] }
|