refactor: inline project layer detection in hook discovery

This commit is contained in:
viyatb-oai
2026-03-26 18:32:43 -07:00
parent ac0800ed36
commit f94384e81a
2 changed files with 2 additions and 5 deletions

View File

@@ -99,10 +99,6 @@ impl ConfigLayerEntry {
self.disabled_reason.is_some()
}
pub fn is_project_layer(&self) -> bool {
matches!(self.name, ConfigLayerSource::Project { .. })
}
pub fn raw_toml(&self) -> Option<&str> {
self.raw_toml.as_deref()
}

View File

@@ -1,6 +1,7 @@
use std::fs;
use std::path::Path;
use codex_app_server_protocol::ConfigLayerSource;
use codex_config::ConfigLayerStack;
use codex_config::ConfigLayerStackOrdering;
@@ -94,7 +95,7 @@ pub(crate) fn discover_handlers(config_layer_stack: Option<&ConfigLayerStack>) -
&mut warnings,
&mut display_order,
source_path.as_path(),
layer.is_project_layer(),
matches!(layer.name, ConfigLayerSource::Project { .. }),
event_name,
groups,
);