From b649a7ab8de6488c1341e94c37d032c07d5b3f13 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Thu, 26 Mar 2026 19:19:47 -0700 Subject: feat: Use eye-declare for more performant and flexible AI TUI (#3343) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR replaces the mess of custom rendering code in Atuin AI with [eye-declare](https://github.com/BinaryMuse/eye-declare), and updates the TUI to feel more terminal-native: output appears inline and persists in scrollback, so you can scroll up and look at previous conversations for reference. The "review" state — which used to exist between the LLM generating a response and the user either executing or following up — has been removed; just start typing to follow up with the LLM, or press `enter` at the empty input box to execute the suggested command. image --- Cargo.lock | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 6ca79192..03e78c09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -277,11 +277,14 @@ dependencies = [ "crossterm", "directories", "eventsource-stream", + "eye_declare", "eyre", "futures", "pretty_assertions", "pulldown-cmark", "ratatui", + "ratatui-core", + "ratatui-widgets", "reqwest", "serde", "serde_json", @@ -1493,6 +1496,32 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "eye_declare" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29f7a306e9da6182b45de1c5e29ca9d469f6aa4cd0bdd6ff0da4bdaf67bec4ff" +dependencies = [ + "crossterm", + "eye_declare_macros", + "futures", + "ratatui-core", + "ratatui-widgets", + "tokio", + "unicode-width 0.2.2", +] + +[[package]] +name = "eye_declare_macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c552b6cb631a6826de9c793d7f1b620e4007c6f8ee584f2bc428d193c14b3381" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "eyre" version = "0.6.12" @@ -5462,9 +5491,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tui-textarea-2" -version = "0.9.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae981fdb654241cb325bf15b78adba3ce21ad85972ebe4820ad7dc7f2884e49" +checksum = "74a31ca0965e3ff6a7ac5ecb02b20a88b4f68ebf138d8ae438e8510b27a1f00f" dependencies = [ "crossterm", "portable-atomic", -- cgit v1.3.1