Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/eval_cli/zed_eval/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "zed-eval"
version = "0.1.0"
description = "Harbor agent wrapper for Zed's eval-cli"
requires-python = ">=3.12"
dependencies = ["harbor==0.7.0"]
dependencies = ["harbor==0.13.0"]

[build-system]
requires = ["setuptools"]
Expand Down
3 changes: 2 additions & 1 deletion crates/git_ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ path = "src/git_ui.rs"

[features]
test-support = ["multi_buffer/test-support", "remote_connection/test-support"]
call = ["dep:call"]

[dependencies]
agent_settings.workspace = true
anyhow.workspace = true
askpass.workspace = true
async-channel.workspace = true
buffer_diff.workspace = true
call.workspace = true
call = { workspace = true, optional = true }
collections.workspace = true
component.workspace = true
db.workspace = true
Expand Down
36 changes: 25 additions & 11 deletions crates/git_ui/src/git_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,8 @@ pub struct GitPanel {
context_menu: Option<(Entity<ContextMenu>, Point<Pixels>, Subscription)>,
modal_open: bool,
show_placeholders: bool,
// Only read to compute collaborative co-authors, which requires the `call` feature.
#[cfg_attr(not(feature = "call"), allow(dead_code))]
local_committer: Option<GitCommitter>,
local_committer_task: Option<Task<()>>,
commit_template: Option<GitCommitTemplate>,
Expand Down Expand Up @@ -3347,6 +3349,12 @@ impl GitPanel {
}
}

#[cfg(not(feature = "call"))]
fn potential_co_authors(&self, _cx: &App) -> Vec<(String, String)> {
Vec::new()
}

#[cfg(feature = "call")]
fn potential_co_authors(&self, cx: &App) -> Vec<(String, String)> {
let mut new_co_authors = Vec::new();
let project = self.project.read(cx);
Expand Down Expand Up @@ -3388,6 +3396,7 @@ impl GitPanel {
new_co_authors
}

#[cfg(feature = "call")]
fn local_committer(&self, room: &call::Room, cx: &App) -> Option<(String, String)> {
let user = room.local_participant_user(cx)?;
let committer = self.local_committer.as_ref()?;
Expand Down Expand Up @@ -6636,19 +6645,24 @@ impl Render for GitPanel {
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let project = self.project.read(cx);
let has_entries = !self.entries.is_empty();
let room = self.workspace.upgrade().and_then(|_workspace| {
call::ActiveCall::try_global(cx).and_then(|call| call.read(cx).room().cloned())
});

let has_write_access = self.has_write_access(cx);

let has_co_authors = room.is_some_and(|room| {
self.load_local_committer(cx);
let room = room.read(cx);
room.remote_participants()
.values()
.any(|remote_participant| remote_participant.can_write())
});
#[cfg(feature = "call")]
let has_co_authors = self
.workspace
.upgrade()
.and_then(|_workspace| {
call::ActiveCall::try_global(cx).and_then(|call| call.read(cx).room().cloned())
})
.is_some_and(|room| {
self.load_local_committer(cx);
let room = room.read(cx);
room.remote_participants()
.values()
.any(|remote_participant| remote_participant.can_write())
});
#[cfg(not(feature = "call"))]
let has_co_authors = false;

v_flex()
.id("git_panel")
Expand Down
2 changes: 1 addition & 1 deletion crates/zed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ fs.workspace = true
futures.workspace = true
git.workspace = true
git_hosting_providers.workspace = true
git_ui.workspace = true
git_ui = { workspace = true, features = ["call"] }
go_to_line.workspace = true
system_specs.workspace = true
gpui = { workspace = true, features = ["input-latency-histogram"] }
Expand Down
Loading