@lobehub/chat 1.15.25 → 1.15.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @lobehub/chat might be problematic. Click here for more details.

Files changed (70) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/locales/ar/chat.json +1 -1
  3. package/locales/ar/error.json +1 -1
  4. package/locales/bg-BG/chat.json +1 -1
  5. package/locales/bg-BG/error.json +1 -1
  6. package/locales/de-DE/chat.json +1 -1
  7. package/locales/de-DE/error.json +1 -1
  8. package/locales/en-US/chat.json +1 -1
  9. package/locales/en-US/error.json +1 -1
  10. package/locales/es-ES/chat.json +1 -1
  11. package/locales/es-ES/error.json +1 -1
  12. package/locales/fr-FR/chat.json +1 -1
  13. package/locales/fr-FR/error.json +1 -1
  14. package/locales/it-IT/chat.json +1 -1
  15. package/locales/it-IT/error.json +1 -1
  16. package/locales/ja-JP/chat.json +1 -1
  17. package/locales/ja-JP/error.json +1 -1
  18. package/locales/ko-KR/chat.json +1 -1
  19. package/locales/ko-KR/error.json +1 -1
  20. package/locales/nl-NL/chat.json +1 -1
  21. package/locales/nl-NL/error.json +1 -1
  22. package/locales/pl-PL/chat.json +1 -1
  23. package/locales/pl-PL/error.json +1 -1
  24. package/locales/pt-BR/chat.json +1 -1
  25. package/locales/pt-BR/error.json +1 -1
  26. package/locales/ru-RU/chat.json +1 -1
  27. package/locales/ru-RU/error.json +1 -1
  28. package/locales/tr-TR/chat.json +1 -1
  29. package/locales/tr-TR/error.json +1 -1
  30. package/locales/vi-VN/chat.json +1 -1
  31. package/locales/vi-VN/error.json +1 -1
  32. package/locales/zh-CN/chat.json +1 -1
  33. package/locales/zh-CN/error.json +1 -1
  34. package/locales/zh-TW/chat.json +1 -1
  35. package/locales/zh-TW/error.json +1 -1
  36. package/package.json +1 -1
  37. package/src/app/(main)/@nav/_layout/Desktop/BottomActions.tsx +12 -6
  38. package/src/app/(main)/@nav/_layout/Desktop/TopActions.tsx +1 -2
  39. package/src/app/(main)/chat/(workspace)/features/ShareButton/Preview.tsx +2 -2
  40. package/src/app/(main)/chat/@session/_layout/Desktop/SessionHeader.tsx +2 -1
  41. package/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +1 -1
  42. package/src/app/(main)/market/_layout/Desktop/Header.tsx +1 -1
  43. package/src/app/(main)/settings/about/features/Version.tsx +2 -2
  44. package/src/app/(main)/settings/hooks/useCategory.tsx +3 -2
  45. package/src/components/Branding/CustomLogo.tsx +72 -0
  46. package/src/components/Branding/index.tsx +21 -0
  47. package/src/components/FullscreenLoading/index.tsx +3 -2
  48. package/src/components/PageTitle/index.tsx +3 -1
  49. package/src/config/featureFlags/schema.ts +16 -1
  50. package/src/config/featureFlags/utils/parser.test.ts +8 -0
  51. package/src/config/modelProviders/perplexity.ts +14 -8
  52. package/src/config/modelProviders/siliconcloud.ts +11 -0
  53. package/src/const/branding.ts +6 -3
  54. package/src/const/meta.ts +2 -1
  55. package/src/const/version.ts +5 -0
  56. package/src/features/AlertBanner/CloudBanner.tsx +3 -2
  57. package/src/features/ChatInput/ActionBar/Knowledge/index.tsx +6 -1
  58. package/src/features/Conversation/components/InboxWelcome/index.tsx +2 -1
  59. package/src/features/PWAInstall/index.tsx +4 -1
  60. package/src/features/Setting/Footer.tsx +5 -1
  61. package/src/features/User/UserAvatar.tsx +2 -1
  62. package/src/features/User/UserPanel/useMenu.tsx +50 -47
  63. package/src/locales/default/chat.ts +1 -1
  64. package/src/locales/default/error.ts +1 -1
  65. package/src/server/ld.ts +1 -1
  66. package/src/store/file/slices/upload/action.ts +2 -0
  67. package/src/store/serverConfig/selectors.test.ts +2 -0
  68. package/public/images/logo.png +0 -0
  69. package/src/components/Branding/ProductLogo.tsx +0 -14
  70. package/src/components/Branding/index.ts +0 -1
