mirror of
https://github.com/openai/codex.git
synced 2026-04-24 22:54:54 +00:00
Add text element metadata to types (#9235)
Initial type tweaking PR to make the diff of https://github.com/openai/codex/pull/9116 smaller This should not change any behavior, just adds some fields to types
This commit is contained in:
@@ -3125,7 +3125,11 @@ impl CodexMessageProcessor {
|
||||
let mapped_items: Vec<CoreInputItem> = items
|
||||
.into_iter()
|
||||
.map(|item| match item {
|
||||
WireInputItem::Text { text } => CoreInputItem::Text { text },
|
||||
WireInputItem::Text { text } => CoreInputItem::Text {
|
||||
text,
|
||||
// TODO: Thread text element ranges into v1 input handling.
|
||||
text_elements: Vec::new(),
|
||||
},
|
||||
WireInputItem::Image { image_url } => CoreInputItem::Image { image_url },
|
||||
WireInputItem::LocalImage { path } => CoreInputItem::LocalImage { path },
|
||||
})
|
||||
@@ -3171,7 +3175,11 @@ impl CodexMessageProcessor {
|
||||
let mapped_items: Vec<CoreInputItem> = items
|
||||
.into_iter()
|
||||
.map(|item| match item {
|
||||
WireInputItem::Text { text } => CoreInputItem::Text { text },
|
||||
WireInputItem::Text { text } => CoreInputItem::Text {
|
||||
text,
|
||||
// TODO: Thread text element ranges into v1 input handling.
|
||||
text_elements: Vec::new(),
|
||||
},
|
||||
WireInputItem::Image { image_url } => CoreInputItem::Image { image_url },
|
||||
WireInputItem::LocalImage { path } => CoreInputItem::LocalImage { path },
|
||||
})
|
||||
@@ -3333,6 +3341,7 @@ impl CodexMessageProcessor {
|
||||
id: turn_id.clone(),
|
||||
content: vec![V2UserInput::Text {
|
||||
text: display_text.to_string(),
|
||||
text_elements: Vec::new(),
|
||||
}],
|
||||
}]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user