commit 3cabaecea50ed660dc60cf6ebe008d90ed1e5041
parent f387d09e92dc349c09fc5e1183e6e85da1b81396
Author: William Casarin <jb55@jb55.com>
Date: Mon, 26 Jan 2026 18:57:00 -0800
dave: focus camera on new agent when spawned via N key
When pressing N to spawn a new agent in scene view, the camera now
animates to focus on the new node instead of leaving it offscreen.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/crates/notedeck_dave/src/lib.rs b/crates/notedeck_dave/src/lib.rs
@@ -554,10 +554,11 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr
// Request focus on the new session's input
if let Some(session) = self.session_manager.get_mut(id) {
session.focus_requested = true;
- }
- // Also update scene selection if in scene view
- if self.show_scene {
- self.scene.select(id);
+ // Also update scene selection and camera if in scene view
+ if self.show_scene {
+ self.scene.select(id);
+ self.scene.focus_on(session.scene_position);
+ }
}
}