file-search: improve file query perf (#9939)

switch nucleo-matcher for nucleo and use a "file search session" w/ live
updating query instead of a single hermetic run per query.
This commit is contained in:
Jeremy Rose authored and GitHub committed 2026-01-28 10:54:43 -08:00
1 parent 35e03a0716
commit b8156706e6
10 files changed
+865 -422

No files matched your search

+29 -2
View File
@@ -2380,6 +2380,11 @@ impl ChatComposer {
// When browsing input history (shell-style Up/Down recall), skip all popup
// synchronization so nothing steals focus from continued history navigation.
if browsing_history {
if self.current_file_query.is_some() {
self.app_event_tx
.send(AppEvent::StartFileSearch(String::new()));
self.current_file_query = None;
}
self.active_popup = ActivePopup::None;
return;
}
@@ -2390,12 +2395,22 @@ impl ChatComposer {
self.sync_command_popup(allow_command_popup);
if matches!(self.active_popup, ActivePopup::Command(_)) {
if self.current_file_query.is_some() {
self.app_event_tx
.send(AppEvent::StartFileSearch(String::new()));
self.current_file_query = None;
}
self.dismissed_file_popup_token = None;
self.dismissed_skill_popup_token = None;
return;
}
if let Some(token) = skill_token {
if self.current_file_query.is_some() {
self.app_event_tx
.send(AppEvent::StartFileSearch(String::new()));
self.current_file_query = None;
}
self.sync_skill_popup(token);
return;
}
@@ -2406,6 +2421,11 @@ impl ChatComposer {
return;
}
if self.current_file_query.is_some() {
self.app_event_tx
.send(AppEvent::StartFileSearch(String::new()));
self.current_file_query = None;
}
self.dismissed_file_popup_token = None;
if matches!(
self.active_popup,
@@ -2539,7 +2559,10 @@ impl ChatComposer {
return;
}
if !query.is_empty() {
if query.is_empty() {
self.app_event_tx
.send(AppEvent::StartFileSearch(String::new()));
} else {
self.app_event_tx
.send(AppEvent::StartFileSearch(query.clone()));
}
@@ -2563,7 +2586,11 @@ impl ChatComposer {
}
}
self.current_file_query = Some(query);
if query.is_empty() {
self.current_file_query = None;
} else {
self.current_file_query = Some(query);
}
self.dismissed_file_popup_token = None;
}