agent: Make directory context display update on rename (#29189)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan
2025-04-22 01:44:31 +00:00
committed by GitHub
parent c15382c4d8
commit 2e8ee9b64f
5 changed files with 74 additions and 31 deletions
+3 -5
View File
@@ -3282,12 +3282,10 @@ pub(crate) fn open_context(
}
}
AssistantContext::Directory(directory_context) => {
let project_path = directory_context.project_path(cx);
let entry_id = directory_context.entry_id;
workspace.update(cx, |workspace, cx| {
workspace.project().update(cx, |project, cx| {
if let Some(entry) = project.entry_for_path(&project_path, cx) {
cx.emit(project::Event::RevealInProjectPanel(entry.id));
}
workspace.project().update(cx, |_project, cx| {
cx.emit(project::Event::RevealInProjectPanel(entry_id));
})
})
}