zed/crates/git_graph/Cargo.toml
Anthony Eid 592727b892
collab: Add request stream support (#56455)
Adds streaming RPC forwarding to collab so guests can call
`GetInitialGraphData` and `SearchCommits` against a remote host project.
Previously these requests had no forwarder registered on the server and
would fail when invoked by a guest.

This mirrors the existing single-response forwarding pattern with new
analogues:
- `StreamResponse<R>` + `MessageContext::forward_request_stream`
- `Server::add_request_stream_handler`
- `forward_read_only_project_stream_request`, registered for both
messages

Also hardens both the unary and stream handlers to send
`respond_with_error` when a handler returns `Ok` without sending/ending
a response, so the client doesn't hang waiting for a reply that will
never arrive.

I added git graph collab integration tests for this as well. 


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #55954

Release Notes:

- N/A
2026-05-12 17:43:06 +00:00

59 lines
1.5 KiB
TOML

[package]
name = "git_graph"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
path = "src/git_graph.rs"
[features]
default = []
test-support = [
"dep:rand",
"project/test-support",
"gpui/test-support",
"remote_connection/test-support",
]
[dependencies]
anyhow.workspace = true
async-channel.workspace = true
collections.workspace = true
db.workspace = true
editor.workspace = true
git.workspace = true
git_ui.workspace = true
gpui.workspace = true
language.workspace = true
menu.workspace = true
picker.workspace = true
project.workspace = true
project_panel.workspace = true
rand = { workspace = true, optional = true }
search.workspace = true
settings.workspace = true
smallvec.workspace = true
task.workspace = true
theme.workspace = true
theme_settings.workspace = true
time.workspace = true
ui.workspace = true
workspace.workspace = true
[dev-dependencies]
db = { workspace = true, features = ["test-support"] }
fs = { workspace = true, features = ["test-support"] }
git = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
language_model.workspace = true
project = { workspace = true, features = ["test-support"] }
rand.workspace = true
remote_connection = { workspace = true, features = ["test-support"] }
serde_json.workspace = true
settings = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }