mirror of
https://github.com/openai/codex.git
synced 2026-09-20 12:47:38 +00:00
## What changed - Add `ContentItemKind` as an open-ended string classification and carry an optional list of kinds in `InternalChatMessageMetadataPassthrough`. - Keep unknown classification values intact during round trips, while treating a malformed `content_item_kinds` value as absent so the response item can still be loaded. ## Testing - Cover round trips for future classification values and deserialization of malformed metadata. GitOrigin-RevId: 5398cae5bb294a9f71ddd192e297177fab54a576
12 lines
310 B
Rust
12 lines
310 B
Rust
use serde::Deserialize;
|
|
use serde::Serialize;
|
|
|
|
/// Harness-owned classification for one position in an item's content array.
|
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
|
#[serde(transparent)]
|
|
pub struct ContentItemKind(pub String);
|
|
|
|
#[cfg(test)]
|
|
#[path = "item_metadata_tests.rs"]
|
|
mod tests;
|