mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
core: rename metadata -> internal_chat_message_metadata_passthrough (#28968)
## Description This PR cuts Codex over from generic `ResponseItem.metadata` (introduced here: https://github.com/openai/codex/pull/28355) to `ResponseItem.internal_chat_message_metadata_passthrough`, which is the blessed path and has strongly-typed keys. For now we have to drop this MAv2 usage of `metadata`: https://github.com/openai/codex/pull/28561 until we figure out where that should live.
This commit is contained in:
1 parent
9f06cf1a09
commit
5b95745eae
77 files changed
+866
-797
No files matched your search
@@ -42,7 +42,6 @@ use crate::models::MessagePhase;
|
||||
use crate::models::PermissionProfile;
|
||||
use crate::models::ResponseInputItem;
|
||||
use crate::models::ResponseItem;
|
||||
use crate::models::ResponseItemMetadata;
|
||||
use crate::models::SandboxEnforcement;
|
||||
use crate::models::WebSearchAction;
|
||||
use crate::num_format::format_with_separators;
|
||||
@@ -697,9 +696,6 @@ pub struct InterAgentCommunication {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
pub encrypted_content: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
pub metadata: Option<ResponseItemMetadata>,
|
||||
pub trigger_turn: bool,
|
||||
}
|
||||
|
||||
@@ -717,7 +713,6 @@ impl InterAgentCommunication {
|
||||
other_recipients,
|
||||
content,
|
||||
encrypted_content: None,
|
||||
metadata: None,
|
||||
trigger_turn,
|
||||
}
|
||||
}
|
||||
@@ -735,7 +730,6 @@ impl InterAgentCommunication {
|
||||
other_recipients,
|
||||
content: String::new(),
|
||||
encrypted_content: Some(encrypted_content),
|
||||
metadata: None,
|
||||
trigger_turn,
|
||||
}
|
||||
}
|
||||
@@ -779,7 +773,7 @@ impl InterAgentCommunication {
|
||||
author: self.author.to_string(),
|
||||
recipient: self.recipient.to_string(),
|
||||
content,
|
||||
metadata: self.metadata.clone(),
|
||||
internal_chat_message_metadata_passthrough: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3060,7 +3054,7 @@ impl From<CompactedItem> for ResponseItem {
|
||||
text: value.message,
|
||||
}],
|
||||
phase: None,
|
||||
metadata: None,
|
||||
internal_chat_message_metadata_passthrough: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4349,7 +4343,6 @@ mod tests {
|
||||
other_recipients: vec![AgentPath::root().join("worker").expect("recipient path")],
|
||||
content: "review the diff".to_string(),
|
||||
encrypted_content: None,
|
||||
metadata: None,
|
||||
trigger_turn: true,
|
||||
};
|
||||
|
||||
@@ -4390,7 +4383,7 @@ mod tests {
|
||||
encrypted_content: "encrypted payload".to_string(),
|
||||
},
|
||||
],
|
||||
metadata: None,
|
||||
internal_chat_message_metadata_passthrough: None,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user