fix: quick-access button title matching for plugin rooms (Assistent, Live KI, System)
This commit is contained in:
@@ -461,16 +461,22 @@ export function MessageSidebar() {
|
||||
const handleQuickAccess = (qa: QuickAccessDef) => {
|
||||
setCurrentView(qa.view);
|
||||
if (qa.view === 'conversations' && qa.filterPinned) {
|
||||
// Find pinned conversation matching the filter
|
||||
// Find pinned conversation matching the filter by title
|
||||
const filter = qa.filterPinned;
|
||||
const titleMap: Record<string, string[]> = {
|
||||
assistant: ['Assistent', 'assistent', 'assistant'],
|
||||
liveai: ['Live KI', 'live ki', 'liveai', 'proactive'],
|
||||
system: ['System', 'system'],
|
||||
};
|
||||
const matchTitles = titleMap[filter] || [filter];
|
||||
const match = pinnedConversations.find((c) =>
|
||||
c.metadata?.room_type === filter ||
|
||||
(filter && c.title?.toLowerCase().includes(filter)),
|
||||
matchTitles.some((t) => c.title?.toLowerCase() === t.toLowerCase()),
|
||||
);
|
||||
if (match) {
|
||||
handleSelectConversation(match.id);
|
||||
return;
|
||||
}
|
||||
// Fallback: if no pinned match, just show conversations list
|
||||
}
|
||||
if (qa.view === 'conversations' && !qa.filterPinned) {
|
||||
// 'all' — just show the list, select first if none active
|
||||
|
||||
Reference in New Issue
Block a user