diff --git a/assets/settings/default.json b/assets/settings/default.json index 8fb73a2ecb0b8143f7e42981a71966327edd0f54..cc724657c0c20411b17d0ad0ea293b0a08ddc6f5 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -76,7 +76,7 @@ // Settings related to calls in Zed "calls": { // Join calls with the microphone muted by default - "mute_on_join": true + "mute_on_join": false }, // Scrollbar related settings "scrollbar": { diff --git a/crates/util/src/channel.rs b/crates/util/src/channel.rs index 2364dcaad48d79272dddf9bbabbf67c0d590270a..47c6a570a1f84c4f0fb16c24df650082d5aee60e 100644 --- a/crates/util/src/channel.rs +++ b/crates/util/src/channel.rs @@ -44,9 +44,9 @@ impl ReleaseChannel { pub fn url_scheme(&self) -> &'static str { match self { - ReleaseChannel::Dev => "zed-dev:/", - ReleaseChannel::Preview => "zed-preview:/", - ReleaseChannel::Stable => "zed:/", + ReleaseChannel::Dev => "zed-dev://", + ReleaseChannel::Preview => "zed-preview://", + ReleaseChannel::Stable => "zed://", } } diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index a1249173090a8af506d16efe1b8c25657b358e34..1644f86b61c25a0ebede73a133e4f805585f659f 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -47,6 +47,7 @@ use std::{ any::TypeId, borrow::Cow, cmp, env, + fs::OpenOptions, future::Future, path::{Path, PathBuf}, rc::Rc, @@ -4161,6 +4162,7 @@ async fn join_channel_internal( active_call: &ModelHandle, cx: &mut AsyncAppContext, ) -> Result { + dbg!("join channel internal"); let should_prompt = active_call.read_with(cx, |active_call, cx| { let Some(room) = active_call.room().map(|room| room.read(cx)) else { return false; @@ -4193,6 +4195,7 @@ async fn join_channel_internal( return Ok(false); // unreachable!() hopefully } } + dbg!("asdajdkjkasd"); let client = cx.read(|cx| active_call.read(cx).client()); @@ -4218,13 +4221,17 @@ async fn join_channel_internal( } } + dbg!("past here"); + let room = active_call .update(cx, |active_call, cx| { active_call.join_channel(channel_id, cx) }) .await?; - room.update(cx, |room, cx| room.next_room_update()).await; + room.update(cx, |room, _| room.next_room_update()).await; + + dbg!("wow"); let task = room.update(cx, |room, cx| { if let Some((project, host)) = room.most_active_project() { @@ -4237,7 +4244,16 @@ async fn join_channel_internal( task.await?; return anyhow::Ok(true); } - + use std::io::Write; + writeln!( + OpenOptions::new() + .write(true) + .append(true) + .open("/Users/conrad/dbg") + .unwrap(), + "no jokes" + ) + .unwrap(); anyhow::Ok(false) } @@ -4257,6 +4273,7 @@ pub fn join_channel( &mut cx, ) .await; + dbg!("joined!"); // join channel succeeded, and opened a window if matches!(result, Ok(true)) { diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 52aaf639ea4c875bfcecf9aea3ffc6fb8bfe2dc2..f25a1e14be0bfb6e790b7179a2ca5e0c96bd6cf3 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -66,6 +66,15 @@ use crate::open_url::{OpenListener, OpenRequest}; mod open_url; fn main() { + writeln!( + OpenOptions::new() + .write(true) + .append(true) + .open("/Users/conrad/dbg") + .unwrap(), + "HELLO" + ) + .unwrap(); let http = http::client(); init_paths(); init_logger(); @@ -270,6 +279,7 @@ fn main() { } OpenRequest::JoinChannel { channel_id } => cx .update(|cx| { + dbg!("joining channel"); workspace::join_channel(channel_id, app_state.clone(), None, cx) }) .detach(), diff --git a/crates/zed/src/open_url.rs b/crates/zed/src/open_url.rs index 3e4902b9785cd08d4e38bbc14c6287936106bf8f..8cad217a8c952358d9aa613e6cdc2f934fd361de 100644 --- a/crates/zed/src/open_url.rs +++ b/crates/zed/src/open_url.rs @@ -3,6 +3,8 @@ use cli::{ipc::IpcSender, CliRequest, CliResponse}; use futures::channel::mpsc; use futures::channel::mpsc::{UnboundedReceiver, UnboundedSender}; use std::ffi::OsStr; +use std::fs::OpenOptions; +use std::io::Write; use std::os::unix::prelude::OsStrExt; use std::sync::atomic::Ordering; use std::{path::PathBuf, sync::atomic::AtomicBool}; @@ -41,6 +43,16 @@ impl OpenListener { } pub fn open_urls(&self, urls: Vec) { + writeln!( + OpenOptions::new() + .write(true) + .append(true) + .open("/Users/conrad/dbg") + .unwrap(), + "{:?}", + &urls, + ) + .unwrap(); self.triggered.store(true, Ordering::Release); let request = if let Some(server_name) = urls.first().and_then(|url| url.strip_prefix("zed-cli://")) @@ -79,6 +91,7 @@ impl OpenListener { } } } + log::error!("invalid zed url: {}", request_path); None }