From 2eebedfea56c7d4827f94a2739dbb5fa006e3069 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Wed, 15 Jul 2026 06:00:03 +0700 Subject: [PATCH] feat: Deteksi trigger @mention dan Tab-cycle di input handler Co-Authored-By: Claude Sonnet 5 --- src/controller/input.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/controller/input.rs b/src/controller/input.rs index 971e3bd..e346404 100644 --- a/src/controller/input.rs +++ b/src/controller/input.rs @@ -7,6 +7,7 @@ use crossterm::event::{KeyCode, KeyEvent, KeyModifiers}; use crate::app::mode; use crate::app::runtime::actions::Action; use crate::app::runtime::commands::apply_command; +use crate::app::state::misc::AutocompleteKind; use crate::app::state::rest::AppStateRest; use crate::app::state::types::Overlay; use crate::controller::command::parse_command; @@ -247,6 +248,11 @@ pub fn handle_key(key: KeyEvent, state: &mut AppStateRest) -> Vec { state.input.tab_complete(); } state.dirty = true; + } else if state.input.autocomplete_kind == AutocompleteKind::FileMention + && state.input.autocomplete_visible + { + state.input.cycle_autocomplete(true); + state.dirty = true; } Vec::new() } @@ -263,6 +269,8 @@ pub fn handle_key(key: KeyEvent, state: &mut AppStateRest) -> Vec { // without requiring an extra Tab press. if state.input.buffer.starts_with('/') { state.input.open_autocomplete(); + } else if state.input.mention_query_at_cursor().is_some() { + state.input.open_mention_autocomplete(&state.mention_index.snapshot()); } Vec::new() }