feat(config): Add fetchResourceEvents config flag with --no-events CLI override
Adds a new boolean field to SyncConfig that controls whether resource event fetching is performed during sync: - SyncConfig.fetch_resource_events: defaults to true via serde default_true helper, serialized as "fetchResourceEvents" in JSON - SyncArgs.no_events: --no-events CLI flag that overrides the config value to false when present - SyncOptions.no_events: propagates the flag through the sync pipeline - handle_sync_cmd: mutates loaded config when --no-events is set, ensuring the flag takes effect regardless of config file contents This follows the existing pattern established by --no-embed and --no-docs flags, where CLI flags override config file defaults. The config is loaded as mutable specifically to support this override. Also adds "events" to the count command's entity type value_parser, enabling `lore count events` (implementation in a separate commit). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,13 @@ pub struct SyncConfig {
|
||||
|
||||
#[serde(rename = "dependentConcurrency")]
|
||||
pub dependent_concurrency: u32,
|
||||
|
||||
#[serde(rename = "fetchResourceEvents", default = "default_true")]
|
||||
pub fetch_resource_events: bool,
|
||||
}
|
||||
|
||||
fn default_true() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
impl Default for SyncConfig {
|
||||
@@ -61,6 +68,7 @@ impl Default for SyncConfig {
|
||||
cursor_rewind_seconds: 2,
|
||||
primary_concurrency: 4,
|
||||
dependent_concurrency: 2,
|
||||
fetch_resource_events: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user