notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit f387d09e92dc349c09fc5e1183e6e85da1b81396
parent 9dea6f83985e8c0b7694bd191fb8de52b97ea629
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 26 Jan 2026 18:53:35 -0800

dave: auto-focus input when switching agents via Tab/number keys

Focus the input box when cycling between agents with Tab/Shift+Tab or
number keys 1-9, but only when there's no pending permission request
that needs user attention.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Diffstat:
Mcrates/notedeck_dave/src/lib.rs | 18++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/crates/notedeck_dave/src/lib.rs b/crates/notedeck_dave/src/lib.rs @@ -684,6 +684,12 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr if self.show_scene { self.scene.select(id); } + // Focus input if no permission request is pending + if let Some(session) = self.session_manager.get_mut(id) { + if session.pending_permissions.is_empty() { + session.focus_requested = true; + } + } } } @@ -704,6 +710,12 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr if self.show_scene { self.scene.select(id); } + // Focus input if no permission request is pending + if let Some(session) = self.session_manager.get_mut(id) { + if session.pending_permissions.is_empty() { + session.focus_requested = true; + } + } } } @@ -728,6 +740,12 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr if self.show_scene { self.scene.select(id); } + // Focus input if no permission request is pending + if let Some(session) = self.session_manager.get_mut(id) { + if session.pending_permissions.is_empty() { + session.focus_requested = true; + } + } } }