dd local_image_content_items

This commit is contained in:
Charles Cunningham
2026-01-09 13:44:42 -08:00
parent c6d6fa8e71
commit 509952dc4b
2 changed files with 4 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ use crate::tools::registry::ToolHandler;
use crate::tools::registry::ToolKind;
use codex_protocol::models::ContentItem;
use codex_protocol::models::ResponseInputItem;
use codex_protocol::models::local_image_content_items;
use codex_protocol::models::local_image_content_items_with_label_number;
pub struct ViewImageHandler;
@@ -65,7 +65,8 @@ impl ToolHandler for ViewImageHandler {
}
let event_path = abs_path.clone();
let content: Vec<ContentItem> = local_image_content_items(&abs_path, false);
let content: Vec<ContentItem> =
local_image_content_items_with_label_number(&abs_path, false, 1);
let input = ResponseInputItem::Message {
role: "user".to_string(),
content,

View File

@@ -227,11 +227,7 @@ fn unsupported_image_error_placeholder(path: &std::path::Path, mime: &str) -> Co
}
}
pub fn local_image_content_items(path: &std::path::Path, include_label: bool) -> Vec<ContentItem> {
local_image_content_items_with_label_number(path, include_label, 1)
}
fn local_image_content_items_with_label_number(
pub fn local_image_content_items_with_label_number(
path: &std::path::Path,
include_label: bool,
label_number: usize,