@lobehub/chat 0.82.8 → 0.83.0
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.
- package/CHANGELOG.md +42 -0
- package/locales/en_US/error.json +2 -1
- package/locales/en_US/plugin.json +1 -0
- package/locales/en_US/setting.json +2 -1
- package/locales/ru_RU/error.json +2 -1
- package/locales/ru_RU/plugin.json +1 -0
- package/locales/ru_RU/setting.json +2 -1
- package/locales/zh_CN/error.json +1 -0
- package/locales/zh_CN/plugin.json +2 -1
- package/locales/zh_CN/setting.json +2 -1
- package/locales/zh_TW/error.json +2 -1
- package/locales/zh_TW/plugin.json +1 -0
- package/locales/zh_TW/setting.json +2 -1
- package/package.json +6 -5
- package/src/app/chat/{features/Header → (desktop)/features/ChatHeader}/Desktop.tsx +2 -2
- package/src/app/chat/{features/Header → (desktop)/features/ChatHeader}/index.tsx +1 -1
- package/src/app/chat/(desktop)/features/ChatInput/index.tsx +22 -0
- package/src/app/chat/{features/SessionList/Header → (desktop)/features/SessionHeader}/Desktop.tsx +1 -1
- package/src/app/chat/{features/SessionList/Header → (desktop)/features/SessionHeader}/index.tsx +1 -1
- package/src/app/chat/{features → (desktop)/features}/SessionList/Desktop.tsx +1 -1
- package/src/app/chat/(desktop)/features/SessionList/index.tsx +20 -0
- package/src/app/chat/{features/Sidebar → (desktop)/features/SideBar}/Desktop.tsx +4 -4
- package/src/app/chat/(desktop)/features/SideBar/index.tsx +20 -0
- package/src/app/chat/(desktop)/index.tsx +24 -0
- package/src/app/chat/{layout.desktop.tsx → (desktop)/layout/Desktop.tsx} +4 -4
- package/src/app/chat/(desktop)/layout/index.tsx +25 -0
- package/src/app/chat/(mobile)/features/ChatHeader.tsx +1 -0
- package/src/app/chat/(mobile)/features/ChatInput.tsx +14 -0
- package/src/app/chat/(mobile)/features/SessionList.tsx +12 -0
- package/src/app/chat/(mobile)/features/Topics.tsx +12 -0
- package/src/app/chat/(mobile)/index.tsx +20 -0
- package/src/app/chat/(mobile)/layout.tsx +15 -0
- package/src/app/chat/(mobile)/mobile/page.tsx +21 -0
- package/src/app/chat/{features/Header → components/ChatHeader}/Mobile.tsx +2 -1
- package/src/app/chat/{features/Header → components/ChatHeader}/ShareButton/Preview.tsx +3 -3
- package/src/app/chat/{features/Conversation/Input → components/ChatInput}/index.tsx +23 -21
- package/src/app/chat/components/Inspector/index.tsx +17 -0
- package/src/app/chat/{features → components}/SessionList/List/Item/index.tsx +2 -2
- package/src/app/chat/{features → components}/SessionList/Mobile.tsx +1 -1
- package/src/app/chat/{features → components}/SessionList/index.tsx +3 -10
- package/src/app/chat/features/Conversation/index.tsx +8 -4
- package/src/app/chat/features/PageTitle.tsx +19 -0
- package/src/app/chat/layout.tsx +14 -0
- package/src/app/chat/page.tsx +9 -4
- package/src/app/chat/settings/(desktop)/Header/index.tsx +13 -0
- package/src/app/chat/settings/{layout.desktop.tsx → (desktop)/layout.desktop.tsx} +5 -4
- package/src/app/chat/settings/(mobile)/Header.tsx +12 -0
- package/src/app/chat/settings/{layout.mobile.tsx → (mobile)/layout.mobile.tsx} +3 -1
- package/src/app/chat/settings/{features → components}/Header/index.tsx +4 -13
- package/src/app/chat/settings/layout.tsx +14 -0
- package/src/app/chat/settings/page.tsx +36 -5
- package/src/app/home/index.tsx +15 -11
- package/src/app/layout.tsx +4 -1
- package/src/app/metadata.ts +4 -1
- package/src/app/settings/agent/Agent.tsx +3 -3
- package/src/app/settings/agent/index.tsx +1 -0
- package/src/app/settings/common/Common.tsx +109 -117
- package/src/app/settings/features/SideBar/List.tsx +11 -5
- package/src/app/settings/llm/LLM/index.tsx +2 -2
- package/src/app/welcome/page.tsx +2 -6
- package/src/components/PageTitle.tsx +11 -0
- package/src/config/client.ts +13 -0
- package/src/const/locale.ts +9 -0
- package/src/const/settings.ts +1 -1
- package/src/const/url.ts +1 -6
- package/src/helpers/export.ts +2 -2
- package/src/layout/AppMobileLayout.tsx +15 -24
- package/src/layout/GlobalLayout/Locale.tsx +44 -0
- package/src/layout/GlobalLayout/LocaleLoading.tsx +21 -0
- package/src/layout/GlobalLayout/StoreHydration.tsx +28 -0
- package/src/layout/GlobalLayout/index.tsx +29 -41
- package/src/locales/create.ts +43 -26
- package/src/locales/default/setting.ts +2 -1
- package/src/locales/options.ts +6 -5
- package/src/services/agentMarket.ts +6 -4
- package/src/services/pluginMarket.ts +2 -2
- package/src/store/global/hooks/useSwitchSettingsOnInit.ts +5 -2
- package/src/store/global/{selectors.test.ts → selectors/settings.test.ts} +11 -11
- package/src/store/global/selectors/settings.ts +44 -0
- package/src/store/global/selectors.ts +1 -36
- package/src/store/global/slices/common.ts +3 -4
- package/src/types/locale.ts +4 -0
- package/src/types/settings.ts +2 -2
- package/src/utils/env.ts +2 -0
- package/src/utils/responsive.ts +1 -0
- package/src/utils/switchLang.ts +5 -1
- package/src/app/chat/features/Sidebar/index.tsx +0 -29
- package/src/app/chat/index.tsx +0 -54
- package/src/app/chat/layout.mobile.tsx +0 -20
- package/src/app/chat/mobile/index.tsx +0 -38
- package/src/app/chat/mobile/page.tsx +0 -7
- package/src/app/chat/settings/index.tsx +0 -51
- package/src/layout/GlobalLayout/style.ts +0 -18
- /package/src/app/chat/{features/Conversation/Input → (desktop)/features/ChatInput}/Desktop.tsx +0 -0
- /package/src/app/chat/{features/SessionList/Header/Mobile.tsx → (mobile)/features/SessionHeader.tsx} +0 -0
- /package/src/app/chat/{features/Header → components/ChatHeader}/PluginTag/PluginStatus.tsx +0 -0
- /package/src/app/chat/{features/Header → components/ChatHeader}/PluginTag/index.tsx +0 -0
- /package/src/app/chat/{features/Header → components/ChatHeader}/ShareButton/Inner.tsx +0 -0
- /package/src/app/chat/{features/Header → components/ChatHeader}/ShareButton/index.tsx +0 -0
- /package/src/app/chat/{features/Header → components/ChatHeader}/ShareButton/style.ts +0 -0
- /package/src/app/chat/{features/Conversation/Input → components/ChatInput}/ActionBar/ActionLeft.tsx +0 -0
- /package/src/app/chat/{features/Conversation/Input → components/ChatInput}/ActionBar/ActionRight.tsx +0 -0
- /package/src/app/chat/{features/Conversation/Input → components/ChatInput}/ActionBar/Token.tsx +0 -0
- /package/src/app/chat/{features/Conversation/Input → components/ChatInput}/Footer/SaveTopic.tsx +0 -0
- /package/src/app/chat/{features/Conversation/Input → components/ChatInput}/Footer/index.tsx +0 -0
- /package/src/app/chat/{features/Conversation/Input → components/ChatInput}/Mobile.tsx +0 -0
- /package/src/app/chat/{features/Sidebar → components/Inspector}/Mobile.tsx +0 -0
- /package/src/app/chat/{features/Sidebar → components/Inspector}/SystemRole/Header.tsx +0 -0
- /package/src/app/chat/{features/Sidebar → components/Inspector}/SystemRole/index.tsx +0 -0
- /package/src/app/chat/{features/Sidebar → components/Inspector}/SystemRole/style.ts +0 -0
- /package/src/app/chat/{features/Sidebar → components/Inspector}/Topic/DefaultContent.tsx +0 -0
- /package/src/app/chat/{features/Sidebar → components/Inspector}/Topic/SkeletonList.tsx +0 -0
- /package/src/app/chat/{features/Sidebar → components/Inspector}/Topic/TopicContent.tsx +0 -0
- /package/src/app/chat/{features/Sidebar → components/Inspector}/Topic/TopicItem.tsx +0 -0
- /package/src/app/chat/{features/Sidebar → components/Inspector}/Topic/index.tsx +0 -0
- /package/src/app/chat/{features/Sidebar → components/Inspector}/TopicSearchBar/index.tsx +0 -0
- /package/src/app/chat/{features → components}/SessionList/CollapseGroup/index.tsx +0 -0
- /package/src/app/chat/{features → components}/SessionList/Inbox/index.tsx +0 -0
- /package/src/app/chat/{features → components}/SessionList/List/AddButton.tsx +0 -0
- /package/src/app/chat/{features → components}/SessionList/List/Item/Actions.tsx +0 -0
- /package/src/app/chat/{features → components}/SessionList/List/SkeletonList.tsx +0 -0
- /package/src/app/chat/{features → components}/SessionList/List/index.tsx +0 -0
- /package/src/app/chat/settings/{features → (desktop)}/Header/Desktop.tsx +0 -0
- /package/src/app/chat/settings/{features → components}/Header/Mobile.tsx +0 -0
- /package/src/{components/AppTheme/index.tsx → layout/GlobalLayout/AppTheme.tsx} +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { useResponsive } from 'antd-style';
|
|
4
|
-
import isEqual from 'fast-deep-equal';
|
|
5
|
-
import Head from 'next/head';
|
|
6
|
-
import { memo } from 'react';
|
|
7
|
-
import { useTranslation } from 'react-i18next';
|
|
8
|
-
|
|
9
|
-
import AgentSetting from '@/features/AgentSetting';
|
|
10
|
-
import { useSessionStore } from '@/store/session';
|
|
11
|
-
import { agentSelectors } from '@/store/session/selectors';
|
|
12
|
-
import { genSiteHeadTitle } from '@/utils/genSiteHeadTitle';
|
|
13
|
-
|
|
14
|
-
import DesktopLayout from './layout.desktop';
|
|
15
|
-
import MobileLayout from './layout.mobile';
|
|
16
|
-
|
|
17
|
-
const EditPage = memo(() => {
|
|
18
|
-
const { mobile } = useResponsive();
|
|
19
|
-
const { t } = useTranslation('setting');
|
|
20
|
-
const config = useSessionStore(agentSelectors.currentAgentConfig, isEqual);
|
|
21
|
-
const meta = useSessionStore(agentSelectors.currentAgentMeta, isEqual);
|
|
22
|
-
const [updateAgentConfig, updateAgentMeta, title] = useSessionStore((s) => [
|
|
23
|
-
s.updateAgentConfig,
|
|
24
|
-
s.updateAgentMeta,
|
|
25
|
-
agentSelectors.currentAgentTitle(s),
|
|
26
|
-
]);
|
|
27
|
-
|
|
28
|
-
const pageTitle = genSiteHeadTitle(t('header.sessionWithName', { name: title }));
|
|
29
|
-
|
|
30
|
-
const settings = (
|
|
31
|
-
<AgentSetting
|
|
32
|
-
config={config}
|
|
33
|
-
meta={meta}
|
|
34
|
-
onConfigChange={updateAgentConfig}
|
|
35
|
-
onMetaChange={updateAgentMeta}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
const RenderLayout = mobile ? MobileLayout : DesktopLayout;
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<>
|
|
43
|
-
<Head>
|
|
44
|
-
<title>{pageTitle}</title>
|
|
45
|
-
</Head>
|
|
46
|
-
<RenderLayout>{settings}</RenderLayout>
|
|
47
|
-
</>
|
|
48
|
-
);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export default EditPage;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createStyles } from 'antd-style';
|
|
2
|
-
|
|
3
|
-
export const useStyles = createStyles(({ css, token }) => ({
|
|
4
|
-
bg: css`
|
|
5
|
-
overflow-y: scroll;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
align-items: center;
|
|
9
|
-
|
|
10
|
-
height: 100%;
|
|
11
|
-
|
|
12
|
-
background: ${token.colorBgLayout};
|
|
13
|
-
|
|
14
|
-
:has(#ChatLayout, #FlowLayout) {
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
}
|
|
17
|
-
`,
|
|
18
|
-
}));
|
/package/src/app/chat/{features/Conversation/Input → (desktop)/features/ChatInput}/Desktop.tsx
RENAMED
|
File without changes
|
/package/src/app/chat/{features/SessionList/Header/Mobile.tsx → (mobile)/features/SessionHeader.tsx}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/chat/{features/Conversation/Input → components/ChatInput}/ActionBar/ActionLeft.tsx
RENAMED
|
File without changes
|
/package/src/app/chat/{features/Conversation/Input → components/ChatInput}/ActionBar/ActionRight.tsx
RENAMED
|
File without changes
|
/package/src/app/chat/{features/Conversation/Input → components/ChatInput}/ActionBar/Token.tsx
RENAMED
|
File without changes
|
/package/src/app/chat/{features/Conversation/Input → components/ChatInput}/Footer/SaveTopic.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|