Search through all messages in session, not just first message

- SessionManager now collects text from all user and assistant messages
- Added allMessagesText field containing concatenated message text
- Search now matches against all messages in a session
- More powerful session discovery (e.g., search "write file" finds any session discussing file writing)
This commit is contained in:
Mario Zechner 2025-11-12 09:32:14 +01:00
parent 101a6c4ef3
commit 9dac37d836
2 changed files with 19 additions and 5 deletions

View file

@ -18,6 +18,7 @@ interface SessionItem {
modified: Date;
messageCount: number;
firstMessage: string;
allMessagesText: string;
}
/**
@ -57,7 +58,8 @@ class SessionList implements Component {
.split(/\s+/)
.filter((t) => t);
this.filteredSessions = this.allSessions.filter((session) => {
const searchText = session.firstMessage.toLowerCase();
// Search through all messages in the session
const searchText = session.allMessagesText.toLowerCase();
return searchTokens.every((token) => searchText.includes(token));
});
}