zeta2: Parse imports via Tree-sitter queries + improve zeta retrieval-stats (#39735)

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: Oleksiy <oleksiy@zed.dev>
This commit is contained in:
Michael Sloan
2025-10-08 12:04:06 -06:00
committed by GitHub
co-authored by Max Agus Oleksiy
parent 5fd187769d
commit bcef3b5010
35 changed files with 3076 additions and 508 deletions
+4 -4
View File
@@ -2571,8 +2571,8 @@ impl Project {
let task = self.open_buffer(path, cx);
cx.spawn(async move |_project, cx| {
let buffer = task.await?;
let project_entry_id = buffer.read_with(cx, |buffer, cx| {
File::from_dyn(buffer.file()).and_then(|file| file.project_entry_id(cx))
let project_entry_id = buffer.read_with(cx, |buffer, _cx| {
File::from_dyn(buffer.file()).and_then(|file| file.project_entry_id())
})?;
Ok((project_entry_id, buffer))
@@ -5515,8 +5515,8 @@ impl ProjectItem for Buffer {
Some(project.update(cx, |project, cx| project.open_buffer(path.clone(), cx)))
}
fn entry_id(&self, cx: &App) -> Option<ProjectEntryId> {
File::from_dyn(self.file()).and_then(|file| file.project_entry_id(cx))
fn entry_id(&self, _cx: &App) -> Option<ProjectEntryId> {
File::from_dyn(self.file()).and_then(|file| file.project_entry_id())
}
fn project_path(&self, cx: &App) -> Option<ProjectPath> {