mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08: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:
@@ -883,6 +883,7 @@ text(JSON.stringify(result));
|
||||
config.current_time_reminder = Some(CurrentTimeReminderConfig {
|
||||
reminder_interval_seconds: 3_000,
|
||||
clock_source: CurrentTimeSource::System,
|
||||
..CurrentTimeReminderConfig::default()
|
||||
});
|
||||
},
|
||||
)
|
||||
|
||||
@@ -86,6 +86,7 @@ fn enable_current_time_reminder(
|
||||
config.current_time_reminder = Some(CurrentTimeReminderConfig {
|
||||
reminder_interval_seconds: interval,
|
||||
clock_source,
|
||||
..CurrentTimeReminderConfig::default()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ use core_test_support::test_codex::local_selections;
|
||||
use std::sync::Arc;
|
||||
|
||||
use codex_core::CodexThread;
|
||||
use codex_core::config::CurrentTimeReminderConfig;
|
||||
use codex_features::Feature;
|
||||
use codex_protocol::AgentPath;
|
||||
use codex_protocol::items::SleepItem;
|
||||
@@ -390,8 +391,12 @@ async fn any_new_input_interrupts_sleep() {
|
||||
.with_config(|config| {
|
||||
config
|
||||
.features
|
||||
.enable(Feature::SleepTool)
|
||||
.expect("test config should allow feature update");
|
||||
.enable(Feature::CurrentTimeReminder)
|
||||
.expect("test config should allow current-time reminders");
|
||||
config.current_time_reminder = Some(CurrentTimeReminderConfig {
|
||||
sleep_tool: true,
|
||||
..CurrentTimeReminderConfig::default()
|
||||
});
|
||||
})
|
||||
.build_with_streaming_server(&server)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user