@@ -0,0 +1,72 @@
1
+ import { LobeChatProps } from '@lobehub/ui/brand';
2
+ import Image from 'next/image';
3
+ import { memo } from 'react';
4
+ import { Flexbox } from 'react-layout-kit';
5
+
6
+ import { BRANDING_LOGO_URL, BRANDING_NAME } from '@/const/branding';
7
+
8
+ interface ProductLogoProps {
9
+ className?: string;
10
+ extra?: string;
11
+ size?: number;
12
+ type?: LobeChatProps['type'];
13
+ }
14
+
15
+ const CustomLogo = memo<ProductLogoProps>(({ size = 32, className, type }) => {
16
+ const textNode = (
17
+ <Flexbox
18
+ className={className}
19
+ height={size}
20
+ style={{
21
+ fontSize: size / 1.5,
22
+ fontWeight: 'bold',
23
+ userSelect: 'none',
24
+ }}
25
+ >
26
+ {BRANDING_NAME}
27
+ </Flexbox>
28
+ );
29
+
30
+ const imageNode = (
31
+ <Image
32
+ alt={BRANDING_NAME}
33
+ className={className}
34
+ height={size}
35
+ src={BRANDING_LOGO_URL}
36
+ unoptimized={true}
37
+ width={size}
38
+ />
39
+ );
40
+ switch (type) {
41
+ case 'text': {
42
+ return textNode;
43
+ }
44
+
45
+ case 'combine': {
46
+ return (
47
+ <Flexbox align={'center'} gap={4} horizontal>
48
+ {imageNode}
49
+ {textNode}
50
+ </Flexbox>
51
+ );
52
+ }
53
+
54
+ default:
55
+ case 'flat':
56
+ case 'mono':
57
+ case '3d': {
58
+ return (
59
+ <Image
60
+ alt={BRANDING_NAME}
61
+ className={className}
62
+ height={size}
63
+ src={BRANDING_LOGO_URL}
64
+ unoptimized={true}
65
+ width={size}
66
+ />
67
+ );
68
+ }
69
+ }
70
+ });
71
+
72
+ export default CustomLogo;
@@ -0,0 +1,21 @@
1
+ import { LobeChat, LobeChatProps } from '@lobehub/ui/brand';
2
+ import { memo } from 'react';
3
+
4
+ import { isCustomBranding } from '@/const/version';
5
+
6
+ import CustomLogo from './CustomLogo';
7
+
8
+ interface ProductLogoProps {
9
+ className?: string;
10
+ extra?: string;
11
+ size?: number;
12
+ type?: LobeChatProps['type'];
13
+ }
14
+
15
+ export const ProductLogo = memo<ProductLogoProps>(({ size, className, extra, type }) => {
16
+ if (isCustomBranding) {
17
+ return <CustomLogo className={className} extra={extra} size={size} type={type} />;
18
+ }
19
+
20
+ return <LobeChat className={className} extra={extra} size={size} type={type} />;
21
+ });
@@ -1,14 +1,15 @@
1
1
  import { Icon } from '@lobehub/ui';
2
- import { LobeChat } from '@lobehub/ui/brand';
3
2
  import { Loader2 } from 'lucide-react';
4
3
  import { memo } from 'react';
5
4
  import { Center, Flexbox } from 'react-layout-kit';
6
5
 
