From bc9e62e8e24f5e218acd471404455ef57bc7d752 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Fri, 27 Mar 2026 10:45:04 -0700 Subject: chore(deps): Update to eye-declare v0.2.0 (#3355) eye-declare v0.2.0 includes two relevant changes: * "Capture-phase" event handling lets us remove the special-case event handling in `InputBox` that allowed global keyboard binds to work; the `AtuinAi` component now handles this directly. * `Tracked::read()` allows reading fields in tracked state without triggering the dirty-tracking from the `DerefMut` implementation, allowing us to send messages on the app event bus without marking the containing state as dirty. --- crates/atuin-ai/src/tui/components/atuin_ai.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/atuin-ai/src/tui/components/atuin_ai.rs') diff --git a/crates/atuin-ai/src/tui/components/atuin_ai.rs b/crates/atuin-ai/src/tui/components/atuin_ai.rs index 680b93ed..b2239a70 100644 --- a/crates/atuin-ai/src/tui/components/atuin_ai.rs +++ b/crates/atuin-ai/src/tui/components/atuin_ai.rs @@ -7,7 +7,7 @@ use std::sync::mpsc; use crossterm::event::{Event, KeyCode, KeyEvent, KeyEventKind, KeyModifiers}; -use eye_declare::{Component, EventResult, Hooks, impl_slot_children}; +use eye_declare::{Component, EventResult, Hooks, Tracked, impl_slot_children}; use crate::tui::events::AiTuiEvent; use crate::tui::state::AppMode; @@ -67,7 +67,9 @@ impl Component for AtuinAi { 0 } - fn handle_event(&self, event: &Event, state: &mut Self::State) -> EventResult { + fn handle_event_capture(&self, event: &Event, state: &mut Tracked) -> EventResult { + let state = state.read(); + let Event::Key(KeyEvent { code, kind: KeyEventKind::Press, -- cgit v1.3.1