mirror of
https://github.com/openai/codex.git
synced 2026-09-09 15:58:47 +00:00
refactor: inline project layer detection in hook discovery
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user