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.

19 lines (15 loc) 545 B
import { devtools } from 'zustand/middleware'; import { isDev } from '@/utils/env'; export const chatGroupDevtools = (name: string) => devtools<any, any, any, any>( (store) => (...a: Parameters<typeof store>) => { const res = store(...a); if (isDev && res && typeof res === 'object' && 'internal_dispatchChatGroup' in res) { // @ts-ignore window.dispatchChatGroup = res.internal_dispatchChatGroup; } return res; }, { name: `LOBE_CHAT_CHAT_GROUP_STORE_${name}` }, );