@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.
42 lines (37 loc) • 1.13 kB
text/typescript
import {
DataSyncConfig,
ElectronAppState,
NetworkProxySettings,
} from '@lobechat/electron-client-ipc';
export type RemoteServerError = 'CONFIG_ERROR' | 'AUTH_ERROR' | 'DISCONNECT_ERROR';
export const defaultProxySettings: NetworkProxySettings = {
enableProxy: false,
proxyBypass: 'localhost, 127.0.0.1, ::1',
proxyPort: '',
proxyRequireAuth: false,
proxyServer: '',
proxyType: 'http',
};
export interface ElectronState {
appState: ElectronAppState;
dataSyncConfig: DataSyncConfig;
desktopHotkeys: Record<string, string>;
isAppStateInit?: boolean;
isConnectingServer?: boolean;
isDesktopHotkeysInit: boolean;
isInitRemoteServerConfig: boolean;
isSyncActive?: boolean;
proxySettings: NetworkProxySettings;
remoteServerSyncError?: { message?: string; type: RemoteServerError };
}
export const initialState: ElectronState = {
appState: {},
dataSyncConfig: { storageMode: 'local' },
desktopHotkeys: {},
isAppStateInit: false,
isConnectingServer: false,
isDesktopHotkeysInit: false,
isInitRemoteServerConfig: false,
isSyncActive: false,
proxySettings: defaultProxySettings,
};