feat(gui): add ANSI escape sequence renderer with full panel integration

- new ansi_render module: SGR, cursor movement, erase, scroll
- integrate ANSI rendering into console panel output pipeline
- wire app_state, buffers, hex_view, and shortcuts for ANSI-aware display
- add test_ansi.py for manual ANSI sequence testing
This commit is contained in:
2026-06-14 04:12:35 +08:00
parent e600418da8
commit 4e4c9cee65
11 changed files with 819 additions and 55 deletions

View File

@@ -1310,18 +1310,22 @@ fn render_send_panel(ui: &mut egui::Ui, manager: &SessionManager, tab: &mut Sess
ui.add_space(3.0);
let hint = match tab.send_mode {
SendMode::Text => "Enter text to send",
SendMode::Text => "Enter to send, Ctrl+Enter for newline",
SendMode::Hex => "Enter hex bytes, e.g. 48 65 6C 6C 6F",
};
let response = ui.add(
TextEdit::multiline(&mut tab.send_input)
.desired_rows(6)
.desired_width(f32::INFINITY)
.return_key(egui::KeyboardShortcut::new(
egui::Modifiers::COMMAND,
egui::Key::Enter,
))
.hint_text(hint),
);
let wants_submit = response.has_focus()
&& ui.input(|input| input.key_pressed(egui::Key::Enter) && input.modifiers.command_only());
&& ui.input(|input| input.key_pressed(egui::Key::Enter) && input.modifiers.is_none());
let mut send_clicked = false;
ui.horizontal(|ui| {