diff options
| author | Michelle Tilley <michelle@michelletilley.net> | 2026-04-16 13:56:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-16 21:56:51 +0100 |
| commit | 6e48427c73142b4159bd9a0ab6b4f1eba2a15d4b (patch) | |
| tree | 3646b42f782f1d31ce3bc5d220f742d3c210a7ce | |
| parent | chore: Fix Claude release skill to properly catch completed checks (diff) | |
| download | atuin-6e48427c73142b4159bd9a0ab6b4f1eba2a15d4b.zip | |
fix: Tab doesn't insert suggested command (#3420)
| -rw-r--r-- | crates/atuin-ai/src/tui/components/atuin_ai.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/crates/atuin-ai/src/tui/components/atuin_ai.rs b/crates/atuin-ai/src/tui/components/atuin_ai.rs index 848a001a..c7227fbd 100644 --- a/crates/atuin-ai/src/tui/components/atuin_ai.rs +++ b/crates/atuin-ai/src/tui/components/atuin_ai.rs @@ -90,6 +90,16 @@ fn atuin_ai( return EventResult::Consumed; } + if *code == KeyCode::Tab + && matches!(props.mode, AppMode::Input) + && modifiers.contains(KeyModifiers::NONE) + && props.has_command + && props.is_input_blank + { + let _ = tx.send(AiTuiEvent::InsertCommand); + return EventResult::Consumed; + } + EventResult::Ignored }); @@ -110,13 +120,6 @@ fn atuin_ai( match props.mode { AppMode::Input => match code { - KeyCode::Tab => { - if props.has_command && props.is_input_blank { - let _ = tx.send(AiTuiEvent::InsertCommand); - return EventResult::Consumed; - } - EventResult::Ignored - } KeyCode::Enter => { if props.has_command && props.is_input_blank { let _ = tx.send(AiTuiEvent::ExecuteCommand); |
