mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 19:04:37 +00:00
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:
parent
101a6c4ef3
commit
9dac37d836
2 changed files with 19 additions and 5 deletions
|
|
@ -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));
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue