aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-ai/Cargo.toml
diff options
context:
space:
mode:
authorMichelle Tilley <michelle@michelletilley.net>2026-04-23 20:31:53 -0700
committerGitHub <noreply@github.com>2026-04-23 20:31:53 -0700
commitf72fdf7565d18b044f035fa6aca9ae8dbba34fc6 (patch)
treed0c08204ed712f0f788cd262f56894b8a2af7d49 /crates/atuin-ai/Cargo.toml
parentfeat: Add skill discovery, loading, and invocation (#3444) (diff)
downloadatuin-f72fdf7565d18b044f035fa6aca9ae8dbba34fc6.zip
perf: Reduce AI TUI rendering overhead for long conversations (#3447)
Fixes keystroke lag in Atuin AI that scales with conversation length. After extended use (many turns, lots of tool calls with output viewports), pressing a key had noticeable delay before the letter appeared. Three layers of optimization: - **Skip `sync_view_state` for `InputUpdated`** — every keystroke was cloning all events, tools, and archived data even though no FSM state changed. Uses `handle.update_tracked()` (eye_declare 0.5) to skip rebuilds when values haven't actually changed. - **Pre-compute turns and `has_command` on the driver thread** — the view function was rebuilding the full turn structure from raw events and scanning for `suggest_command` tool calls 3× per render frame. Now computed once per FSM state change and cached in ViewState. - **Commit-based element tree pruning** — turns that scroll into terminal scrollback are tracked via `on_commit` and filtered from the element tree, keeping rendering work proportional to visible content. Turn views are now direct children of the root VStack (not nested inside AtuinAi) so `detect_committed` can see them.
Diffstat (limited to 'crates/atuin-ai/Cargo.toml')
-rw-r--r--crates/atuin-ai/Cargo.toml2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/atuin-ai/Cargo.toml b/crates/atuin-ai/Cargo.toml
index 90e64b2a..377017b7 100644
--- a/crates/atuin-ai/Cargo.toml
+++ b/crates/atuin-ai/Cargo.toml
@@ -45,7 +45,7 @@ async-stream = "0.3"
uuid = { workspace = true }
tui-textarea-2 = "0.10.2"
unicode-width = "0.2"
-eye_declare = "0.4.3"
+eye_declare = "0.5"
ratatui-core = "0.1"
ratatui-widgets = "0.3"
thiserror = { workspace = true }