mirror of
https://github.com/openai/codex.git
synced 2026-12-01 00:20:48 +00:00
Raise standalone file search limit to 50
This commit is contained in:
@@ -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()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user