6
+ import { ProductLogo } from '@/components/Branding';
7
+
7
8
  const FullscreenLoading = memo<{ title?: string }>(({ title }) => {
8
9
  return (
9
10
  <Flexbox height={'100%'} style={{ userSelect: 'none' }} width={'100%'}>
10
11
  <Center flex={1} gap={12} width={'100%'}>
11
- <LobeChat size={48} type={'combine'} />
12
+ <ProductLogo size={48} type={'combine'} />
12
13
  <Center gap={16} horizontal>
13
14
  <Icon icon={Loader2} spin />
14
15
  {title}
@@ -1,8 +1,10 @@
1
1
  import { memo, useEffect } from 'react';
2
2
 
3
+ import { BRANDING_NAME } from '@/const/branding';
4
+
3
5
  const PageTitle = memo<{ title: string }>(({ title }) => {
4
6
  useEffect(() => {
5
- document.title = title ? `${title} · LobeChat` : 'LobeChat';
7
+ document.title = title ? `${title} · ${BRANDING_NAME}` : BRANDING_NAME;
6
8
  }, [title]);
7
9
 
8
10
  return null;
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
 
4
4
  export const FeatureFlagsSchema = z.object({
5
5
  /**
6
- *
6
+ * Enable WebRTC sync
7
7
  */
8
8
  webrtc_sync: z.boolean().optional(),
9
9
  check_updates: z.boolean().optional(),
@@ -32,6 +32,12 @@ export const FeatureFlagsSchema = z.object({
32
32
 
33
33
  // internal flag
34
34
  cloud_promotion: z.boolean().optional(),
35
+
36
+ // the flags below can only be used with commercial license
37
+ // if you want to use it in the commercial usage
38
+ // please contact us for more information: hello@lobehub.com
39
+ commercial_hide_github: z.boolean().optional(),
40
+ commercial_hide_docs: z.boolean().optional(),
35
41
  });
36
42
 
37
43
  export type IFeatureFlags = z.infer<typeof FeatureFlagsSchema>;
@@ -61,6 +67,12 @@ export const DEFAULT_FEATURE_FLAGS: IFeatureFlags = {
61
67
 
62
68
  market: true,
63
69
  speech_to_text: true,
70
+
71
+ // the flags below can only be used with commercial license
72
+ // if you want to use it in the commercial usage
73
+ // please contact us for more information: hello@lobehub.com
74
+ commercial_hide_github: false,
75
+ commercial_hide_docs: false,
64
76
  };
65
77
 
66
78
  export const mapFeatureFlagsEnvToState = (config: IFeatureFlags) => {
@@ -88,5 +100,8 @@ export const mapFeatureFlagsEnvToState = (config: IFeatureFlags) => {
88
100
 
89
101
  showMarket: config.market,
90
102
  enableSTT: config.speech_to_text,
103
+
104
+ hideGitHub: config.commercial_hide_github,
105
+ hideDocs: config.commercial_hide_docs,
91
106
  };
92
107
  };
@@ -24,6 +24,14 @@ describe('parseFeatureFlag', () => {
24
24
  });
25
25
  });
26
26
 
27
+ it('should hide content with commercial flags', () => {
28
+ const input = '+commercial_hide_github,+commercial_hide_docs';
29
+ expect(parseFeatureFlag(input)).toEqual({
30
+ commercial_hide_docs: true,
31
+ commercial_hide_github: true,
32
+ });
33
+ });
34
+
27
35
  it('invalid flag format return nothing', () => {
28
36
  const input = 'invalid_format';
29
37
  expect(parseFeatureFlag(input)).toEqual({});
@@ -4,27 +4,33 @@ import { ModelProviderCard } from '@/types/llm';
4
4
  const Perplexity: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
- displayName: 'Llama 3.1 Sonar Small Chat',
7
+ displayName: 'Llama 3.1 Sonar Small Online',
8
8
  enabled: true,
9
- id: 'llama-3.1-sonar-small-128k-chat',
9
+ id: 'llama-3.1-sonar-small-128k-online',
10
10
  tokens: 128_000,
11
11
  },
12
12
  {
13
- displayName: 'Llama 3.1 Sonar Large Chat',
13
+ displayName: 'Llama 3.1 Sonar Large Online',
14
14
  enabled: true,
15
- id: 'llama-3.1-sonar-large-128k-chat',
15
+ id: 'llama-3.1-sonar-large-128k-online',
16
16
  tokens: 128_000,
17
17
  },
18
18
  {
19
- displayName: 'Llama 3.1 Sonar Small Online',
19
+ displayName: 'Llama 3.1 Sonar Huge Online',
20
20
  enabled: true,
21
- id: 'llama-3.1-sonar-small-128k-online',
21
+ id: 'llama-3.1-sonar-huge-128k-online',
22
22
  tokens: 128_000,
23
23
  },
24
24
  {
25
- displayName: 'Llama 3.1 Sonar Large Online',
25
+ displayName: 'Llama 3.1 Sonar Small Chat',
26
26
  enabled: true,
27
- id: 'llama-3.1-sonar-large-128k-online',
27
+ id: 'llama-3.1-sonar-small-128k-chat',
28
+ tokens: 128_000,
29
+ },
30
+ {
31
+ displayName: 'Llama 3.1 Sonar Large Chat',
32
+ enabled: true,
33
+ id: 'llama-3.1-sonar-large-128k-chat',
28
34
  tokens: 128_000,
29
35
  },
30
36
  {
@@ -91,6 +91,12 @@ const SiliconCloud: ModelProviderCard = {
91
91
  id: 'internlm/internlm2_5-20b-chat',
92
92
  tokens: 32_768,
93
93
  },
94
+ {
95
+ displayName: 'DeepSeek V2.5',
96
+ enabled: true,
97
+ id: 'deepseek-ai/DeepSeek-V2.5',
98
+ tokens: 32_768,
99
+ },
94
100
  {
95
101
  displayName: 'DeepSeek V2 Chat',
96
102
  id: 'deepseek-ai/DeepSeek-V2-Chat',
@@ -136,6 +142,11 @@ const SiliconCloud: ModelProviderCard = {
136
142
  id: 'meta-llama/Meta-Llama-3.1-405B-Instruct',
137
143
  tokens: 32_768,
138
144
  },
145
+ {
146
+ displayName: 'Reflection Llama 3.1 70B',
147
+ id: 'mattshumer/Reflection-Llama-3.1-70B',
148
+ tokens: 32_768,
149
+ },
139
150
  {
140
151
  displayName: 'Llama 3 70B',
141
152
  id: 'meta-llama/Meta-Llama-3-70B-Instruct',
@@ -1,5 +1,8 @@
1
- export const BRANDING_NAME = 'LobeChat';
1
+ export const LOBE_CHAT_CLOUD = 'LobeChat Cloud';
2
2
 
3
- export const ORG_NAME = 'lobehub';
3
+ // the code below can only be modified with commercial license
4
+ // if you want to use it in the commercial usage
5
+ // please contact us for more information: hello@lobehub.com
4
6
 
5
- export const LOBE_CHAT_CLOUD = 'LobeChat Cloud';
7
+ export const BRANDING_NAME = 'LobeChat';
8
+ export const BRANDING_LOGO_URL = '';
package/src/const/meta.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { BRANDING_LOGO_URL } from '@/const/branding';
1
2
  import { MetaData } from '@/types/meta';
2
3
 
3
4
  export const DEFAULT_AVATAR = '🤖';
@@ -5,4 +6,4 @@ export const DEFAULT_USER_AVATAR = '😀';
5
6
  export const DEFAULT_BACKGROUND_COLOR = 'rgba(0,0,0,0)';
6
7
  export const DEFAULT_AGENT_META: MetaData = {};
7
8
  export const DEFAULT_INBOX_AVATAR = '🤯';
8
- export const DEFAULT_USER_AVATAR_URL = '/icons/icon-192x192.png';
9
+ export const DEFAULT_USER_AVATAR_URL = BRANDING_LOGO_URL || '/icons/icon-192x192.png';
@@ -1,6 +1,11 @@
1
1
  import pkg from '@/../package.json';
2
2
  import { getServerDBConfig } from '@/config/db';
3
3
 
4
+ import { BRANDING_NAME } from './branding';
5
+
4
6
  export const CURRENT_VERSION = pkg.version;
5
7
 
6
8
  export const isServerMode = getServerDBConfig().NEXT_PUBLIC_ENABLED_SERVER_SERVICE;
9
+
10
+ // @ts-ignore
11
+ export const isCustomBranding = BRANDING_NAME !== 'LobeChat';
@@ -11,6 +11,7 @@ import Marquee from 'react-fast-marquee';
11
11
  import { useTranslation } from 'react-i18next';
12
12
  import { Center, Flexbox } from 'react-layout-kit';
13
13
 
14
+ import { LOBE_CHAT_CLOUD } from '@/const/branding';
14
15
  import { OFFICIAL_URL, UTM_SOURCE } from '@/const/url';
15
16
  import { isOnServerSide } from '@/utils/env';
16
17
 
@@ -57,11 +58,11 @@ const CloudBanner = memo<{ mobile?: boolean }>(({ mobile }) => {
57
58
 
58
59
  const content = (
59
60
  <Flexbox align={'center'} flex={'none'} gap={8} horizontal ref={contentRef}>
60
- <b>{t('alert.cloud.title', { name: 'LobeChat Cloud' })}:</b>
61
+ <b>{t('alert.cloud.title', { name: LOBE_CHAT_CLOUD })}:</b>
61
62
  <span>
62
63
  {t(mobile ? 'alert.cloud.descOnMobile' : 'alert.cloud.desc', {
63
64
  credit: new Intl.NumberFormat('en-US').format(450_000),
64
- name: 'LobeChat Cloud',
65
+ name: LOBE_CHAT_CLOUD,
65
66
  })}
66
67
  </span>
67
68
  </Flexbox>
@@ -4,6 +4,7 @@ import { Suspense, memo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
 
6
6
  import TipGuide from '@/components/TipGuide';
7
+ import { LOBE_CHAT_CLOUD } from '@/const/branding';
7
8
  import { isServerMode } from '@/const/version';
8
9
  import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
9
10
  import { useUserStore } from '@/store/user';
@@ -33,7 +34,11 @@ const Knowledge = memo(() => {
33
34
  disable={!enableKnowledge}
34
35
  icon={LibraryBig}
35
36
  placement={'bottom'}
36
- title={enableKnowledge ? t('knowledgeBase.title') : t('knowledgeBase.disabled')}
37
+ title={
38
+ enableKnowledge
39
+ ? t('knowledgeBase.title')
40
+ : t('knowledgeBase.disabled', { cloud: LOBE_CHAT_CLOUD })
41
+ }
37
42
  />
38
43
  </DropdownMenu>
39
44
  );
@@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next';
7
7
  import { Center, Flexbox } from 'react-layout-kit';
8
8
 
9
9
  import { BRANDING_NAME } from '@/const/branding';
10
+ import { isCustomBranding } from '@/const/version';
10
11
  import { useGreeting } from '@/hooks/useGreeting';
11
12
  import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
12
13
 
@@ -60,7 +61,7 @@ const InboxWelcome = memo(() => {
60
61
  {showWelcomeSuggest && (
61
62
  <>
62
63
  <AgentsSuggest mobile={mobile} />
63
- <QuestionSuggest mobile={mobile} />
64
+ {!isCustomBranding && <QuestionSuggest mobile={mobile} />}
64
65
  </>
65
66
  )}
66
67
  </Flexbox>
@@ -4,6 +4,7 @@ import dynamic from 'next/dynamic';
4
4
  import { memo, useEffect, useLayoutEffect } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
 
7
+ import { BRANDING_NAME } from '@/const/branding';
7
8
  import { PWA_INSTALL_ID } from '@/const/layoutTokens';
8
9
  import { usePWAInstall } from '@/hooks/usePWAInstall';
9
10
  import { usePlatform } from '@/hooks/usePlatform';
@@ -66,7 +67,9 @@ const PWAInstall = memo(() => {
66
67
  }, [canInstall, hidePWAInstaller, isShowPWAGuide]);
67
68
 
68
69
  if (isPWA) return null;
69
- return <PWA description={t('chat.description')} id={PWA_INSTALL_ID} />;
70
+ return (
71
+ <PWA description={t('chat.description', { appName: BRANDING_NAME })} id={PWA_INSTALL_ID} />
72
+ );
70
73
  });
71
74
 
72
75
  export default PWAInstall;
@@ -12,6 +12,7 @@ import GuideModal from '@/components/GuideModal';
12
12
  import GuideVideo from '@/components/GuideVideo';
13
13
  import { BRANDING_NAME } from '@/const/branding';
14
14
  import { GITHUB, GITHUB_ISSUES } from '@/const/url';
15
+ import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
15
16
  import { isOnServerSide } from '@/utils/env';
16
17
 
17
18
  const useStyles = createStyles(
@@ -26,7 +27,10 @@ const Footer = memo<PropsWithChildren>(() => {
26
27
  const [openStar, setOpenStar] = useState(false);
27
28
  const [openFeedback, setOpenFeedback] = useState(false);
28
29
  const { styles } = useStyles();
29
- return (
30
+
31
+ const { hideGitHub } = useServerConfigStore(featureFlagsSelectors);
32
+
33
+ return hideGitHub ? null : (
30
34
  <>
31
35
  <Flexbox flex={1} justify={'flex-end'}>
32
36
  <Center
@@ -4,6 +4,7 @@ import { Avatar, type AvatarProps } from '@lobehub/ui';
4
4
  import { createStyles } from 'antd-style';
5
5
  import { forwardRef } from 'react';
6
6
 
7
+ import { BRANDING_NAME } from '@/const/branding';
7
8
  import { DEFAULT_USER_AVATAR_URL } from '@/const/meta';
8
9
  import { useUserStore } from '@/store/user';
9
10
  import { authSelectors, userProfileSelectors } from '@/store/user/selectors';
@@ -56,7 +57,7 @@ const UserAvatar = forwardRef<HTMLDivElement, UserAvatarProps>(
56
57
 
57
58
  return (
58
59
  <Avatar
59
- alt={isSignedIn ? (username as string) : 'LobeChat'}
60
+ alt={isSignedIn ? (username as string) : BRANDING_NAME}
60
61
  avatar={isSignedIn ? avatar || DEFAULT_USER_AVATAR_URL : DEFAULT_USER_AVATAR_URL}
61
62
  background={isSignedIn && avatar ? background : undefined}
62
63
  className={cx(clickable && styles.clickable, className)}
@@ -22,6 +22,7 @@ import { Flexbox } from 'react-layout-kit';
22
22
  import urlJoin from 'url-join';
23
23
 
24
24
  import type { MenuProps } from '@/components/Menu';
25
+ import { LOBE_CHAT_CLOUD } from '@/const/branding';
25
26
  import {
26
27
  DISCORD,
27
28
  DOCUMENTS_REFER_URL,
@@ -72,7 +73,7 @@ export const useMenu = () => {
72
73
  const hasNewVersion = useNewVersion();
73
74
  const openSettings = useOpenSettings();
74
75
  const { t } = useTranslation(['common', 'setting', 'auth']);
75
- const { showCloudPromotion } = useServerConfigStore(featureFlagsSelectors);
76
+ const { showCloudPromotion, hideDocs } = useServerConfigStore(featureFlagsSelectors);
76
77
  const [isLogin, isLoginWithAuth, isLoginWithClerk, openUserProfile] = useUserStore((s) => [
77
78
  authSelectors.isLogin(s),
78
79
  authSelectors.isLoginWithAuth(s),
@@ -173,63 +174,65 @@ export const useMenu = () => {
173
174
  },
174
175
  ].filter(Boolean) as ItemType[]);
175
176
 
176
- const helps: MenuProps['items'] = [
177
- showCloudPromotion && {
178
- icon: <Icon icon={Cloudy} />,
179
- key: 'cloud',
180
- label: (
181
- <Link href={`${OFFICIAL_URL}?utm_source=${UTM_SOURCE}`} target={'_blank'}>
182
- {t('userPanel.cloud', { name: 'LobeChat Cloud' })}
183
- </Link>
184
- ),
185
- },
186
- {
187
- icon: <Icon icon={DiscordIcon} />,
188
- key: 'discord',
189
- label: (
190
- <Link href={DISCORD} target={'_blank'}>
191
- {t('userPanel.discord')}
192
- </Link>
193
- ),
194
- },
195
- {
196
- children: [
197
- {
198
- icon: <Icon icon={Book} />,
199
- key: 'docs',
177
+ const helps: MenuProps['items'] = hideDocs
178
+ ? []
179
+ : ([
180
+ showCloudPromotion && {
181
+ icon: <Icon icon={Cloudy} />,
182
+ key: 'cloud',
200
183
  label: (
201
- <Link href={DOCUMENTS_REFER_URL} target={'_blank'}>
202
- {t('userPanel.docs')}
184
+ <Link href={`${OFFICIAL_URL}?utm_source=${UTM_SOURCE}`} target={'_blank'}>
185
+ {t('userPanel.cloud', { name: LOBE_CHAT_CLOUD })}
203
186
  </Link>
204
187
  ),
205
188
  },
206
189
  {
207
- icon: <Icon icon={Feather} />,
208
- key: 'feedback',
190
+ icon: <Icon icon={DiscordIcon} />,
191
+ key: 'discord',
209
192
  label: (
210
- <Link href={GITHUB_ISSUES} target={'_blank'}>
211
- {t('userPanel.feedback')}
193
+ <Link href={DISCORD} target={'_blank'}>
194
+ {t('userPanel.discord')}
212
195
  </Link>
213
196
  ),
214
197
  },
215
198
  {
216
- icon: <Icon icon={Mail} />,
217
- key: 'email',
218
- label: (
219
- <Link href={mailTo(EMAIL_SUPPORT)} target={'_blank'}>
220
- {t('userPanel.email')}
221
- </Link>
222
- ),
199
+ children: [
200
+ {
201
+ icon: <Icon icon={Book} />,
202
+ key: 'docs',
203
+ label: (
204
+ <Link href={DOCUMENTS_REFER_URL} target={'_blank'}>
205
+ {t('userPanel.docs')}
206
+ </Link>
207
+ ),
208
+ },
209
+ {
210
+ icon: <Icon icon={Feather} />,
211
+ key: 'feedback',
212
+ label: (
213
+ <Link href={GITHUB_ISSUES} target={'_blank'}>
214
+ {t('userPanel.feedback')}
215
+ </Link>
216
+ ),
217
+ },
218
+ {
219
+ icon: <Icon icon={Mail} />,
220
+ key: 'email',
221
+ label: (
222
+ <Link href={mailTo(EMAIL_SUPPORT)} target={'_blank'}>
223
+ {t('userPanel.email')}
224
+ </Link>
225
+ ),
226
+ },
227
+ ],
228
+ icon: <Icon icon={LifeBuoy} />,
229
+ key: 'help',
230
+ label: t('userPanel.help'),
223
231
  },
224
- ],
225
- icon: <Icon icon={LifeBuoy} />,
226
- key: 'help',
227
- label: t('userPanel.help'),
228
- },
229
- {
230
- type: 'divider',
231
- },
232
- ].filter(Boolean) as ItemType[];
232
+ {
233
+ type: 'divider',
234
+ },
235
+ ].filter(Boolean) as ItemType[]);
233
236
 
234
237
  const mainItems = [
235
238
  {
@@ -45,7 +45,7 @@ export default {
45
45
  allFiles: '所有文件',
46
46
  allKnowledgeBases: '所有知识库',
47
47
  disabled:
48
- '当前部署模式不支持知识库对话,如需使用,请切换到服务端数据库部署或使用 LobeChat Cloud 服务',
48
+ '当前部署模式不支持知识库对话,如需使用,请切换到服务端数据库部署或使用 {{cloud}} 服务',
49
49
  library: {
50
50
  action: {
51
51
  add: '添加',
@@ -141,7 +141,7 @@ export default {
141
141
  upload: {
142
142
  desc: '详情: {{detail}}',
143
143
  fileOnlySupportInServerMode:
144
- '当前部署模式不支持上传非图片文件,如需上传 {{ext}} 格式,请切换到服务端数据库部署或使用 LobeChat Cloud 服务',
144
+ '当前部署模式不支持上传非图片文件,如需上传 {{ext}} 格式,请切换到服务端数据库部署或使用 {{cloud}} 服务',
145
145
  networkError: '请确认你的网络是否正常,并检查文件存储服务跨域配置是否正确',
146
146
  title: '文件上传失败,请检查网络连接或稍后再试',
147
147
  unknownError: '错误原因: {{reason}}',
package/src/server/ld.ts CHANGED
@@ -191,7 +191,7 @@ class Ld {
191
191
  '@type': 'WebSite',
192
192
  'description': pkg.description,
193
193
  'inLanguage': 'en-US',
194
- 'name': 'LobeChat',
194
+ 'name': BRANDING_NAME,
195
195
  'publisher': {
196
196
  '@id': this.getId(OFFICIAL_URL, '#organization'),
197
197
  },
@@ -3,6 +3,7 @@ import { sha256 } from 'js-sha256';
3
3
  import { StateCreator } from 'zustand/vanilla';
4
4
 
5
5
  import { message } from '@/components/AntdStaticMethods';
6
+ import { LOBE_CHAT_CLOUD } from '@/const/branding';
6
7
  import { isServerMode } from '@/const/version';
7
8
  import { fileService } from '@/services/file';
8
9
  import { ServerService } from '@/services/file/server';
@@ -56,6 +57,7 @@ export const createFileUploadSlice: StateCreator<
56
57
  onStatusUpdate?.({ id: file.name, type: 'removeFile' });
57
58
  message.info({
58
59
  content: t('upload.fileOnlySupportInServerMode', {
60
+ cloud: LOBE_CHAT_CLOUD,
59
61
  ext: file.name.split('.').pop(),
60
62
  ns: 'error',
61
63
  }),
@@ -26,6 +26,8 @@ describe('featureFlagsSelectors', () => {
26
26
  showLLM: false,
27
27
  showCloudPromotion: false,
28
28
  showOpenAIApiKey: true,
29
+ hideDocs: false,
30
+ hideGitHub: false,
29
31
  showOpenAIProxyUrl: true,
30
32
  enableCheckUpdates: true,
31
33
  showWelcomeSuggest: true,
Binary file
@@ -1,14 +0,0 @@
1
- import { LobeChat } from '@lobehub/ui/brand';
2
- import { memo } from 'react';
3
-
4
- interface ProductLogoProps {
5
- className?: string;
6
- extra?: string;
7
- size?: number;
8
- }
9
-
10
- export const ProductLogo = memo<ProductLogoProps>(({ size, className, extra }) => {
11
- return <LobeChat className={className} extra={extra} size={size} type={'text'} />;
12
- });
13
-
14
- export default ProductLogo;
@@ -1 +0,0 @@
1
- export { ProductLogo } from './ProductLogo';