@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.
16 lines (13 loc) • 538 B
text/typescript
import { useChatStore } from '@/store/chat';
import { useGlobalStore } from '@/store/global';
import { systemStatusSelectors } from '@/store/global/selectors';
import { useSessionStore } from '@/store/session';
/**
* Fetch topics for the current session
*/
export const useFetchTopics = () => {
const [sessionId] = useSessionStore((s) => [s.activeId]);
const useFetchTopics = useChatStore((s) => s.useFetchTopics);
const isDBInited = useGlobalStore(systemStatusSelectors.isDBInited);
useFetchTopics(isDBInited, sessionId);
};