Skip to content
Draft
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions codex-rs/app-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use codex_core::ExecPolicyError;
use codex_core::check_execpolicy_for_warnings;
use codex_core::config_loader::ConfigLoadError;
use codex_core::config_loader::TextRange as CoreTextRange;
use codex_core::config_loader::format_expansion_warnings;
use codex_feedback::CodexFeedback;
use tokio::io::AsyncBufReadExt;
use tokio::io::AsyncWriteExt;
Expand Down Expand Up @@ -163,6 +164,20 @@ fn project_config_warning(config: &Config) -> Option<ConfigWarningNotification>
})
}

fn expansion_warning(config: &Config) -> Option<ConfigWarningNotification> {
let warnings = config.config_layer_stack.expansion_warnings();
if warnings.is_empty() {
return None;
}

Some(ConfigWarningNotification {
summary: format_expansion_warnings(&warnings),
details: None,
path: None,
range: None,
})
}

pub async fn run_main(
codex_linux_sandbox_exe: Option<PathBuf>,
cli_config_overrides: CliConfigOverrides,
Expand Down Expand Up @@ -241,6 +256,9 @@ pub async fn run_main(
if let Some(warning) = project_config_warning(&config) {
config_warnings.push(warning);
}
if let Some(warning) = expansion_warning(&config) {
config_warnings.push(warning);
}

let feedback = CodexFeedback::new();

Expand Down
Loading
Loading