notedeck

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

commit 0b4456b2cc26e9aecc0a56a5bdd52be1c1fd0351
parent 099f8b02622eb2be467c41579ae55db5c546cf54
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 27 Jan 2026 07:16:19 -0800

dave: use last user message for scene node title instead of first

The title now updates to reflect the most recent message, making it
easier to identify what each agent is currently working on.

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

Diffstat:
Mcrates/notedeck_dave/src/lib.rs | 2+-
Mcrates/notedeck_dave/src/session.rs | 8++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/crates/notedeck_dave/src/lib.rs b/crates/notedeck_dave/src/lib.rs @@ -764,7 +764,7 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr if let Some(session) = self.session_manager.get_active_mut() { session.chat.push(Message::User(session.input.clone())); session.input.clear(); - session.update_title_from_first_message(); + session.update_title_from_last_message(); } self.send_user_message(app_ctx, ui.ctx()); } diff --git a/crates/notedeck_dave/src/session.rs b/crates/notedeck_dave/src/session.rs @@ -59,11 +59,11 @@ impl ChatSession { } } - /// Update the session title from the first user message - pub fn update_title_from_first_message(&mut self) { - for msg in &self.chat { + /// Update the session title from the last user message + pub fn update_title_from_last_message(&mut self) { + for msg in self.chat.iter().rev() { if let Message::User(text) = msg { - // Use first ~30 chars of first user message as title + // Use first ~30 chars of last user message as title let title: String = text.chars().take(30).collect(); self.title = if text.len() > 30 { format!("{}...", title)