feat(config): add client side and server side config registries

This commit is contained in:
ItzCrazyKns
2025-10-13 22:01:17 +05:30
parent e7fbab12ed
commit e45a9af9ff
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
"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', '')

View File

@@ -0,0 +1 @@
/* TODO: add server opts */