UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

18 lines (12 loc) 501 B
import type { ChatStoreState } from '@/store/chat'; const showThread = (s: ChatStoreState) => !!s.threadStartMessageId || !!s.portalThreadId; const newThreadMode = (s: ChatStoreState) => s.newThreadMode; const portalCurrentThread = (s: ChatStoreState) => { if (!s.portalThreadId || !s.activeTopicId) return; return (s.threadMaps[s.activeTopicId] || []).find((t) => t.id === s.portalThreadId); }; export const portalThreadSelectors = { newThreadMode, portalCurrentThread, showThread, };