@lobehub/chat 1.56.0 → 1.56.1

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +93 -45
  3. package/README.zh-CN.md +92 -44
  4. package/changelog/v1.json +9 -0
  5. package/contributing/Others/Lighthouse.md +2 -5
  6. package/contributing/Others/Lighthouse.zh-CN.md +3 -4
  7. package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +1 -0
  8. package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +1 -0
  9. package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +1 -1
  10. package/docs/self-hosting/server-database.mdx +1 -1
  11. package/docs/usage/features/agent-market.mdx +1 -1
  12. package/docs/usage/features/agent-market.zh-CN.mdx +1 -1
  13. package/docs/usage/features/artifacts.mdx +23 -0
  14. package/docs/usage/features/artifacts.zh-CN.mdx +22 -0
  15. package/docs/usage/features/auth.mdx +1 -1
  16. package/docs/usage/features/auth.zh-CN.mdx +1 -1
  17. package/docs/usage/features/branching-conversations.mdx +21 -0
  18. package/docs/usage/features/branching-conversations.zh-CN.mdx +21 -0
  19. package/docs/usage/features/cot.mdx +18 -0
  20. package/docs/usage/features/cot.zh-CN.mdx +18 -0
  21. package/docs/usage/features/database.mdx +1 -1
  22. package/docs/usage/features/database.zh-CN.mdx +1 -1
  23. package/docs/usage/features/knowledge-base.mdx +24 -0
  24. package/docs/usage/features/knowledge-base.zh-CN.mdx +21 -0
  25. package/docs/usage/features/local-llm.mdx +1 -1
  26. package/docs/usage/features/local-llm.zh-CN.mdx +1 -1
  27. package/docs/usage/features/mobile.mdx +1 -1
  28. package/docs/usage/features/mobile.zh-CN.mdx +1 -1
  29. package/docs/usage/features/multi-ai-providers.mdx +1 -1
  30. package/docs/usage/features/multi-ai-providers.zh-CN.mdx +1 -1
  31. package/docs/usage/features/plugin-system.mdx +1 -1
  32. package/docs/usage/features/plugin-system.zh-CN.mdx +1 -1
  33. package/docs/usage/features/pwa.mdx +1 -1
  34. package/docs/usage/features/pwa.zh-CN.mdx +1 -1
  35. package/docs/usage/features/text-to-image.mdx +1 -1
  36. package/docs/usage/features/text-to-image.zh-CN.mdx +1 -1
  37. package/docs/usage/features/theme.mdx +1 -1
  38. package/docs/usage/features/theme.zh-CN.mdx +1 -1
  39. package/docs/usage/features/tts.mdx +1 -1
  40. package/docs/usage/features/tts.zh-CN.mdx +1 -1
  41. package/docs/usage/features/vision.mdx +1 -1
  42. package/docs/usage/features/vision.zh-CN.mdx +1 -1
  43. package/package.json +1 -1
  44. package/scripts/readmeWorkflow/syncAgentIndex.ts +0 -1
  45. package/scripts/readmeWorkflow/syncPluginIndex.ts +0 -1
  46. package/scripts/readmeWorkflow/syncProviderIndex.ts +0 -1
  47. package/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/CategoryContent/useCategory.tsx +39 -33
  48. package/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/index.tsx +3 -1
  49. package/src/app/[variants]/(main)/chat/(workspace)/features/SettingButton.tsx +3 -1
  50. package/src/hooks/useInterceptingRoutes.ts +2 -1
  51. package/README.ja-JP.md +0 -844
  52. package/README.zh-TW.md +0 -887
@@ -8,6 +8,7 @@ import { useTranslation } from 'react-i18next';
8
8
  import { Flexbox } from 'react-layout-kit';
9
9
 
10
10
  import Header from '@/app/[variants]/(main)/settings/_layout/Desktop/Header';
11
+ import { INBOX_SESSION_ID } from '@/const/session';
11
12
  import AgentChat from '@/features/AgentSetting/AgentChat';
12
13
  import AgentMeta from '@/features/AgentSetting/AgentMeta';
13
14
  import AgentModal from '@/features/AgentSetting/AgentModal';
@@ -38,8 +39,9 @@ const AgentSettings = memo(() => {
38
39
  s.updateSessionMeta,
39
40
  sessionMetaSelectors.currentAgentTitle(s),
40
41
  ]);
42
+ const isInbox = id === INBOX_SESSION_ID;
41
43
 
42
- const [tab, setTab] = useState(ChatSettingsTabs.Meta);
44
+ const [tab, setTab] = useState(isInbox ? ChatSettingsTabs.Chat : ChatSettingsTabs.Meta);
43
45
 
44
46
  const ref = useRef<any>(null);
45
47
  const theme = useTheme();
@@ -8,6 +8,7 @@ import { useTranslation } from 'react-i18next';
8
8
 
9
9
  import { DESKTOP_HEADER_ICON_SIZE, MOBILE_HEADER_ICON_SIZE } from '@/const/layoutTokens';
10
10
  import { useOpenChatSettings } from '@/hooks/useInterceptingRoutes';
11
+ import { useSessionStore } from '@/store/session';
11
12
 
12
13
  const AgentSettings = dynamic(() => import('./AgentSettings'), {
13
14
  ssr: false,
@@ -16,6 +17,7 @@ const AgentSettings = dynamic(() => import('./AgentSettings'), {
16
17
  const SettingButton = memo<{ mobile?: boolean }>(({ mobile }) => {
17
18
  const { t } = useTranslation('common');
18
19
  const openChatSettings = useOpenChatSettings();
20
+ const id = useSessionStore((s) => s.activeId);
19
21
 
20
22
  return (
21
23
  <>
@@ -25,7 +27,7 @@ const SettingButton = memo<{ mobile?: boolean }>(({ mobile }) => {
25
27
  size={mobile ? MOBILE_HEADER_ICON_SIZE : DESKTOP_HEADER_ICON_SIZE}
26
28
  title={t('header.session', { ns: 'setting' })}
27
29
  />
28
- <AgentSettings />
30
+ <AgentSettings key={id} />
29
31
  </>
30
32
  );
31
33
  });
@@ -2,6 +2,7 @@ import { useMemo } from 'react';
2
2
  import urlJoin from 'url-join';
3
3
 
4
4
  import { INBOX_SESSION_ID } from '@/const/session';
5
+ import { isDeprecatedEdition } from '@/const/version';
5
6
  import { useIsMobile } from '@/hooks/useIsMobile';
6
7
  import { useQueryRoute } from '@/hooks/useQueryRoute';
7
8
  import { useAgentStore } from '@/store/agent';
@@ -15,7 +16,7 @@ export const useOpenChatSettings = (tab: ChatSettingsTabs = ChatSettingsTabs.Met
15
16
  const router = useQueryRoute();
16
17
 
17
18
  return useMemo(() => {
18
- if (activeId === INBOX_SESSION_ID) {
19
+ if (isDeprecatedEdition && activeId === INBOX_SESSION_ID) {
19
20
  return () => router.push(urlJoin('/settings', SettingsTabs.Agent));
20
21
  }
21
22