feat: disable memory endpoint (#17626)

This commit is contained in:
jif-oai
2026-04-13 18:29:49 +01:00
committed by GitHub
parent ac82443d07
commit 46a266cd6a
16 changed files with 478 additions and 0 deletions

View File

@@ -636,6 +636,12 @@ pub enum Op {
/// involve the model.
SetThreadName { name: String },
/// Set whether the thread remains eligible for memory generation.
///
/// This persists thread-level memory mode metadata without involving the
/// model.
SetThreadMemoryMode { mode: ThreadMemoryMode },
/// Request Codex to undo a turn (turn are stacked so it is the same effect as CMD + Z).
Undo,
@@ -665,6 +671,13 @@ pub enum Op {
ListModels,
}
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "lowercase")]
pub enum ThreadMemoryMode {
Enabled,
Disabled,
}
impl From<Vec<UserInput>> for Op {
fn from(value: Vec<UserInput>) -> Self {
Op::UserInput {
@@ -755,6 +768,7 @@ impl Op {
Self::DropMemories => "drop_memories",
Self::UpdateMemories => "update_memories",
Self::SetThreadName { .. } => "set_thread_name",
Self::SetThreadMemoryMode { .. } => "set_thread_memory_mode",
Self::Undo => "undo",
Self::ThreadRollback { .. } => "thread_rollback",
Self::Review { .. } => "review",