mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
Make environment context date and timezone configurable (#52164)
## What changed Add `include_environment_context_time`, enabled by default. Setting it to `false` omits `<current_date>` and `<timezone>` while retaining the rest of the environment context, and skips the clock read used to populate the date. ## Testing Extend configuration, session context, and external time provider tests to cover enabled and disabled time fields, context updates across turns, and current-time reminder behavior. GitOrigin-RevId: 5071ce1701c044b680624d0cdbba7e0bc2b5bbe6
This commit is contained in:
@@ -265,6 +265,9 @@ pub struct ConfigToml {
|
||||
/// Whether to inject the `<environment_context>` user block.
|
||||
pub include_environment_context: Option<bool>,
|
||||
|
||||
/// Whether environment context includes the current date and timezone.
|
||||
pub include_environment_context_time: Option<bool>,
|
||||
|
||||
/// Optional path to a file containing model instructions that will override
|
||||
/// the built-in instructions for the selected model. Users are STRONGLY
|
||||
/// DISCOURAGED from using this field, as deviating from the instructions
|
||||
|
||||
@@ -55,6 +55,7 @@ pub struct ConfigProfile {
|
||||
pub include_apps_instructions: Option<bool>,
|
||||
pub include_collaboration_mode_instructions: Option<bool>,
|
||||
pub include_environment_context: Option<bool>,
|
||||
pub include_environment_context_time: Option<bool>,
|
||||
pub experimental_use_unified_exec_tool: Option<bool>,
|
||||
pub tools: Option<ToolsToml>,
|
||||
pub web_search: Option<WebSearchMode>,
|
||||
|
||||
Reference in New Issue
Block a user