Grow interactive prompt pane to 75% of the screen

Claude Code clips AskUserQuestion option lists to the rows available;
60% was still cutting options off. Also relax the upper clamp so small
terminals give the prompt as much as possible (6 rows reserved).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jonas H
2026-06-11 08:44:26 +02:00
parent 4f9331e274
commit a770052673

View File

@@ -194,12 +194,14 @@ fn event_loop(
fn draw(f: &mut Frame, app: &SharedApp, eui: &mut EmbedUi) { fn draw(f: &mut Frame, app: &SharedApp, eui: &mut EmbedUi) {
let mut a = app.lock().unwrap(); let mut a = app.lock().unwrap();
// Embedded pane height: nothing when hidden; ~35% of the screen normally, // Embedded pane height: nothing when hidden; ~35% of the screen normally,
// ~60% while the tap says an interactive prompt is on screen. // 75% while the tap says an interactive prompt is on screen — Claude
// Code's question UI clips its option list to the rows it gets, so the
// prompt wants as much height as we can spare.
let show_embed = eui.visible && eui.term.is_some(); let show_embed = eui.visible && eui.term.is_some();
let embed_h = if show_embed { let embed_h = if show_embed {
let total = f.area().height; let total = f.area().height;
let pct = if a.embed_grow { 60 } else { 35 }; let pct = if a.embed_grow { 75 } else { 35 };
((total as u32 * pct / 100) as u16).clamp(10, total.saturating_sub(10)) ((total as u32 * pct / 100) as u16).clamp(10, total.saturating_sub(6))
} else { } else {
0 0
}; };