mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
tui: share pending steer compare key logic
This commit is contained in:
@@ -116,19 +116,7 @@ impl ChatWidget {
|
||||
pub(super) fn pending_steer_compare_key_from_item(
|
||||
item: &codex_protocol::items::UserMessageItem,
|
||||
) -> PendingSteerCompareKey {
|
||||
let mut image_count = 0;
|
||||
for input in &item.content {
|
||||
match input {
|
||||
UserInput::Image { .. } | UserInput::LocalImage { .. } => image_count += 1,
|
||||
UserInput::Text { .. } | UserInput::Skill { .. } | UserInput::Mention { .. } => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
PendingSteerCompareKey {
|
||||
message: item.message(),
|
||||
image_count,
|
||||
}
|
||||
Self::pending_steer_compare_key_from_items(&item.content)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user