mirror of
https://github.com/openai/codex.git
synced 2026-11-05 08:28:29 +00:00
[codex] nest sleep config under current time reminder (#29910)
## Summary - move sleep tool enablement from top-level `[features].sleep_tool` to `[features.current_time_reminder].sleep_tool` - remove the standalone `Feature::SleepTool` flag and gate `clock.sleep` from resolved current-time configuration - update config schema, config-lock materialization, and existing sleep coverage Stacked on #29907.
This commit is contained in:
1 parent
800529218a
commit
35f5d02464
12 files changed
+51
-28
No files matched your search
@@ -1037,7 +1037,7 @@ pub struct Config {
|
||||
pub token_budget: Option<TokenBudgetConfig>,
|
||||
/// Shared token budget for the root thread and its sub-agents.
|
||||
pub rollout_budget: Option<RolloutBudgetConfig>,
|
||||
/// Current-time reminder configuration, when enabled.
|
||||
/// Current-time reminder and clock tool configuration, when enabled.
|
||||
pub current_time_reminder: Option<CurrentTimeReminderConfig>,
|
||||
|
||||
/// Centralized feature flags; source of truth for feature gating.
|
||||
@@ -1117,6 +1117,8 @@ pub struct RolloutBudgetConfig {
|
||||
pub struct CurrentTimeReminderConfig {
|
||||
pub reminder_interval_seconds: u64,
|
||||
pub clock_source: CurrentTimeSource,
|
||||
/// Whether to expose the input-interruptible `clock.sleep` tool.
|
||||
pub sleep_tool: bool,
|
||||
}
|
||||
|
||||
impl Default for CurrentTimeReminderConfig {
|
||||
@@ -1124,6 +1126,7 @@ impl Default for CurrentTimeReminderConfig {
|
||||
Self {
|
||||
reminder_interval_seconds: 1,
|
||||
clock_source: CurrentTimeSource::System,
|
||||
sleep_tool: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2675,6 +2678,9 @@ fn resolve_current_time_reminder_config(
|
||||
clock_source: base
|
||||
.and_then(|config| config.clock_source)
|
||||
.unwrap_or(default.clock_source),
|
||||
sleep_tool: base
|
||||
.and_then(|config| config.sleep_tool)
|
||||
.unwrap_or(default.sleep_tool),
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user