mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-14 03:30:19 +00:00
🐛 fix: fix market error
This commit is contained in:
@@ -33,8 +33,13 @@ declare global {
|
||||
}
|
||||
|
||||
export const getClientConfig = () => ({
|
||||
AGENTS_INDEX_URL: process.env.AGENTS_INDEX_URL,
|
||||
PLUGINS_INDEX_URL: process.env.PLUGINS_INDEX_URL,
|
||||
AGENTS_INDEX_URL: !!process.env.AGENTS_INDEX_URL
|
||||
? process.env.AGENTS_INDEX_URL
|
||||
: 'https://chat-agents.lobehub.com',
|
||||
PLUGINS_INDEX_URL: !!process.env.PLUGINS_INDEX_URL
|
||||
? process.env.PLUGINS_INDEX_URL
|
||||
: 'https://chat-plugins.lobehub.com',
|
||||
|
||||
// custom model names
|
||||
CUSTOM_MODELS: process.env.NEXT_PUBLIC_CUSTOM_MODELS,
|
||||
|
||||
|
||||
+1
-5
@@ -15,8 +15,7 @@ export const ABOUT = pkg.homepage;
|
||||
export const FEEDBACK = pkg.bugs.url;
|
||||
export const DISCORD = 'https://discord.gg/AYFPHvv2jT';
|
||||
|
||||
export const PLUGINS_INDEX_URL =
|
||||
getClientConfig().PLUGINS_INDEX_URL ?? 'https://chat-plugins.lobehub.com';
|
||||
export const { PLUGINS_INDEX_URL, AGENTS_INDEX_URL } = getClientConfig();
|
||||
|
||||
export const getPluginIndexJSON = (lang: Locales = DEFAULT_LANG, baseUrl = PLUGINS_INDEX_URL) => {
|
||||
if (checkLang(lang)) return baseUrl;
|
||||
@@ -24,9 +23,6 @@ export const getPluginIndexJSON = (lang: Locales = DEFAULT_LANG, baseUrl = PLUGI
|
||||
return urlJoin(baseUrl, `index.${lang}.json`);
|
||||
};
|
||||
|
||||
export const AGENTS_INDEX_URL =
|
||||
getClientConfig().AGENTS_INDEX_URL ?? 'https://chat-agents.lobehub.com';
|
||||
|
||||
export const getAgentIndexJSON = (lang: Locales = DEFAULT_LANG, baseUrl = AGENTS_INDEX_URL) => {
|
||||
if (checkLang(lang)) return baseUrl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user