SSH Remoting: Fix diagnostic summary syncing (#19923)

Co-Authored-By: Mikayla <mikayla@zed.dev>

Release Notes:

- SSH Remoting: Fix diagnostics summary over collab

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Conrad Irwin 2024-10-29 14:02:32 -06:00 committed by GitHub
parent 9818835c9d
commit d310a1269f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4044,6 +4044,20 @@ impl LspStore {
.or_default()
.insert(server_id, summary);
}
if let Some((downstream_client, project_id)) = &this.downstream_client {
downstream_client
.send(proto::UpdateDiagnosticSummary {
project_id: *project_id,
worktree_id: worktree_id.to_proto(),
summary: Some(proto::DiagnosticSummary {
path: project_path.path.to_string_lossy().to_string(),
language_server_id: server_id.0 as u64,
error_count: summary.error_count as u32,
warning_count: summary.warning_count as u32,
}),
})
.log_err();
}
cx.emit(LspStoreEvent::DiagnosticsUpdated {
language_server_id: LanguageServerId(message.language_server_id as usize),
path: project_path,
@ -5915,7 +5929,6 @@ impl LspStore {
let adapter = adapter.clone();
if let Some(this) = this.upgrade() {
adapter.process_diagnostics(&mut params);
// Everything else has to be on the server, Can we make it on the client?
this.update(&mut cx, |this, cx| {
this.update_diagnostics(
server_id,