From b4a17e4346c97d837d0ee3a3a55c5ceca789a3e8 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Mon, 9 Mar 2026 14:28:32 -0700 Subject: feat: use pty proxy for rendering tui popups without clearing the terminal (#3234) It feels much, much nicer this way. This has also been asked for pretty consistently since we made inline rendering the default. Now we can have everything :) Maintains a shadow vt100 renderer so that we can restore the terminal state upon popup close. This happens on a background thread, so our impact on terminal performance should still be super minimal, if anything ## Checks - [ ] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [ ] I have checked that there are no existing pull requests for the same thing --- crates/atuin-ai/src/commands/debug_render.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/atuin-ai/src/commands/debug_render.rs') diff --git a/crates/atuin-ai/src/commands/debug_render.rs b/crates/atuin-ai/src/commands/debug_render.rs index e78a418a..b35d73c9 100644 --- a/crates/atuin-ai/src/commands/debug_render.rs +++ b/crates/atuin-ai/src/commands/debug_render.rs @@ -219,6 +219,8 @@ pub async fn run(input_file: Option, format: OutputFormat) -> Result<()> anchor_col: 0, textarea: Some(&state.textarea), max_height: debug_input.height, + popup_mode: false, + render_above: false, }; terminal.draw(|frame| { @@ -245,7 +247,11 @@ fn blocks_to_json(blocks: &Blocks) -> serde_json::Value { "title": block.title, "content": block.content.iter().map(content_to_json).collect::>() }) - }).collect::>() + }).collect::>(), + "status_bar": blocks.status_bar.as_ref().map(|sb| serde_json::json!({ + "frame": sb.frame, + "text": sb.text + })) }) } -- cgit v1.3.1