File tree Expand file tree Collapse file tree
crates/jcode-tui/src/tui/ui_tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -350,6 +350,9 @@ fn test_prefix_reuse_edit_recomputes_region_height_not_stale() {
350350 DisplayMessage :: assistant( "rendered" ) ,
351351 ] ,
352352 messages_version : 1 ,
353+ // Tool images now start collapsed. Exercise the expanded geometry
354+ // path explicitly so this still detects stale cached image heights.
355+ image_expand_level : Some ( crate :: tui:: ImageExpandLevel :: Large ) ,
353356 side_pane_images : vec ! [ anchored_tool_image_with(
354357 "region-tool-grow" ,
355358 IMG_REGION_WIDE_PNG_B64 ,
@@ -368,6 +371,7 @@ fn test_prefix_reuse_edit_recomputes_region_height_not_stale() {
368371 DisplayMessage :: assistant( "rendered" ) ,
369372 ] ,
370373 messages_version : 2 ,
374+ image_expand_level : Some ( crate :: tui:: ImageExpandLevel :: Large ) ,
371375 side_pane_images : vec ! [ anchored_tool_image_with(
372376 "region-tool-grow" ,
373377 IMG_REGION_TALL_PNG_B64 ,
Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ struct TestState {
144144 side_pane_images : Vec < crate :: session:: RenderedImage > ,
145145 pin_images : bool ,
146146 inline_images_visible : bool ,
147+ image_expand_level : Option < crate :: tui:: ImageExpandLevel > ,
147148 cache_ttl_status : Option < crate :: tui:: CacheTtlInfo > ,
148149 openai_reset_hint : Option < & ' static str > ,
149150 status_notice : Option < String > ,
@@ -184,6 +185,9 @@ impl crate::tui::TuiState for TestState {
184185 fn side_pane_images ( & self ) -> Vec < crate :: session:: RenderedImage > {
185186 self . side_pane_images . clone ( )
186187 }
188+ fn image_expand_level ( & self , _id : u64 ) -> crate :: tui:: ImageExpandLevel {
189+ self . image_expand_level . unwrap_or_default ( )
190+ }
187191 fn display_messages_version ( & self ) -> u64 {
188192 self . messages_version
189193 }
You can’t perform that action at this time.
0 commit comments