Files
codex/codex-rs/protocol/src/models/item_metadata.rs
pakrym-oai eff640f458 Preserve content item kinds in message metadata (#40174)
## 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
2026-08-23 02:50:45 +00:00

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;