mirror of
https://github.com/openai/codex.git
synced 2026-11-24 15:21:20 +00:00
Clarify config layer iteration APIs (#36774)
## What changed - Replace the ordering enum and `include_disabled` boolean with named `ConfigLayerStack` iterators for each precedence direction. - Keep enabled-only iteration separate from `all_layers_*` iteration, which includes disabled layers. - Update config consumers to use the iterator matching their precedence and disabled-layer requirements without allocating an intermediate `Vec`. ## Testing - Add coverage that verifies ordering and disabled-layer filtering for all four iterators. GitOrigin-RevId: d14df3db4a2eae80ba97cdec246bff405e6c5f3d
This commit is contained in:
1 parent
224ea64cdc
commit
78306a32af
32 files changed
+150
-309
No files matched your search
@@ -4,7 +4,6 @@
|
||||
use codex_arg0::Arg0DispatchPaths;
|
||||
use codex_code_mode::CodeModeSessionProvider;
|
||||
use codex_code_mode::WebSocketCodeModeSessionProvider;
|
||||
use codex_config::ConfigLayerStackOrdering;
|
||||
use codex_config::LoaderOverrides;
|
||||
use codex_config::NoopThreadConfigLoader;
|
||||
use codex_config::RemoteThreadConfigLoader;
|
||||
@@ -355,10 +354,7 @@ fn app_text_range(range: &CoreTextRange) -> AppTextRange {
|
||||
fn project_config_warning(config: &Config) -> Option<ConfigWarningNotification> {
|
||||
let mut disabled_folders = Vec::new();
|
||||
|
||||
for layer in config.config_layer_stack.get_layers(
|
||||
ConfigLayerStackOrdering::LowestPrecedenceFirst,
|
||||
/*include_disabled*/ true,
|
||||
) {
|
||||
for layer in config.config_layer_stack.all_layers_low_to_high() {
|
||||
let ConfigLayerSource::Project { dot_codex_folder } = &layer.name else {
|
||||
continue;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user