Files
Perplexica/src/lib/config/clientRegistry.ts
2025-10-14 10:05:31 +05:30

17 lines
488 B
TypeScript

'use client';
const getClientConfig = (key: string, defaultVal?: any) => {
return localStorage.getItem(key) ?? defaultVal ?? undefined;
};
export const getTheme = () => getClientConfig('theme', 'dark');
export const getAutoImageSearch = () =>
Boolean(getClientConfig('autoImageSearch', 'true'));
export const getAutoVideoSearch = () =>
Boolean(getClientConfig('autoVideoSearch', 'true'));
export const getSystemInstructions = () =>
getClientConfig('systemInstructions', '');