Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion crates/fff-mcp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,30 @@ pub(crate) struct Args {
#[arg(long = "follow-symlinks")]
follow_symlinks: bool,

/// Allow indexing the user's home directory. FFF refuses to init in `~`
/// unless this is set. Also settable via FFF_ENABLE_HOME_SCAN=1.
#[arg(
long = "enable-home-scan",
env = "FFF_ENABLE_HOME_SCAN",
num_args = 0..=1,
default_missing_value = "true",
default_value_t = false,
value_parser = clap::builder::BoolishValueParser::new()
)]
enable_home_scan: bool,

/// Allow indexing the filesystem root, off by default for the same reason.
/// Also settable via FFF_ENABLE_ROOT_SCAN=1.
#[arg(
long = "enable-root-scan",
env = "FFF_ENABLE_ROOT_SCAN",
num_args = 0..=1,
default_missing_value = "true",
default_value_t = false,
value_parser = clap::builder::BoolishValueParser::new()
)]
enable_root_scan: bool,

/// Run a health check and print diagnostic information, then exit.
#[arg(long = "healthcheck")]
pub(crate) healthcheck: bool,
Expand Down Expand Up @@ -276,7 +300,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.max_cached_files
.map(fff::ContentCacheBudget::new_for_repo),
follow_symlinks: args.follow_symlinks,
..Default::default()
enable_home_dir_scanning: args.enable_home_scan,
enable_fs_root_scanning: args.enable_root_scan,
},
)
.map_err(|e| format!("Failed to init file picker: {}", e))?;
Expand Down
Loading