Raise standalone file search limit to 50

This commit is contained in:
ychhabria
2026-03-23 23:18:39 -07:00
parent 55be8ca802
commit aedd076b8c
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -6,6 +6,7 @@
//! on every keystroke, and drops the session when the query becomes empty.
use codex_file_search as file_search;
use std::num::NonZero;
use std::path::PathBuf;
use std::sync::Arc;
use std::sync::Mutex;
@@ -13,6 +14,8 @@ use std::sync::Mutex;
use crate::app_event::AppEvent;
use crate::app_event_sender::AppEventSender;
const FILE_SEARCH_LIMIT: usize = 50;
pub(crate) struct FileSearchManager {
state: Arc<Mutex<SearchState>>,
search_dir: PathBuf,
@@ -83,6 +86,8 @@ impl FileSearchManager {
let session = file_search::create_session(
vec![self.search_dir.clone()],
file_search::FileSearchOptions {
#[expect(clippy::unwrap_used)]
limit: NonZero::new(FILE_SEARCH_LIMIT).unwrap(),
compute_indices: true,
..Default::default()
},
@@ -6,6 +6,7 @@
//! on every keystroke, and drops the session when the query becomes empty.
use codex_file_search as file_search;
use std::num::NonZero;
use std::path::PathBuf;
use std::sync::Arc;
use std::sync::Mutex;
@@ -13,6 +14,8 @@ use std::sync::Mutex;
use crate::app_event::AppEvent;
use crate::app_event_sender::AppEventSender;
const FILE_SEARCH_LIMIT: usize = 50;
pub(crate) struct FileSearchManager {
state: Arc<Mutex<SearchState>>,
search_dir: PathBuf,
@@ -83,6 +86,8 @@ impl FileSearchManager {
let session = file_search::create_session(
vec![self.search_dir.clone()],
file_search::FileSearchOptions {
#[expect(clippy::unwrap_used)]
limit: NonZero::new(FILE_SEARCH_LIMIT).unwrap(),
compute_indices: true,
..Default::default()
},