Update http crate name (#15041)

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-07-23 15:01:05 -07:00 committed by GitHub
parent d36ebc8c74
commit 855048041d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
89 changed files with 184 additions and 180 deletions

102
Cargo.lock generated
View File

@ -248,7 +248,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures 0.3.28", "futures 0.3.28",
"http 0.1.0", "http_client",
"isahc", "isahc",
"schemars", "schemars",
"serde", "serde",
@ -392,7 +392,7 @@ dependencies = [
"gpui", "gpui",
"heed", "heed",
"html_to_markdown 0.1.0", "html_to_markdown 0.1.0",
"http 0.1.0", "http_client",
"indexed_docs", "indexed_docs",
"indoc", "indoc",
"language", "language",
@ -955,7 +955,7 @@ dependencies = [
"db", "db",
"editor", "editor",
"gpui", "gpui",
"http 0.1.0", "http_client",
"isahc", "isahc",
"log", "log",
"markdown_preview", "markdown_preview",
@ -1876,7 +1876,7 @@ dependencies = [
"fs", "fs",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"language", "language",
"live_kit_client", "live_kit_client",
"log", "log",
@ -2104,7 +2104,7 @@ dependencies = [
"collections", "collections",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"language", "language",
"log", "log",
"rand 0.8.5", "rand 0.8.5",
@ -2315,8 +2315,7 @@ dependencies = [
"fs", "fs",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"isahc",
"lazy_static", "lazy_static",
"log", "log",
"once_cell", "once_cell",
@ -2434,7 +2433,7 @@ dependencies = [
"gpui", "gpui",
"headless", "headless",
"hex", "hex",
"http 0.1.0", "http_client",
"indoc", "indoc",
"language", "language",
"language_model", "language_model",
@ -2507,7 +2506,7 @@ dependencies = [
"futures 0.3.28", "futures 0.3.28",
"fuzzy", "fuzzy",
"gpui", "gpui",
"http 0.1.0", "http_client",
"language", "language",
"lazy_static", "lazy_static",
"menu", "menu",
@ -2704,7 +2703,7 @@ dependencies = [
"fs", "fs",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"indoc", "indoc",
"language", "language",
"lsp", "lsp",
@ -3537,7 +3536,7 @@ dependencies = [
"fuzzy", "fuzzy",
"git", "git",
"gpui", "gpui",
"http 0.1.0", "http_client",
"indoc", "indoc",
"itertools 0.11.0", "itertools 0.11.0",
"language", "language",
@ -3860,7 +3859,7 @@ dependencies = [
"fs", "fs",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"indexed_docs", "indexed_docs",
"isahc", "isahc",
"language", "language",
@ -3901,7 +3900,7 @@ dependencies = [
"env_logger", "env_logger",
"extension", "extension",
"fs", "fs",
"http 0.1.0", "http_client",
"language", "language",
"log", "log",
"rpc", "rpc",
@ -4019,7 +4018,7 @@ dependencies = [
"editor", "editor",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"human_bytes", "human_bytes",
"isahc", "isahc",
"language", "language",
@ -4624,7 +4623,7 @@ dependencies = [
"derive_more", "derive_more",
"git2", "git2",
"gpui", "gpui",
"http 0.1.0", "http_client",
"lazy_static", "lazy_static",
"log", "log",
"parking_lot", "parking_lot",
@ -4664,7 +4663,7 @@ dependencies = [
"futures 0.3.28", "futures 0.3.28",
"git", "git",
"gpui", "gpui",
"http 0.1.0", "http_client",
"isahc", "isahc",
"pretty_assertions", "pretty_assertions",
"regex", "regex",
@ -4748,7 +4747,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures 0.3.28", "futures 0.3.28",
"http 0.1.0", "http_client",
"serde", "serde",
"serde_json", "serde_json",
] ]
@ -4818,7 +4817,7 @@ dependencies = [
"foreign-types 0.5.0", "foreign-types 0.5.0",
"futures 0.3.28", "futures 0.3.28",
"gpui_macros", "gpui_macros",
"http 0.1.0", "http_client",
"image", "image",
"itertools 0.11.0", "itertools 0.11.0",
"lazy_static", "lazy_static",
@ -5180,21 +5179,6 @@ dependencies = [
"regex", "regex",
] ]
[[package]]
name = "http"
version = "0.1.0"
dependencies = [
"anyhow",
"derive_more",
"futures 0.3.28",
"futures-lite 1.13.0",
"isahc",
"log",
"serde",
"serde_json",
"url",
]
[[package]] [[package]]
name = "http" name = "http"
version = "0.2.9" version = "0.2.9"
@ -5234,6 +5218,22 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f"
[[package]]
name = "http_client"
version = "0.1.0"
dependencies = [
"anyhow",
"derive_more",
"futures 0.3.28",
"futures-lite 1.13.0",
"http 1.0.0",
"isahc",
"log",
"serde",
"serde_json",
"url",
]
[[package]] [[package]]
name = "httparse" name = "httparse"
version = "1.8.0" version = "1.8.0"
@ -5437,7 +5437,7 @@ dependencies = [
"gpui", "gpui",
"heed", "heed",
"html_to_markdown 0.1.0", "html_to_markdown 0.1.0",
"http 0.1.0", "http_client",
"indexmap 1.9.3", "indexmap 1.9.3",
"indoc", "indoc",
"parking_lot", "parking_lot",
@ -5877,7 +5877,7 @@ dependencies = [
"git", "git",
"globset", "globset",
"gpui", "gpui",
"http 0.1.0", "http_client",
"indoc", "indoc",
"itertools 0.11.0", "itertools 0.11.0",
"lazy_static", "lazy_static",
@ -5929,7 +5929,7 @@ dependencies = [
"feature_flags", "feature_flags",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"language", "language",
"log", "log",
"menu", "menu",
@ -6004,7 +6004,7 @@ dependencies = [
"feature_flags", "feature_flags",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"language", "language",
"lazy_static", "lazy_static",
"log", "log",
@ -6771,7 +6771,7 @@ dependencies = [
"async-trait", "async-trait",
"async_zip", "async_zip",
"futures 0.3.28", "futures 0.3.28",
"http 0.1.0", "http_client",
"log", "log",
"paths", "paths",
"semver", "semver",
@ -7110,7 +7110,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures 0.3.28", "futures 0.3.28",
"http 0.1.0", "http_client",
"isahc", "isahc",
"schemars", "schemars",
"serde", "serde",
@ -7181,7 +7181,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures 0.3.28", "futures 0.3.28",
"http 0.1.0", "http_client",
"isahc", "isahc",
"schemars", "schemars",
"serde", "serde",
@ -7986,7 +7986,7 @@ dependencies = [
"git2", "git2",
"globset", "globset",
"gpui", "gpui",
"http 0.1.0", "http_client",
"itertools 0.11.0", "itertools 0.11.0",
"language", "language",
"log", "log",
@ -8631,7 +8631,7 @@ dependencies = [
"fs", "fs",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"language", "language",
"log", "log",
"node_runtime", "node_runtime",
@ -8679,7 +8679,7 @@ dependencies = [
"env_logger", "env_logger",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"image", "image",
"language", "language",
"log", "log",
@ -9438,7 +9438,7 @@ dependencies = [
"futures-batch", "futures-batch",
"gpui", "gpui",
"heed", "heed",
"http 0.1.0", "http_client",
"language", "language",
"languages", "languages",
"log", "log",
@ -10395,7 +10395,7 @@ dependencies = [
"env_logger", "env_logger",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"language", "language",
"log", "log",
"postage", "postage",
@ -10417,7 +10417,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures 0.3.28", "futures 0.3.28",
"http 0.1.0", "http_client",
"paths", "paths",
"serde", "serde",
"serde_json", "serde_json",
@ -10827,7 +10827,7 @@ dependencies = [
"ctor", "ctor",
"env_logger", "env_logger",
"gpui", "gpui",
"http 0.1.0", "http_client",
"lazy_static", "lazy_static",
"log", "log",
"parking_lot", "parking_lot",
@ -11093,7 +11093,7 @@ dependencies = [
"extensions_ui", "extensions_ui",
"feedback", "feedback",
"gpui", "gpui",
"http 0.1.0", "http_client",
"notifications", "notifications",
"pretty_assertions", "pretty_assertions",
"project", "project",
@ -13320,7 +13320,7 @@ dependencies = [
"fs", "fs",
"futures 0.3.28", "futures 0.3.28",
"gpui", "gpui",
"http 0.1.0", "http_client",
"itertools 0.11.0", "itertools 0.11.0",
"language", "language",
"lazy_static", "lazy_static",
@ -13357,7 +13357,7 @@ dependencies = [
"git", "git",
"git2", "git2",
"gpui", "gpui",
"http 0.1.0", "http_client",
"ignore", "ignore",
"language", "language",
"log", "log",
@ -13646,7 +13646,7 @@ dependencies = [
"go_to_line", "go_to_line",
"gpui", "gpui",
"headless", "headless",
"http 0.1.0", "http_client",
"image_viewer", "image_viewer",
"inline_completion_button", "inline_completion_button",
"install_cli", "install_cli",

View File

@ -44,7 +44,7 @@ members = [
"crates/gpui_macros", "crates/gpui_macros",
"crates/headless", "crates/headless",
"crates/html_to_markdown", "crates/html_to_markdown",
"crates/http", "crates/http_client",
"crates/image_viewer", "crates/image_viewer",
"crates/indexed_docs", "crates/indexed_docs",
"crates/inline_completion_button", "crates/inline_completion_button",
@ -167,6 +167,7 @@ assets = { path = "crates/assets" }
assistant = { path = "crates/assistant" } assistant = { path = "crates/assistant" }
assistant_slash_command = { path = "crates/assistant_slash_command" } assistant_slash_command = { path = "crates/assistant_slash_command" }
assistant_tooling = { path = "crates/assistant_tooling" } assistant_tooling = { path = "crates/assistant_tooling" }
async-tungstenite = { version = "0.23" }
audio = { path = "crates/audio" } audio = { path = "crates/audio" }
auto_update = { path = "crates/auto_update" } auto_update = { path = "crates/auto_update" }
breadcrumbs = { path = "crates/breadcrumbs" } breadcrumbs = { path = "crates/breadcrumbs" }
@ -203,7 +204,7 @@ gpui = { path = "crates/gpui" }
gpui_macros = { path = "crates/gpui_macros" } gpui_macros = { path = "crates/gpui_macros" }
headless = { path = "crates/headless" } headless = { path = "crates/headless" }
html_to_markdown = { path = "crates/html_to_markdown" } html_to_markdown = { path = "crates/html_to_markdown" }
http = { path = "crates/http" } http_client = { path = "crates/http_client" }
image_viewer = { path = "crates/image_viewer" } image_viewer = { path = "crates/image_viewer" }
indexed_docs = { path = "crates/indexed_docs" } indexed_docs = { path = "crates/indexed_docs" }
inline_completion_button = { path = "crates/inline_completion_button" } inline_completion_button = { path = "crates/inline_completion_button" }

View File

@ -18,7 +18,7 @@ path = "src/anthropic.rs"
[dependencies] [dependencies]
anyhow.workspace = true anyhow.workspace = true
futures.workspace = true futures.workspace = true
http.workspace = true http_client.workspace = true
isahc.workspace = true isahc.workspace = true
schemars = { workspace = true, optional = true } schemars = { workspace = true, optional = true }
serde.workspace = true serde.workspace = true

View File

@ -1,6 +1,6 @@
use anyhow::{anyhow, Result}; use anyhow::{anyhow, Result};
use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt}; use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt};
use http::{AsyncBody, HttpClient, Method, Request as HttpRequest}; use http_client::{AsyncBody, HttpClient, Method, Request as HttpRequest};
use isahc::config::Configurable; use isahc::config::Configurable;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::{convert::TryFrom, time::Duration}; use std::{convert::TryFrom, time::Duration};

View File

@ -41,7 +41,7 @@ fuzzy.workspace = true
gpui.workspace = true gpui.workspace = true
heed.workspace = true heed.workspace = true
html_to_markdown.workspace = true html_to_markdown.workspace = true
http.workspace = true http_client.workspace = true
indexed_docs.workspace = true indexed_docs.workspace = true
indoc.workspace = true indoc.workspace = true
language.workspace = true language.workspace = true

View File

@ -10,7 +10,7 @@ use assistant_slash_command::{
use futures::AsyncReadExt; use futures::AsyncReadExt;
use gpui::{AppContext, Task, WeakView}; use gpui::{AppContext, Task, WeakView};
use html_to_markdown::{convert_html_to_markdown, markdown, TagHandler}; use html_to_markdown::{convert_html_to_markdown, markdown, TagHandler};
use http::{AsyncBody, HttpClient, HttpClientWithUrl}; use http_client::{AsyncBody, HttpClient, HttpClientWithUrl};
use language::LspAdapterDelegate; use language::LspAdapterDelegate;
use ui::prelude::*; use ui::prelude::*;
use workspace::Workspace; use workspace::Workspace;

View File

@ -18,7 +18,7 @@ client.workspace = true
db.workspace = true db.workspace = true
editor.workspace = true editor.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
isahc.workspace = true isahc.workspace = true
log.workspace = true log.workspace = true
markdown_preview.workspace = true markdown_preview.workspace = true

View File

@ -20,7 +20,7 @@ use smol::{fs, io::AsyncReadExt};
use settings::{Settings, SettingsSources, SettingsStore}; use settings::{Settings, SettingsSources, SettingsStore};
use smol::{fs::File, process::Command}; use smol::{fs::File, process::Command};
use http::{HttpClient, HttpClientWithUrl}; use http_client::{HttpClient, HttpClientWithUrl};
use release_channel::{AppCommitSha, AppVersion, ReleaseChannel}; use release_channel::{AppCommitSha, AppVersion, ReleaseChannel};
use std::{ use std::{
env::{ env::{

View File

@ -51,4 +51,4 @@ language = { workspace = true, features = ["test-support"] }
live_kit_client = { workspace = true, features = ["test-support"] } live_kit_client = { workspace = true, features = ["test-support"] }
project = { workspace = true, features = ["test-support"] } project = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }

View File

@ -40,4 +40,4 @@ rpc = { workspace = true, features = ["test-support"] }
client = { workspace = true, features = ["test-support"] } client = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }

View File

@ -4,7 +4,7 @@ use super::*;
use client::{test::FakeServer, Client, UserStore}; use client::{test::FakeServer, Client, UserStore};
use clock::FakeSystemClock; use clock::FakeSystemClock;
use gpui::{AppContext, Context, Model, SemanticVersion, TestAppContext}; use gpui::{AppContext, Context, Model, SemanticVersion, TestAppContext};
use http::FakeHttpClient; use http_client::FakeHttpClient;
use rpc::proto::{self}; use rpc::proto::{self};
use settings::SettingsStore; use settings::SettingsStore;

View File

@ -18,7 +18,7 @@ test-support = ["clock/test-support", "collections/test-support", "gpui/test-sup
[dependencies] [dependencies]
anyhow.workspace = true anyhow.workspace = true
async-recursion = "0.3" async-recursion = "0.3"
async-tungstenite = { version = "0.23", features = ["async-std", "async-native-tls"] } async-tungstenite = { workspace = true, features = ["async-std", "async-native-tls"] }
chrono = { workspace = true, features = ["serde"] } chrono = { workspace = true, features = ["serde"] }
clock.workspace = true clock.workspace = true
collections.workspace = true collections.workspace = true
@ -26,7 +26,7 @@ feature_flags.workspace = true
fs.workspace = true fs.workspace = true
futures.workspace = true futures.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
lazy_static.workspace = true lazy_static.workspace = true
log.workspace = true log.workspace = true
once_cell.workspace = true once_cell.workspace = true
@ -60,12 +60,11 @@ gpui = { workspace = true, features = ["test-support"] }
rpc = { workspace = true, features = ["test-support"] } rpc = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }
[target.'cfg(target_os = "windows")'.dependencies] [target.'cfg(target_os = "windows")'.dependencies]
windows.workspace = true windows.workspace = true
[target.'cfg(target_os = "macos")'.dependencies] [target.'cfg(target_os = "macos")'.dependencies]
cocoa.workspace = true cocoa.workspace = true
isahc = { workspace = true, features = ["static-curl"] }
async-native-tls = { version = "0.5.0", features = ["vendored"] } async-native-tls = { version = "0.5.0", features = ["vendored"] }

View File

@ -20,7 +20,7 @@ use futures::{
use gpui::{ use gpui::{
actions, AnyModel, AnyWeakModel, AppContext, AsyncAppContext, Global, Model, Task, WeakModel, actions, AnyModel, AnyWeakModel, AppContext, AsyncAppContext, Global, Model, Task, WeakModel,
}; };
use http::{HttpClient, HttpClientWithUrl}; use http_client::{AsyncBody, HttpClient, HttpClientWithUrl};
use lazy_static::lazy_static; use lazy_static::lazy_static;
use parking_lot::RwLock; use parking_lot::RwLock;
use postage::watch; use postage::watch;
@ -233,7 +233,7 @@ pub enum EstablishConnectionError {
#[error("{0}")] #[error("{0}")]
Other(#[from] anyhow::Error), Other(#[from] anyhow::Error),
#[error("{0}")] #[error("{0}")]
Http(#[from] http::Error), Http(#[from] http_client::Error),
#[error("{0}")] #[error("{0}")]
Io(#[from] std::io::Error), Io(#[from] std::io::Error),
#[error("{0}")] #[error("{0}")]
@ -1351,7 +1351,7 @@ impl Client {
let mut url = self.rpc_url(http.clone(), None).await?; let mut url = self.rpc_url(http.clone(), None).await?;
url.set_path("/user"); url.set_path("/user");
url.set_query(Some(&format!("github_login={login}"))); url.set_query(Some(&format!("github_login={login}")));
let request = Request::get(url.as_str()) let request: http_client::Request<AsyncBody> = Request::get(url.as_str())
.header("Authorization", format!("token {api_token}")) .header("Authorization", format!("token {api_token}"))
.body("".into())?; .body("".into())?;
@ -1783,7 +1783,7 @@ mod tests {
use clock::FakeSystemClock; use clock::FakeSystemClock;
use gpui::{BackgroundExecutor, Context, TestAppContext}; use gpui::{BackgroundExecutor, Context, TestAppContext};
use http::FakeHttpClient; use http_client::FakeHttpClient;
use parking_lot::Mutex; use parking_lot::Mutex;
use proto::TypedEnvelope; use proto::TypedEnvelope;
use settings::SettingsStore; use settings::SettingsStore;

View File

@ -6,7 +6,7 @@ use clock::SystemClock;
use collections::{HashMap, HashSet}; use collections::{HashMap, HashSet};
use futures::Future; use futures::Future;
use gpui::{AppContext, BackgroundExecutor, Task}; use gpui::{AppContext, BackgroundExecutor, Task};
use http::{self, HttpClient, HttpClientWithUrl, Method}; use http_client::{self, HttpClient, HttpClientWithUrl, Method};
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use parking_lot::Mutex; use parking_lot::Mutex;
use release_channel::ReleaseChannel; use release_channel::ReleaseChannel;
@ -632,7 +632,7 @@ impl Telemetry {
let checksum = calculate_json_checksum(&json_bytes).unwrap_or("".to_string()); let checksum = calculate_json_checksum(&json_bytes).unwrap_or("".to_string());
let request = http::Request::builder() let request = http_client::Request::builder()
.method(Method::POST) .method(Method::POST)
.uri( .uri(
this.http_client this.http_client
@ -661,7 +661,7 @@ mod tests {
use chrono::TimeZone; use chrono::TimeZone;
use clock::FakeSystemClock; use clock::FakeSystemClock;
use gpui::TestAppContext; use gpui::TestAppContext;
use http::FakeHttpClient; use http_client::FakeHttpClient;
#[gpui::test] #[gpui::test]
fn test_telemetry_flush_on_max_queue_size(cx: &mut TestAppContext) { fn test_telemetry_flush_on_max_queue_size(cx: &mut TestAppContext) {

View File

@ -20,7 +20,7 @@ test-support = ["sqlite"]
[dependencies] [dependencies]
anthropic.workspace = true anthropic.workspace = true
anyhow.workspace = true anyhow.workspace = true
async-tungstenite = "0.23" async-tungstenite.workspace = true
aws-config = { version = "1.1.5" } aws-config = { version = "1.1.5" }
aws-sdk-s3 = { version = "1.15.0" } aws-sdk-s3 = { version = "1.15.0" }
axum = { version = "0.6", features = ["json", "headers", "ws"] } axum = { version = "0.6", features = ["json", "headers", "ws"] }
@ -35,7 +35,7 @@ envy = "0.4.2"
futures.workspace = true futures.workspace = true
google_ai.workspace = true google_ai.workspace = true
hex.workspace = true hex.workspace = true
http.workspace = true http_client.workspace = true
live_kit_server.workspace = true live_kit_server.workspace = true
log.workspace = true log.workspace = true
nanoid.workspace = true nanoid.workspace = true

View File

@ -42,7 +42,7 @@ use futures::{
stream::FuturesUnordered, stream::FuturesUnordered,
FutureExt, SinkExt, StreamExt, TryStreamExt, FutureExt, SinkExt, StreamExt, TryStreamExt,
}; };
use http::IsahcHttpClient; use http_client::IsahcHttpClient;
use prometheus::{register_int_gauge, IntGauge}; use prometheus::{register_int_gauge, IntGauge};
use rpc::{ use rpc::{
proto::{ proto::{

View File

@ -19,7 +19,7 @@ use fs::FakeFs;
use futures::{channel::oneshot, StreamExt as _}; use futures::{channel::oneshot, StreamExt as _};
use git::GitHostingProviderRegistry; use git::GitHostingProviderRegistry;
use gpui::{BackgroundExecutor, Context, Model, Task, TestAppContext, View, VisualTestContext}; use gpui::{BackgroundExecutor, Context, Model, Task, TestAppContext, View, VisualTestContext};
use http::FakeHttpClient; use http_client::FakeHttpClient;
use language::LanguageRegistry; use language::LanguageRegistry;
use node_runtime::FakeNodeRuntime; use node_runtime::FakeNodeRuntime;
use notifications::NotificationStore; use notifications::NotificationStore;

View File

@ -25,7 +25,7 @@ test-support = [
"settings/test-support", "settings/test-support",
"util/test-support", "util/test-support",
"workspace/test-support", "workspace/test-support",
"http/test-support", "http_client/test-support",
] ]
[dependencies] [dependencies]
@ -80,5 +80,5 @@ rpc = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] }
tree-sitter-markdown.workspace = true tree-sitter-markdown.workspace = true
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] } workspace = { workspace = true, features = ["test-support"] }

View File

@ -32,7 +32,7 @@ command_palette_hooks.workspace = true
editor.workspace = true editor.workspace = true
futures.workspace = true futures.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
language.workspace = true language.workspace = true
lsp.workspace = true lsp.workspace = true
menu.workspace = true menu.workspace = true
@ -65,4 +65,4 @@ rpc = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] }
theme = { workspace = true, features = ["test-support"] } theme = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }

View File

@ -12,8 +12,8 @@ use gpui::{
actions, AppContext, AsyncAppContext, Context, Entity, EntityId, EventEmitter, Global, Model, actions, AppContext, AsyncAppContext, Context, Entity, EntityId, EventEmitter, Global, Model,
ModelContext, Task, WeakModel, ModelContext, Task, WeakModel,
}; };
use http::github::latest_github_release; use http_client::github::latest_github_release;
use http::HttpClient; use http_client::HttpClient;
use language::{ use language::{
language_settings::{all_language_settings, language_settings, InlineCompletionProvider}, language_settings::{all_language_settings, language_settings, InlineCompletionProvider},
point_from_lsp, point_to_lsp, Anchor, Bias, Buffer, BufferSnapshot, Language, PointUtf16, point_from_lsp, point_to_lsp, Anchor, Bias, Buffer, BufferSnapshot, Language, PointUtf16,
@ -393,7 +393,7 @@ impl Copilot {
Default::default(), Default::default(),
cx.to_async(), cx.to_async(),
); );
let http = http::FakeHttpClient::create(|_| async { unreachable!() }); let http = http_client::FakeHttpClient::create(|_| async { unreachable!() });
let node_runtime = FakeNodeRuntime::new(); let node_runtime = FakeNodeRuntime::new();
let this = cx.new_model(|cx| Self { let this = cx.new_model(|cx| Self {
server_id: LanguageServerId(0), server_id: LanguageServerId(0),

View File

@ -43,7 +43,7 @@ futures.workspace = true
fuzzy.workspace = true fuzzy.workspace = true
git.workspace = true git.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
indoc.workspace = true indoc.workspace = true
itertools.workspace = true itertools.workspace = true
language.workspace = true language.workspace = true
@ -98,4 +98,4 @@ tree-sitter-typescript.workspace = true
unindent.workspace = true unindent.workspace = true
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] } workspace = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }

View File

@ -7,7 +7,7 @@ use git::{
parse_git_remote_url, GitHostingProvider, GitHostingProviderRegistry, Oid, PullRequest, parse_git_remote_url, GitHostingProvider, GitHostingProviderRegistry, Oid, PullRequest,
}; };
use gpui::{Model, ModelContext, Subscription, Task}; use gpui::{Model, ModelContext, Subscription, Task};
use http::HttpClient; use http_client::HttpClient;
use language::{markdown, Bias, Buffer, BufferSnapshot, Edit, LanguageRegistry, ParsedMarkdown}; use language::{markdown, Bias, Buffer, BufferSnapshot, Edit, LanguageRegistry, ParsedMarkdown};
use multi_buffer::MultiBufferRow; use multi_buffer::MultiBufferRow;
use project::{Item, Project}; use project::{Item, Project};

View File

@ -27,7 +27,7 @@ collections.workspace = true
fs.workspace = true fs.workspace = true
futures.workspace = true futures.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
indexed_docs.workspace = true indexed_docs.workspace = true
isahc.workspace = true isahc.workspace = true
language.workspace = true language.workspace = true

View File

@ -6,7 +6,7 @@ use async_compression::futures::bufread::GzipDecoder;
use async_tar::Archive; use async_tar::Archive;
use futures::io::BufReader; use futures::io::BufReader;
use futures::AsyncReadExt; use futures::AsyncReadExt;
use http::{self, AsyncBody, HttpClient}; use http_client::{self, AsyncBody, HttpClient};
use serde::Deserialize; use serde::Deserialize;
use std::{ use std::{
env, fs, mem, env, fs, mem,

View File

@ -33,7 +33,7 @@ use gpui::{
actions, AppContext, AsyncAppContext, Context, EventEmitter, Global, Model, ModelContext, Task, actions, AppContext, AsyncAppContext, Context, EventEmitter, Global, Model, ModelContext, Task,
WeakModel, WeakModel,
}; };
use http::{AsyncBody, HttpClient, HttpClientWithUrl}; use http_client::{AsyncBody, HttpClient, HttpClientWithUrl};
use indexed_docs::{IndexedDocsRegistry, ProviderId}; use indexed_docs::{IndexedDocsRegistry, ProviderId};
use language::{ use language::{
LanguageConfig, LanguageMatcher, LanguageQueries, LanguageRegistry, QUERY_FILENAME_PREFIXES, LanguageConfig, LanguageMatcher, LanguageQueries, LanguageRegistry, QUERY_FILENAME_PREFIXES,
@ -244,7 +244,7 @@ impl ExtensionStore {
installed_dir, installed_dir,
index_path, index_path,
builder: Arc::new(ExtensionBuilder::new( builder: Arc::new(ExtensionBuilder::new(
http::client(http_client.proxy().cloned()), ::http_client::client(http_client.proxy().cloned()),
build_dir, build_dir,
)), )),
outstanding_operations: Default::default(), outstanding_operations: Default::default(),

View File

@ -11,7 +11,7 @@ use collections::BTreeMap;
use fs::{FakeFs, Fs, RealFs}; use fs::{FakeFs, Fs, RealFs};
use futures::{io::BufReader, AsyncReadExt, StreamExt}; use futures::{io::BufReader, AsyncReadExt, StreamExt};
use gpui::{Context, SemanticVersion, TestAppContext}; use gpui::{Context, SemanticVersion, TestAppContext};
use http::{FakeHttpClient, Response}; use http_client::{FakeHttpClient, Response};
use indexed_docs::IndexedDocsRegistry; use indexed_docs::IndexedDocsRegistry;
use language::{LanguageMatcher, LanguageRegistry, LanguageServerBinaryStatus, LanguageServerName}; use language::{LanguageMatcher, LanguageRegistry, LanguageServerBinaryStatus, LanguageServerName};
use node_runtime::FakeNodeRuntime; use node_runtime::FakeNodeRuntime;

View File

@ -13,7 +13,7 @@ use futures::{
Future, FutureExt, StreamExt as _, Future, FutureExt, StreamExt as _,
}; };
use gpui::{AppContext, AsyncAppContext, BackgroundExecutor, Task}; use gpui::{AppContext, AsyncAppContext, BackgroundExecutor, Task};
use http::HttpClient; use http_client::HttpClient;
use language::LanguageRegistry; use language::LanguageRegistry;
use node_runtime::NodeRuntime; use node_runtime::NodeRuntime;
use release_channel::ReleaseChannel; use release_channel::ReleaseChannel;

View File

@ -1,4 +1,5 @@
use crate::wasm_host::{wit::ToWasmtimeResult, WasmState}; use crate::wasm_host::{wit::ToWasmtimeResult, WasmState};
use ::http_client::AsyncBody;
use ::settings::Settings; use ::settings::Settings;
use anyhow::{anyhow, bail, Context, Result}; use anyhow::{anyhow, bail, Context, Result};
use async_compression::futures::bufread::GzipDecoder; use async_compression::futures::bufread::GzipDecoder;
@ -6,7 +7,6 @@ use async_tar::Archive;
use async_trait::async_trait; use async_trait::async_trait;
use futures::AsyncReadExt; use futures::AsyncReadExt;
use futures::{io::BufReader, FutureExt as _}; use futures::{io::BufReader, FutureExt as _};
use http::AsyncBody;
use indexed_docs::IndexedDocsDatabase; use indexed_docs::IndexedDocsDatabase;
use language::{ use language::{
language_settings::AllLanguageSettings, LanguageServerBinaryStatus, LspAdapterDelegate, language_settings::AllLanguageSettings, LanguageServerBinaryStatus, LspAdapterDelegate,
@ -209,8 +209,8 @@ impl nodejs::Host for WasmState {
#[async_trait] #[async_trait]
impl lsp::Host for WasmState {} impl lsp::Host for WasmState {}
impl From<http::github::GithubRelease> for github::GithubRelease { impl From<::http_client::github::GithubRelease> for github::GithubRelease {
fn from(value: http::github::GithubRelease) -> Self { fn from(value: ::http_client::github::GithubRelease) -> Self {
Self { Self {
version: value.tag_name, version: value.tag_name,
assets: value.assets.into_iter().map(Into::into).collect(), assets: value.assets.into_iter().map(Into::into).collect(),
@ -218,8 +218,8 @@ impl From<http::github::GithubRelease> for github::GithubRelease {
} }
} }
impl From<http::github::GithubReleaseAsset> for github::GithubReleaseAsset { impl From<::http_client::github::GithubReleaseAsset> for github::GithubReleaseAsset {
fn from(value: http::github::GithubReleaseAsset) -> Self { fn from(value: ::http_client::github::GithubReleaseAsset) -> Self {
Self { Self {
name: value.name, name: value.name,
download_url: value.browser_download_url, download_url: value.browser_download_url,
@ -235,7 +235,7 @@ impl github::Host for WasmState {
options: github::GithubReleaseOptions, options: github::GithubReleaseOptions,
) -> wasmtime::Result<Result<github::GithubRelease, String>> { ) -> wasmtime::Result<Result<github::GithubRelease, String>> {
maybe!(async { maybe!(async {
let release = http::github::latest_github_release( let release = ::http_client::github::latest_github_release(
&repo, &repo,
options.require_assets, options.require_assets,
options.pre_release, options.pre_release,
@ -254,9 +254,12 @@ impl github::Host for WasmState {
tag: String, tag: String,
) -> wasmtime::Result<Result<github::GithubRelease, String>> { ) -> wasmtime::Result<Result<github::GithubRelease, String>> {
maybe!(async { maybe!(async {
let release = let release = ::http_client::github::get_release_by_tag_name(
http::github::get_release_by_tag_name(&repo, &tag, self.host.http_client.clone()) &repo,
.await?; &tag,
self.host.http_client.clone(),
)
.await?;
Ok(release.into()) Ok(release.into())
}) })
.await .await

View File

@ -18,7 +18,7 @@ clap = { workspace = true, features = ["derive"] }
env_logger.workspace = true env_logger.workspace = true
extension = { workspace = true, features = ["no-webrtc"] } extension = { workspace = true, features = ["no-webrtc"] }
fs.workspace = true fs.workspace = true
http.workspace = true http_client.workspace = true
language.workspace = true language.workspace = true
log.workspace = true log.workspace = true
rpc.workspace = true rpc.workspace = true

View File

@ -7,13 +7,13 @@ use std::{
}; };
use ::fs::{copy_recursive, CopyOptions, Fs, RealFs}; use ::fs::{copy_recursive, CopyOptions, Fs, RealFs};
use ::http_client::HttpClientWithProxy;
use anyhow::{anyhow, bail, Context, Result}; use anyhow::{anyhow, bail, Context, Result};
use clap::Parser; use clap::Parser;
use extension::{ use extension::{
extension_builder::{CompileExtensionOptions, ExtensionBuilder}, extension_builder::{CompileExtensionOptions, ExtensionBuilder},
ExtensionManifest, ExtensionManifest,
}; };
use http::HttpClientWithProxy;
use language::LanguageConfig; use language::LanguageConfig;
use theme::ThemeRegistry; use theme::ThemeRegistry;
use tree_sitter::{Language, Query, WasmStore}; use tree_sitter::{Language, Query, WasmStore};

View File

@ -24,7 +24,7 @@ futures.workspace = true
gpui.workspace = true gpui.workspace = true
human_bytes = "0.4.1" human_bytes = "0.4.1"
isahc.workspace = true isahc.workspace = true
http.workspace = true http_client.workspace = true
language.workspace = true language.workspace = true
log.workspace = true log.workspace = true
menu.workspace = true menu.workspace = true

View File

@ -10,7 +10,7 @@ use gpui::{
div, rems, AppContext, DismissEvent, EventEmitter, FocusHandle, FocusableView, Model, div, rems, AppContext, DismissEvent, EventEmitter, FocusHandle, FocusableView, Model,
PromptLevel, Render, Task, View, ViewContext, PromptLevel, Render, Task, View, ViewContext,
}; };
use http::HttpClient; use http_client::HttpClient;
use isahc::Request; use isahc::Request;
use language::Buffer; use language::Buffer;
use project::Project; use project::Project;

View File

@ -19,7 +19,7 @@ collections.workspace = true
derive_more.workspace = true derive_more.workspace = true
git2.workspace = true git2.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
lazy_static.workspace = true lazy_static.workspace = true
log.workspace = true log.workspace = true
parking_lot.workspace = true parking_lot.workspace = true

View File

@ -5,7 +5,7 @@ use async_trait::async_trait;
use collections::BTreeMap; use collections::BTreeMap;
use derive_more::{Deref, DerefMut}; use derive_more::{Deref, DerefMut};
use gpui::{AppContext, Global}; use gpui::{AppContext, Global};
use http::HttpClient; use http_client::HttpClient;
use parking_lot::RwLock; use parking_lot::RwLock;
use url::Url; use url::Url;

View File

@ -17,7 +17,7 @@ async-trait.workspace = true
futures.workspace = true futures.workspace = true
git.workspace = true git.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
isahc.workspace = true isahc.workspace = true
regex.workspace = true regex.workspace = true
serde.workspace = true serde.workspace = true

View File

@ -3,7 +3,7 @@ use std::sync::Arc;
use anyhow::{bail, Context, Result}; use anyhow::{bail, Context, Result};
use async_trait::async_trait; use async_trait::async_trait;
use futures::AsyncReadExt; use futures::AsyncReadExt;
use http::HttpClient; use http_client::HttpClient;
use isahc::config::Configurable; use isahc::config::Configurable;
use isahc::{AsyncBody, Request}; use isahc::{AsyncBody, Request};
use serde::Deserialize; use serde::Deserialize;

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, OnceLock};
use anyhow::{bail, Context, Result}; use anyhow::{bail, Context, Result};
use async_trait::async_trait; use async_trait::async_trait;
use futures::AsyncReadExt; use futures::AsyncReadExt;
use http::HttpClient; use http_client::HttpClient;
use isahc::config::Configurable; use isahc::config::Configurable;
use isahc::{AsyncBody, Request}; use isahc::{AsyncBody, Request};
use regex::Regex; use regex::Regex;

View File

@ -11,6 +11,6 @@ path = "src/google_ai.rs"
[dependencies] [dependencies]
anyhow.workspace = true anyhow.workspace = true
futures.workspace = true futures.workspace = true
http.workspace = true http_client.workspace = true
serde.workspace = true serde.workspace = true
serde_json.workspace = true serde_json.workspace = true

View File

@ -2,7 +2,7 @@ use std::sync::Arc;
use anyhow::{anyhow, Result}; use anyhow::{anyhow, Result};
use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt}; use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt};
use http::HttpClient; use http_client::HttpClient;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
pub const API_URL: &str = "https://generativelanguage.googleapis.com"; pub const API_URL: &str = "https://generativelanguage.googleapis.com";

View File

@ -16,7 +16,7 @@ test-support = [
"backtrace", "backtrace",
"collections/test-support", "collections/test-support",
"util/test-support", "util/test-support",
"http/test-support", "http_client/test-support",
] ]
runtime_shaders = [] runtime_shaders = []
macos-blade = ["blade-graphics", "blade-macros", "blade-util", "bytemuck"] macos-blade = ["blade-graphics", "blade-macros", "blade-util", "bytemuck"]
@ -41,7 +41,7 @@ etagere = "0.2"
futures.workspace = true futures.workspace = true
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7" } font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7" }
gpui_macros.workspace = true gpui_macros.workspace = true
http.workspace = true http_client.workspace = true
image = "0.25.1" image = "0.25.1"
itertools.workspace = true itertools.workspace = true
lazy_static.workspace = true lazy_static.workspace = true
@ -79,7 +79,7 @@ waker-fn = "1.1.0"
backtrace = "0.3" backtrace = "0.3"
collections = { workspace = true, features = ["test-support"] } collections = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }
unicode-segmentation.workspace = true unicode-segmentation.workspace = true
[build-dependencies] [build-dependencies]

View File

@ -18,7 +18,7 @@ use smol::future::FutureExt;
pub use async_context::*; pub use async_context::*;
use collections::{FxHashMap, FxHashSet, VecDeque}; use collections::{FxHashMap, FxHashSet, VecDeque};
pub use entity_map::*; pub use entity_map::*;
use http::{self, HttpClient}; use http_client::HttpClient;
pub use model_context::*; pub use model_context::*;
#[cfg(any(test, feature = "test-support"))] #[cfg(any(test, feature = "test-support"))]
pub use test_context::*; pub use test_context::*;
@ -114,7 +114,7 @@ impl App {
Self(AppContext::new( Self(AppContext::new(
current_platform(false), current_platform(false),
Arc::new(()), Arc::new(()),
http::client(None), http_client::client(None),
)) ))
} }
@ -125,7 +125,7 @@ impl App {
Self(AppContext::new( Self(AppContext::new(
current_platform(true), current_platform(true),
Arc::new(()), Arc::new(()),
http::client(None), http_client::client(None),
)) ))
} }

View File

@ -104,7 +104,7 @@ impl TestAppContext {
let foreground_executor = ForegroundExecutor::new(arc_dispatcher); let foreground_executor = ForegroundExecutor::new(arc_dispatcher);
let platform = TestPlatform::new(background_executor.clone(), foreground_executor.clone()); let platform = TestPlatform::new(background_executor.clone(), foreground_executor.clone());
let asset_source = Arc::new(()); let asset_source = Arc::new(());
let http_client = http::FakeHttpClient::with_404_response(); let http_client = http_client::FakeHttpClient::with_404_response();
let text_system = Arc::new(TextSystem::new(platform.text_system())); let text_system = Arc::new(TextSystem::new(platform.text_system()));
Self { Self {

View File

@ -13,7 +13,7 @@ use image::{ImageBuffer, ImageError};
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
use media::core_video::CVImageBuffer; use media::core_video::CVImageBuffer;
use http; use http_client;
use thiserror::Error; use thiserror::Error;
use util::ResultExt; use util::ResultExt;
@ -413,7 +413,7 @@ impl Asset for Image {
pub enum ImageCacheError { pub enum ImageCacheError {
/// An error that occurred while fetching an image from a remote source. /// An error that occurred while fetching an image from a remote source.
#[error("http error: {0}")] #[error("http error: {0}")]
Client(#[from] http::Error), Client(#[from] http_client::Error),
/// An error that occurred while reading the image from disk. /// An error that occurred while reading the image from disk.
#[error("IO error: {0}")] #[error("IO error: {0}")]
Io(Arc<std::io::Error>), Io(Arc<std::io::Error>),
@ -423,7 +423,7 @@ pub enum ImageCacheError {
/// The URI of the image. /// The URI of the image.
uri: SharedUri, uri: SharedUri,
/// The HTTP status code. /// The HTTP status code.
status: http::StatusCode, status: http_client::StatusCode,
/// The HTTP response body. /// The HTTP response body.
body: String, body: String,
}, },

View File

@ -11,7 +11,7 @@ use calloop_wayland_source::WaylandSource;
use collections::HashMap; use collections::HashMap;
use filedescriptor::Pipe; use filedescriptor::Pipe;
use http::Url; use http_client::Url;
use smallvec::SmallVec; use smallvec::SmallVec;
use util::ResultExt; use util::ResultExt;
use wayland_backend::client::ObjectId; use wayland_backend::client::ObjectId;

View File

@ -1,5 +1,5 @@
[package] [package]
name = "http" name = "http_client"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
publish = false publish = false
@ -12,10 +12,11 @@ workspace = true
test-support = [] test-support = []
[lib] [lib]
path = "src/http.rs" path = "src/http_client.rs"
doctest = true doctest = true
[dependencies] [dependencies]
http = "1.0.0"
anyhow.workspace = true anyhow.workspace = true
derive_more.workspace = true derive_more.workspace = true
futures.workspace = true futures.workspace = true

View File

@ -22,7 +22,7 @@ fuzzy.workspace = true
gpui.workspace = true gpui.workspace = true
heed.workspace = true heed.workspace = true
html_to_markdown.workspace = true html_to_markdown.workspace = true
http.workspace = true http_client.workspace = true
indexmap.workspace = true indexmap.workspace = true
parking_lot.workspace = true parking_lot.workspace = true
paths.workspace = true paths.workspace = true

View File

@ -13,7 +13,7 @@ use async_trait::async_trait;
use collections::{HashSet, VecDeque}; use collections::{HashSet, VecDeque};
use fs::Fs; use fs::Fs;
use futures::{AsyncReadExt, FutureExt}; use futures::{AsyncReadExt, FutureExt};
use http::{AsyncBody, HttpClient, HttpClientWithUrl}; use http_client::{AsyncBody, HttpClient, HttpClientWithUrl};
use crate::{IndexedDocsDatabase, IndexedDocsProvider, PackageName, ProviderId}; use crate::{IndexedDocsDatabase, IndexedDocsProvider, PackageName, ProviderId};

View File

@ -35,7 +35,7 @@ fuzzy.workspace = true
git.workspace = true git.workspace = true
globset.workspace = true globset.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
itertools.workspace = true itertools.workspace = true
lazy_static.workspace = true lazy_static.workspace = true
log.workspace = true log.workspace = true
@ -84,4 +84,4 @@ tree-sitter-rust.workspace = true
tree-sitter-typescript.workspace = true tree-sitter-typescript.workspace = true
unindent.workspace = true unindent.workspace = true
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }

View File

@ -27,7 +27,7 @@ use collections::{HashMap, HashSet};
use futures::Future; use futures::Future;
use gpui::{AppContext, AsyncAppContext, Model, SharedString, Task}; use gpui::{AppContext, AsyncAppContext, Model, SharedString, Task};
pub use highlight_map::HighlightMap; pub use highlight_map::HighlightMap;
use http::HttpClient; use http_client::HttpClient;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use lsp::{CodeActionKind, LanguageServerBinary}; use lsp::{CodeActionKind, LanguageServerBinary};
use parking_lot::Mutex; use parking_lot::Mutex;

View File

@ -29,7 +29,7 @@ editor.workspace = true
feature_flags.workspace = true feature_flags.workspace = true
futures.workspace = true futures.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
menu.workspace = true menu.workspace = true
ollama = { workspace = true, features = ["schemars"] } ollama = { workspace = true, features = ["schemars"] }
open_ai = { workspace = true, features = ["schemars"] } open_ai = { workspace = true, features = ["schemars"] }

View File

@ -7,7 +7,7 @@ use gpui::{
AnyView, AppContext, AsyncAppContext, FontStyle, Subscription, Task, TextStyle, View, AnyView, AppContext, AsyncAppContext, FontStyle, Subscription, Task, TextStyle, View,
WhiteSpace, WhiteSpace,
}; };
use http::HttpClient; use http_client::HttpClient;
use settings::{Settings, SettingsStore}; use settings::{Settings, SettingsStore};
use std::{sync::Arc, time::Duration}; use std::{sync::Arc, time::Duration};
use strum::IntoEnumIterator; use strum::IntoEnumIterator;

View File

@ -8,7 +8,7 @@ use crate::{
LanguageModelProviderName, LanguageModelProviderState, LanguageModelRequest, LanguageModelProviderName, LanguageModelProviderState, LanguageModelRequest,
}; };
use gpui::{AnyView, AppContext, AsyncAppContext, Task}; use gpui::{AnyView, AppContext, AsyncAppContext, Task};
use http::Result; use http_client::Result;
use ui::WindowContext; use ui::WindowContext;
pub fn language_model_id() -> LanguageModelId { pub fn language_model_id() -> LanguageModelId {

View File

@ -1,7 +1,7 @@
use anyhow::{anyhow, Result}; use anyhow::{anyhow, Result};
use futures::{future::BoxFuture, stream::BoxStream, FutureExt, StreamExt}; use futures::{future::BoxFuture, stream::BoxStream, FutureExt, StreamExt};
use gpui::{AnyView, AppContext, AsyncAppContext, ModelContext, Subscription, Task}; use gpui::{AnyView, AppContext, AsyncAppContext, ModelContext, Subscription, Task};
use http::HttpClient; use http_client::HttpClient;
use ollama::{get_models, stream_chat_completion, ChatMessage, ChatOptions, ChatRequest}; use ollama::{get_models, stream_chat_completion, ChatMessage, ChatOptions, ChatRequest};
use settings::{Settings, SettingsStore}; use settings::{Settings, SettingsStore};
use std::{sync::Arc, time::Duration}; use std::{sync::Arc, time::Duration};

View File

@ -6,7 +6,7 @@ use gpui::{
AnyView, AppContext, AsyncAppContext, FontStyle, Subscription, Task, TextStyle, View, AnyView, AppContext, AsyncAppContext, FontStyle, Subscription, Task, TextStyle, View,
WhiteSpace, WhiteSpace,
}; };
use http::HttpClient; use http_client::HttpClient;
use open_ai::{stream_completion, Request, RequestMessage}; use open_ai::{stream_completion, Request, RequestMessage};
use settings::{Settings, SettingsStore}; use settings::{Settings, SettingsStore};
use std::{sync::Arc, time::Duration}; use std::{sync::Arc, time::Duration};

View File

@ -20,7 +20,7 @@ collections.workspace = true
feature_flags.workspace = true feature_flags.workspace = true
futures.workspace = true futures.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
language.workspace = true language.workspace = true
lazy_static.workspace = true lazy_static.workspace = true
log.workspace = true log.workspace = true

View File

@ -2,7 +2,7 @@ use anyhow::{anyhow, bail, Context, Result};
use async_trait::async_trait; use async_trait::async_trait;
use futures::StreamExt; use futures::StreamExt;
use gpui::AsyncAppContext; use gpui::AsyncAppContext;
use http::github::{latest_github_release, GitHubLspBinaryVersion}; use http_client::github::{latest_github_release, GitHubLspBinaryVersion};
pub use language::*; pub use language::*;
use lsp::LanguageServerBinary; use lsp::LanguageServerBinary;
use project::project_settings::{BinarySettings, ProjectSettings}; use project::project_settings::{BinarySettings, ProjectSettings};

View File

@ -2,7 +2,7 @@ use anyhow::{anyhow, Context, Result};
use async_trait::async_trait; use async_trait::async_trait;
use futures::StreamExt; use futures::StreamExt;
use gpui::{AppContext, AsyncAppContext, Task}; use gpui::{AppContext, AsyncAppContext, Task};
use http::github::latest_github_release; use http_client::github::latest_github_release;
pub use language::*; pub use language::*;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use lsp::LanguageServerBinary; use lsp::LanguageServerBinary;

View File

@ -6,7 +6,7 @@ use collections::HashMap;
use feature_flags::FeatureFlagAppExt; use feature_flags::FeatureFlagAppExt;
use futures::StreamExt; use futures::StreamExt;
use gpui::{AppContext, AsyncAppContext}; use gpui::{AppContext, AsyncAppContext};
use http::github::{latest_github_release, GitHubLspBinaryVersion}; use http_client::github::{latest_github_release, GitHubLspBinaryVersion};
use language::{LanguageRegistry, LanguageServerName, LspAdapter, LspAdapterDelegate}; use language::{LanguageRegistry, LanguageServerName, LspAdapter, LspAdapterDelegate};
use lsp::LanguageServerBinary; use lsp::LanguageServerBinary;
use node_runtime::NodeRuntime; use node_runtime::NodeRuntime;

View File

@ -3,7 +3,7 @@ use async_compression::futures::bufread::GzipDecoder;
use async_trait::async_trait; use async_trait::async_trait;
use futures::{io::BufReader, StreamExt}; use futures::{io::BufReader, StreamExt};
use gpui::{AppContext, AsyncAppContext}; use gpui::{AppContext, AsyncAppContext};
use http::github::{latest_github_release, GitHubLspBinaryVersion}; use http_client::github::{latest_github_release, GitHubLspBinaryVersion};
pub use language::*; pub use language::*;
use language_settings::all_language_settings; use language_settings::all_language_settings;
use lazy_static::lazy_static; use lazy_static::lazy_static;

View File

@ -4,7 +4,7 @@ use async_tar::Archive;
use async_trait::async_trait; use async_trait::async_trait;
use collections::HashMap; use collections::HashMap;
use gpui::AsyncAppContext; use gpui::AsyncAppContext;
use http::github::{build_tarball_url, GitHubLspBinaryVersion}; use http_client::github::{build_tarball_url, GitHubLspBinaryVersion};
use language::{LanguageServerName, LspAdapter, LspAdapterDelegate}; use language::{LanguageServerName, LspAdapter, LspAdapterDelegate};
use lsp::{CodeActionKind, LanguageServerBinary}; use lsp::{CodeActionKind, LanguageServerBinary};
use node_runtime::NodeRuntime; use node_runtime::NodeRuntime;

View File

@ -22,7 +22,7 @@ async-tar.workspace = true
async-trait.workspace = true async-trait.workspace = true
async_zip.workspace = true async_zip.workspace = true
futures.workspace = true futures.workspace = true
http.workspace = true http_client.workspace = true
log.workspace = true log.workspace = true
paths.workspace = true paths.workspace = true
semver.workspace = true semver.workspace = true

View File

@ -5,7 +5,7 @@ pub use archive::extract_zip;
use async_compression::futures::bufread::GzipDecoder; use async_compression::futures::bufread::GzipDecoder;
use async_tar::Archive; use async_tar::Archive;
use futures::AsyncReadExt; use futures::AsyncReadExt;
use http::HttpClient; use http_client::HttpClient;
use semver::Version; use semver::Version;
use serde::Deserialize; use serde::Deserialize;
use smol::io::BufReader; use smol::io::BufReader;

View File

@ -18,7 +18,7 @@ schemars = ["dep:schemars"]
[dependencies] [dependencies]
anyhow.workspace = true anyhow.workspace = true
futures.workspace = true futures.workspace = true
http.workspace = true http_client.workspace = true
isahc.workspace = true isahc.workspace = true
schemars = { workspace = true, optional = true } schemars = { workspace = true, optional = true }
serde.workspace = true serde.workspace = true

View File

@ -1,6 +1,6 @@
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt}; use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt};
use http::{AsyncBody, HttpClient, Method, Request as HttpRequest}; use http_client::{AsyncBody, HttpClient, Method, Request as HttpRequest};
use isahc::config::Configurable; use isahc::config::Configurable;
use schemars::JsonSchema; use schemars::JsonSchema;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@ -15,7 +15,7 @@ schemars = ["dep:schemars"]
[dependencies] [dependencies]
anyhow.workspace = true anyhow.workspace = true
futures.workspace = true futures.workspace = true
http.workspace = true http_client.workspace = true
isahc.workspace = true isahc.workspace = true
schemars = { workspace = true, optional = true } schemars = { workspace = true, optional = true }
serde.workspace = true serde.workspace = true

View File

@ -1,6 +1,6 @@
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt}; use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt};
use http::{AsyncBody, HttpClient, Method, Request as HttpRequest}; use http_client::{AsyncBody, HttpClient, Method, Request as HttpRequest};
use isahc::config::Configurable; use isahc::config::Configurable;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serde_json::{Map, Value}; use serde_json::{Map, Value};

View File

@ -37,7 +37,7 @@ fuzzy.workspace = true
git.workspace = true git.workspace = true
globset.workspace = true globset.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
itertools.workspace = true itertools.workspace = true
language.workspace = true language.workspace = true
log.workspace = true log.workspace = true

View File

@ -39,7 +39,7 @@ use gpui::{
AnyModel, AppContext, AsyncAppContext, BackgroundExecutor, BorrowAppContext, Context, Entity, AnyModel, AppContext, AsyncAppContext, BackgroundExecutor, BorrowAppContext, Context, Entity,
EventEmitter, Model, ModelContext, PromptLevel, SharedString, Task, WeakModel, WindowContext, EventEmitter, Model, ModelContext, PromptLevel, SharedString, Task, WeakModel, WindowContext,
}; };
use http::{HttpClient, Url}; use http_client::{HttpClient, Url};
use itertools::Itertools; use itertools::Itertools;
use language::{ use language::{
language_settings::{ language_settings::{
@ -1120,7 +1120,7 @@ impl Project {
let fs = Arc::new(RealFs::default()); let fs = Arc::new(RealFs::default());
let languages = LanguageRegistry::test(cx.background_executor().clone()); let languages = LanguageRegistry::test(cx.background_executor().clone());
let clock = Arc::new(FakeSystemClock::default()); let clock = Arc::new(FakeSystemClock::default());
let http_client = http::FakeHttpClient::with_404_response(); let http_client = http_client::FakeHttpClient::with_404_response();
let client = cx let client = cx
.update(|cx| client::Client::new(clock, http_client.clone(), cx)) .update(|cx| client::Client::new(clock, http_client.clone(), cx))
.unwrap(); .unwrap();
@ -1164,7 +1164,7 @@ impl Project {
let languages = LanguageRegistry::test(cx.executor()); let languages = LanguageRegistry::test(cx.executor());
let clock = Arc::new(FakeSystemClock::default()); let clock = Arc::new(FakeSystemClock::default());
let http_client = http::FakeHttpClient::with_404_response(); let http_client = http_client::FakeHttpClient::with_404_response();
let client = cx.update(|cx| client::Client::new(clock, http_client.clone(), cx)); let client = cx.update(|cx| client::Client::new(clock, http_client.clone(), cx));
let user_store = cx.new_model(|cx| UserStore::new(client.clone(), cx)); let user_store = cx.new_model(|cx| UserStore::new(client.clone(), cx));
let project = cx.update(|cx| { let project = cx.update(|cx| {

View File

@ -42,7 +42,7 @@ client = { workspace = true, features = ["test-support"] }
clock = { workspace = true, features = ["test-support"] } clock = { workspace = true, features = ["test-support"] }
fs = { workspace = true, features = ["test-support"] } fs = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }
language = { workspace = true, features = ["test-support"] } language = { workspace = true, features = ["test-support"] }
node_runtime = { workspace = true, features = ["test-support"] } node_runtime = { workspace = true, features = ["test-support"] }
remote = { workspace = true, features = ["test-support"] } remote = { workspace = true, features = ["test-support"] }

View File

@ -3,7 +3,7 @@ use client::{Client, UserStore};
use clock::FakeSystemClock; use clock::FakeSystemClock;
use fs::{FakeFs, Fs as _}; use fs::{FakeFs, Fs as _};
use gpui::{Context, Model, TestAppContext}; use gpui::{Context, Model, TestAppContext};
use http::FakeHttpClient; use http_client::FakeHttpClient;
use language::LanguageRegistry; use language::LanguageRegistry;
use node_runtime::FakeNodeRuntime; use node_runtime::FakeNodeRuntime;
use project::Project; use project::Project;

View File

@ -44,7 +44,7 @@ workspace.workspace = true
editor = { workspace = true, features = ["test-support"] } editor = { workspace = true, features = ["test-support"] }
env_logger.workspace = true env_logger.workspace = true
gpui = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }
language = { workspace = true, features = ["test-support"] } language = { workspace = true, features = ["test-support"] }
project = { workspace = true, features = ["test-support"] } project = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] }

View File

@ -18,7 +18,7 @@ test-support = ["collections/test-support", "gpui/test-support", "proto/test-sup
[dependencies] [dependencies]
anyhow.workspace = true anyhow.workspace = true
async-tungstenite = "0.23" async-tungstenite.workspace = true
base64.workspace = true base64.workspace = true
chrono.workspace = true chrono.workspace = true
collections.workspace = true collections.workspace = true

View File

@ -30,7 +30,7 @@ gpui.workspace = true
language.workspace = true language.workspace = true
log.workspace = true log.workspace = true
heed.workspace = true heed.workspace = true
http.workspace = true http_client.workspace = true
open_ai.workspace = true open_ai.workspace = true
parking_lot.workspace = true parking_lot.workspace = true
project.workspace = true project.workspace = true
@ -60,4 +60,4 @@ tempfile.workspace = true
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
worktree = { workspace = true, features = ["test-support"] } worktree = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] } workspace = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }

View File

@ -1,7 +1,7 @@
use client::Client; use client::Client;
use futures::channel::oneshot; use futures::channel::oneshot;
use gpui::App; use gpui::App;
use http::HttpClientWithUrl; use http_client::HttpClientWithUrl;
use language::language_settings::AllLanguageSettings; use language::language_settings::AllLanguageSettings;
use project::Project; use project::Project;
use semantic_index::{OpenAiEmbeddingModel, OpenAiEmbeddingProvider, SemanticIndex}; use semantic_index::{OpenAiEmbeddingModel, OpenAiEmbeddingProvider, SemanticIndex};

View File

@ -1,6 +1,6 @@
use anyhow::{Context as _, Result}; use anyhow::{Context as _, Result};
use futures::{future::BoxFuture, AsyncReadExt, FutureExt}; use futures::{future::BoxFuture, AsyncReadExt, FutureExt};
use http::HttpClient; use http_client::HttpClient;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::sync::Arc; use std::sync::Arc;

View File

@ -1,7 +1,7 @@
use crate::{Embedding, EmbeddingProvider, TextToEmbed}; use crate::{Embedding, EmbeddingProvider, TextToEmbed};
use anyhow::Result; use anyhow::Result;
use futures::{future::BoxFuture, FutureExt}; use futures::{future::BoxFuture, FutureExt};
use http::HttpClient; use http_client::HttpClient;
pub use open_ai::OpenAiEmbeddingModel; pub use open_ai::OpenAiEmbeddingModel;
use std::sync::Arc; use std::sync::Arc;

View File

@ -40,4 +40,4 @@ project = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] }
theme = { workspace = true, features = ["test-support"] } theme = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }

View File

@ -15,7 +15,7 @@ doctest = false
[dependencies] [dependencies]
anyhow.workspace = true anyhow.workspace = true
futures.workspace = true futures.workspace = true
http.workspace = true http_client.workspace = true
paths.workspace = true paths.workspace = true
serde.workspace = true serde.workspace = true
serde_json.workspace = true serde_json.workspace = true

View File

@ -1,7 +1,7 @@
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use futures::io::BufReader; use futures::io::BufReader;
use futures::{AsyncReadExt, Future}; use futures::{AsyncReadExt, Future};
use http::{AsyncBody, HttpClient, Request as HttpRequest}; use http_client::{AsyncBody, HttpClient, Request as HttpRequest};
use paths::supermaven_dir; use paths::supermaven_dir;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use smol::fs::{self, File}; use smol::fs::{self, File};

View File

@ -37,4 +37,4 @@ env_logger.workspace = true
gpui = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] }
rand.workspace = true rand.workspace = true
util = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }

View File

@ -21,7 +21,7 @@ test-support = [
"collections/test-support", "collections/test-support",
"editor/test-support", "editor/test-support",
"gpui/test-support", "gpui/test-support",
"http/test-support", "http_client/test-support",
"project/test-support", "project/test-support",
"settings/test-support", "settings/test-support",
"util/test-support", "util/test-support",
@ -61,7 +61,7 @@ client = { workspace = true, features = ["test-support"] }
collections = { workspace = true, features = ["test-support"] } collections = { workspace = true, features = ["test-support"] }
editor = { workspace = true, features = ["test-support"] } editor = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }
notifications = { workspace = true, features = ["test-support"] } notifications = { workspace = true, features = ["test-support"] }
pretty_assertions.workspace = true pretty_assertions.workspace = true
project = { workspace = true, features = ["test-support"] } project = { workspace = true, features = ["test-support"] }

View File

@ -17,7 +17,7 @@ no-webrtc = ["call/no-webrtc"]
test-support = [ test-support = [
"call/test-support", "call/test-support",
"client/test-support", "client/test-support",
"http/test-support", "http_client/test-support",
"db/test-support", "db/test-support",
"project/test-support", "project/test-support",
"session/test-support", "session/test-support",
@ -40,7 +40,7 @@ derive_more.workspace = true
fs.workspace = true fs.workspace = true
futures.workspace = true futures.workspace = true
gpui.workspace = true gpui.workspace = true
http.workspace = true http_client.workspace = true
itertools.workspace = true itertools.workspace = true
language.workspace = true language.workspace = true
lazy_static.workspace = true lazy_static.workspace = true
@ -73,4 +73,4 @@ gpui = { workspace = true, features = ["test-support"] }
project = { workspace = true, features = ["test-support"] } project = { workspace = true, features = ["test-support"] }
session = { workspace = true, features = ["test-support"] } session = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] } http_client = { workspace = true, features = ["test-support"] }

View File

@ -583,7 +583,7 @@ impl AppState {
let fs = fs::FakeFs::new(cx.background_executor().clone()); let fs = fs::FakeFs::new(cx.background_executor().clone());
let languages = Arc::new(LanguageRegistry::test(cx.background_executor().clone())); let languages = Arc::new(LanguageRegistry::test(cx.background_executor().clone()));
let clock = Arc::new(clock::FakeSystemClock::default()); let clock = Arc::new(clock::FakeSystemClock::default());
let http_client = http::FakeHttpClient::with_404_response(); let http_client = http_client::FakeHttpClient::with_404_response();
let client = Client::new(clock, http_client.clone(), cx); let client = Client::new(clock, http_client.clone(), cx);
let session = Session::test(); let session = Session::test();
let user_store = cx.new_model(|cx| UserStore::new(client.clone(), cx)); let user_store = cx.new_model(|cx| UserStore::new(client.clone(), cx));

View File

@ -18,7 +18,7 @@ test-support = [
"settings/test-support", "settings/test-support",
"text/test-support", "text/test-support",
"gpui/test-support", "gpui/test-support",
"http/test-support", "http_client/test-support",
] ]
[dependencies] [dependencies]
@ -52,7 +52,7 @@ collections = { workspace = true, features = ["test-support"] }
env_logger.workspace = true env_logger.workspace = true
git2.workspace = true git2.workspace = true
gpui = {workspace = true, features = ["test-support"]} gpui = {workspace = true, features = ["test-support"]}
http.workspace = true http_client.workspace = true
rand.workspace = true rand.workspace = true
settings = {workspace = true, features = ["test-support"]} settings = {workspace = true, features = ["test-support"]}
pretty_assertions.workspace = true pretty_assertions.workspace = true

View File

@ -49,7 +49,7 @@ git_hosting_providers.workspace = true
go_to_line.workspace = true go_to_line.workspace = true
gpui.workspace = true gpui.workspace = true
headless.workspace = true headless.workspace = true
http.workspace = true http_client.workspace = true
image_viewer.workspace = true image_viewer.workspace = true
inline_completion_button.workspace = true inline_completion_button.workspace = true
install_cli.workspace = true install_cli.workspace = true

View File

@ -4,10 +4,10 @@ use chrono::Utc;
use client::telemetry; use client::telemetry;
use db::kvp::KEY_VALUE_STORE; use db::kvp::KEY_VALUE_STORE;
use gpui::{AppContext, SemanticVersion}; use gpui::{AppContext, SemanticVersion};
use http::Method; use http_client::Method;
use isahc::config::Configurable; use isahc::config::Configurable;
use http::{self, HttpClient, HttpClientWithUrl}; use http_client::{self, HttpClient, HttpClientWithUrl};
use paths::{crashes_dir, crashes_retired_dir}; use paths::{crashes_dir, crashes_retired_dir};
use release_channel::ReleaseChannel; use release_channel::ReleaseChannel;
use release_channel::RELEASE_CHANNEL; use release_channel::RELEASE_CHANNEL;
@ -162,7 +162,7 @@ pub fn monitor_main_thread_hangs(
use parking_lot::Mutex; use parking_lot::Mutex;
use http::Method; use http_client::Method;
use std::{ use std::{
ffi::c_int, ffi::c_int,
sync::{mpsc, OnceLock}, sync::{mpsc, OnceLock},
@ -323,7 +323,7 @@ pub fn monitor_main_thread_hangs(
continue; continue;
}; };
let Ok(request) = http::Request::builder() let Ok(request) = http_client::Request::builder()
.method(Method::POST) .method(Method::POST)
.uri(url.as_ref()) .uri(url.as_ref())
.header("x-zed-checksum", checksum) .header("x-zed-checksum", checksum)
@ -416,7 +416,7 @@ async fn upload_previous_panics(
continue; continue;
}; };
let Ok(request) = http::Request::builder() let Ok(request) = http_client::Request::builder()
.method(Method::POST) .method(Method::POST)
.uri(panic_report_url.as_ref()) .uri(panic_report_url.as_ref())
.header("x-zed-checksum", checksum) .header("x-zed-checksum", checksum)
@ -488,7 +488,7 @@ async fn upload_previous_crashes(
.await .await
.context("error reading crash file")?; .context("error reading crash file")?;
let mut request = http::Request::post(&crash_report_url.to_string()) let mut request = http_client::Request::post(&crash_report_url.to_string())
.redirect_policy(isahc::config::RedirectPolicy::Follow) .redirect_policy(isahc::config::RedirectPolicy::Follow)
.header("Content-Type", "text/plain"); .header("Content-Type", "text/plain");