diff --git a/Cargo.lock b/Cargo.lock index c7c8d7a090..87a8f3f0ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -925,6 +925,20 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chat_panel" +version = "0.1.0" +dependencies = [ + "client", + "editor", + "gpui", + "postage", + "theme", + "time 0.3.2", + "util", + "workspace", +] + [[package]] name = "chrono" version = "0.4.19" @@ -6101,6 +6115,7 @@ dependencies = [ "async-tungstenite", "buffer", "cargo-bundle", + "chat_panel", "client", "clock", "crossbeam-channel", diff --git a/crates/chat_panel/Cargo.toml b/crates/chat_panel/Cargo.toml new file mode 100644 index 0000000000..9b7d3664d7 --- /dev/null +++ b/crates/chat_panel/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "chat_panel" +version = "0.1.0" +edition = "2018" + +[dependencies] +client = { path = "../client" } +editor = { path = "../editor" } +gpui = { path = "../gpui" } +theme = { path = "../theme" } +util = { path = "../util" } +workspace = { path = "../workspace" } +postage = { version = "0.4.1", features = ["futures-traits"] } +time = "0.3" diff --git a/crates/zed/src/chat_panel.rs b/crates/chat_panel/src/lib.rs similarity index 99% rename from crates/zed/src/chat_panel.rs rename to crates/chat_panel/src/lib.rs index 34afbf053b..614022d4c9 100644 --- a/crates/zed/src/chat_panel.rs +++ b/crates/chat_panel/src/lib.rs @@ -1,4 +1,3 @@ -use crate::Settings; use client::{ channel::{Channel, ChannelEvent, ChannelList, ChannelMessage}, Client, @@ -17,6 +16,7 @@ use postage::{prelude::Stream, watch}; use std::sync::Arc; use time::{OffsetDateTime, UtcOffset}; use util::{ResultExt, TryFutureExt}; +use workspace::Settings; const MESSAGE_LOADING_THRESHOLD: usize = 50; diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 42f63266ed..cc21d726e2 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -25,6 +25,7 @@ test-support = [ [dependencies] buffer = { path = "../buffer" } +chat_panel = { path = "../chat_panel" } client = { path = "../client" } clock = { path = "../clock" } fsevent = { path = "../fsevent" } diff --git a/crates/zed/src/lib.rs b/crates/zed/src/lib.rs index a145070ba7..2a9568e0a8 100644 --- a/crates/zed/src/lib.rs +++ b/crates/zed/src/lib.rs @@ -1,5 +1,4 @@ pub mod assets; -pub mod chat_panel; pub mod file_finder; pub mod language; pub mod menus; diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index c48fb35491..155d40b672 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -12,8 +12,7 @@ use workspace::{self, settings, OpenNew}; use zed::{ self, assets::Assets, - chat_panel, client, - client::{http, ChannelList, UserStore}, + client::{self, http, ChannelList, UserStore}, editor, file_finder, fs::RealFs, language, menus, people_panel, theme_selector, AppState, OpenParams, OpenPaths,