mirror of
https://github.com/openai/codex.git
synced 2026-05-05 05:42:33 +03:00
Preserve null developer instructions (#16976)
Preserve explicit null developer-instruction overrides across app-server resume and fork flows.
This commit is contained in:
@@ -248,6 +248,10 @@ pub struct Config {
|
||||
/// Developer instructions override injected as a separate message.
|
||||
pub developer_instructions: Option<String>,
|
||||
|
||||
/// Explicit developer instructions override, preserving `null` as distinct
|
||||
/// from a missing override.
|
||||
pub developer_instructions_override: Option<Option<String>>,
|
||||
|
||||
/// Guardian-specific developer instructions override from requirements.toml.
|
||||
pub guardian_developer_instructions: Option<String>,
|
||||
|
||||
@@ -1761,6 +1765,7 @@ impl Config {
|
||||
let file_base_instructions =
|
||||
Self::try_read_non_empty_file(model_instructions_path, "model instructions file")?;
|
||||
let base_instructions = base_instructions.or_else(|| file_base_instructions.map(Some));
|
||||
let developer_instructions_override = developer_instructions.clone();
|
||||
let developer_instructions =
|
||||
developer_instructions.unwrap_or_else(|| cfg.developer_instructions.clone());
|
||||
let include_permissions_instructions = config_profile
|
||||
@@ -1945,6 +1950,7 @@ impl Config {
|
||||
base_instructions,
|
||||
personality,
|
||||
developer_instructions,
|
||||
developer_instructions_override,
|
||||
compact_prompt,
|
||||
commit_attribution,
|
||||
include_permissions_instructions,
|
||||
|
||||
Reference in New Issue
Block a user