Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion codex-rs/core/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,11 @@ pub const FEATURES: &[FeatureSpec] = &[
FeatureSpec {
id: Feature::ImageDetailOriginal,
key: "image_detail_original",
stage: Stage::UnderDevelopment,
stage: Stage::Experimental {
name: "Original image detail",
menu_description: "Send tool-emitted images with `detail: \"original\"` on supported models so the model sees the full-resolution image instead of a resized approximation. This affects tools like `view_image` and `js_repl`, not images attached directly in the UI. It is particularly important for CUA or localization tasks that depend on small text, precise layout, or exact UI targets.",
announcement: "NEW: Original image detail is now available in /experimental. Enable it to preserve full-resolution screenshots for CUA and localization tasks on supported models.",
},
default_enabled: false,
},
FeatureSpec {
Expand Down Expand Up @@ -882,6 +886,25 @@ mod tests {
assert_eq!(Feature::ImageGeneration.default_enabled(), false);
}

#[test]
fn image_detail_original_is_experimental_and_user_toggleable() {
let spec = Feature::ImageDetailOriginal.info();
let stage = spec.stage;

assert!(matches!(stage, Stage::Experimental { .. }));
assert_eq!(
stage.experimental_menu_name(),
Some("Original image detail")
);
assert_eq!(
stage.experimental_menu_description(),
Some(
"Send tool-emitted images with `detail: \"original\"` on supported models so the model sees the full-resolution image instead of a resized approximation. This affects tools like `view_image` and `js_repl`, not images attached directly in the UI. It is particularly important for CUA or localization tasks that depend on small text, precise layout, or exact UI targets."
)
);
assert_eq!(Feature::ImageDetailOriginal.default_enabled(), false);
}

#[test]
fn collab_is_legacy_alias_for_multi_agent() {
assert_eq!(feature_for_key("multi_agent"), Some(Feature::Collab));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
source: tui/src/chatwidget/tests.rs
expression: popup
---
Experimental features
Toggle experimental features. Changes are saved to config.toml.

› [ ] Original image detail Send tool-emitted images with `detail: "original"` on supported models so the model sees
the full-resolution image instead of a resized approximation. This affects tools like
`view_image` and `js_repl`, not images attached directly in the UI. It is particularly
important for CUA or localization tasks that depend on small text, precise layout, or
exact UI targets.

Press space to select or enter to save for next conversation
32 changes: 32 additions & 0 deletions codex-rs/tui/src/chatwidget/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6854,6 +6854,38 @@ async fn experimental_popup_shows_js_repl_node_requirement() {
);
}

#[tokio::test]
async fn experimental_features_popup_image_detail_original_snapshot() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;

let spec = FEATURES
.iter()
.find(|spec| spec.id == Feature::ImageDetailOriginal)
.expect("expected image_detail_original feature spec");
let name = spec
.stage
.experimental_menu_name()
.expect("expected image_detail_original experimental name");
let description = spec
.stage
.experimental_menu_description()
.expect("expected image_detail_original experimental description");

let view = ExperimentalFeaturesView::new(
vec![ExperimentalFeatureItem {
feature: Feature::ImageDetailOriginal,
name: name.to_string(),
description: description.to_string(),
enabled: false,
}],
chat.app_event_tx.clone(),
);
chat.bottom_pane.show_view(Box::new(view));

let popup = render_bottom_popup(&chat, 120);
assert_snapshot!("experimental_features_popup_image_detail_original", popup);
}

#[tokio::test]
async fn multi_agent_enable_prompt_snapshot() {
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
Expand Down
Loading