@lobehub/chat 0.48.0 → 0.49.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 +26 -0
- package/package.json +1 -1
- package/src/features/SideBar/BottomActions.tsx +4 -4
- package/src/locales/default/common.ts +4 -3
- package/src/pages/chat/SessionList/List/Item/Actions.tsx +2 -2
- package/src/pages/chat/SessionList/List/index.tsx +5 -8
- package/src/pages/chat/SessionList/index.tsx +7 -6
- package/src/pages/chat/[id]/setting/Header.tsx +2 -2
- package/src/pages/chat/features/Conversation/Input/index.tsx +1 -0
- package/src/pages/chat/features/Conversation/index.tsx +11 -4
- package/src/pages/chat/features/Sidebar/Header.tsx +1 -1
- package/src/pages/chat/features/Sidebar/Topic/TopicItem.tsx +1 -1
- package/src/pages/index/Loading.tsx +6 -18
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 0.49.0](https://github.com/lobehub/lobe-chat/compare/v0.48.0...v0.49.0)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-08-15**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Add `BackToBottom` to conversation, Update icons and text in various components.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **misc**: Add `BackToBottom` to conversation ([1433aa9](https://github.com/lobehub/lobe-chat/commit/1433aa9))
|
|
21
|
+
- **misc**: Update icons and text in various components ([0e7a683](https://github.com/lobehub/lobe-chat/commit/0e7a683))
|
|
22
|
+
|
|
23
|
+
</details>
|
|
24
|
+
|
|
25
|
+
<div align="right">
|
|
26
|
+
|
|
27
|
+
[](#readme-top)
|
|
28
|
+
|
|
29
|
+
</div>
|
|
30
|
+
|
|
5
31
|
## [Version 0.48.0](https://github.com/lobehub/lobe-chat/compare/v0.47.0...v0.48.0)
|
|
6
32
|
|
|
7
33
|
<sup>Released on **2023-08-15**</sup>
|
package/package.json
CHANGED
|
@@ -3,9 +3,9 @@ import { Dropdown, MenuProps, Upload } from 'antd';
|
|
|
3
3
|
import {
|
|
4
4
|
Feather,
|
|
5
5
|
FileClock,
|
|
6
|
-
FolderInput,
|
|
7
|
-
FolderOutput,
|
|
8
6
|
Github,
|
|
7
|
+
HardDriveDownload,
|
|
8
|
+
HardDriveUpload,
|
|
9
9
|
Heart,
|
|
10
10
|
Settings,
|
|
11
11
|
Settings2,
|
|
@@ -33,7 +33,7 @@ const BottomActions = memo<BottomActionProps>(({ tab, setTab }) => {
|
|
|
33
33
|
const items: MenuProps['items'] = useMemo(
|
|
34
34
|
() => [
|
|
35
35
|
{
|
|
36
|
-
icon: <Icon icon={
|
|
36
|
+
icon: <Icon icon={HardDriveUpload} />,
|
|
37
37
|
key: 'import',
|
|
38
38
|
label: (
|
|
39
39
|
<Upload maxCount={1} onChange={importConfig} showUploadList={false}>
|
|
@@ -67,7 +67,7 @@ const BottomActions = memo<BottomActionProps>(({ tab, setTab }) => {
|
|
|
67
67
|
onClick: exportAll,
|
|
68
68
|
},
|
|
69
69
|
],
|
|
70
|
-
icon: <Icon icon={
|
|
70
|
+
icon: <Icon icon={HardDriveDownload} />,
|
|
71
71
|
key: 'export',
|
|
72
72
|
label: t('export'),
|
|
73
73
|
},
|
|
@@ -8,10 +8,11 @@ export default {
|
|
|
8
8
|
agentMaxToken: '会话最大长度',
|
|
9
9
|
agentModel: '模型',
|
|
10
10
|
agentProfile: '助手信息',
|
|
11
|
-
appInitializing: '
|
|
11
|
+
appInitializing: 'LobeChat 启动中,请耐心等待...',
|
|
12
12
|
archive: '归档',
|
|
13
13
|
autoGenerate: '自动补全',
|
|
14
14
|
autoGenerateTooltip: '基于提示词自动补全助手描述',
|
|
15
|
+
backToBottom: '查看最新消息',
|
|
15
16
|
cancel: '取消',
|
|
16
17
|
changelog: '更新日志',
|
|
17
18
|
clearCurrentMessages: '清空当前会话消息',
|
|
@@ -35,10 +36,9 @@ export default {
|
|
|
35
36
|
},
|
|
36
37
|
feedback: '反馈与建议',
|
|
37
38
|
import: '导入配置',
|
|
38
|
-
|
|
39
39
|
inbox: {
|
|
40
40
|
defaultMessage:
|
|
41
|
-
'
|
|
41
|
+
'你好,我是你的智能助手,你可以问我任何问题,我会尽力回答你。如果需要获得更加专业或定制的助手,可以点击<kbd>+</kbd>创建自定义助手',
|
|
42
42
|
desc: '开启大脑集群,激发思维火花。你的智能助理,就在这里与你交流一切',
|
|
43
43
|
title: '随便聊聊',
|
|
44
44
|
},
|
|
@@ -61,6 +61,7 @@ export default {
|
|
|
61
61
|
sessionList: '助手列表',
|
|
62
62
|
setting: '设置',
|
|
63
63
|
share: '分享',
|
|
64
|
+
stop: '停止',
|
|
64
65
|
tab: {
|
|
65
66
|
chat: '会话',
|
|
66
67
|
market: '助手市场',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActionIcon, Icon } from '@lobehub/ui';
|
|
2
2
|
import { App, Dropdown, type MenuProps } from 'antd';
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
|
-
import {
|
|
4
|
+
import { HardDriveDownload, MoreVertical, Pin, PinOff, Trash } from 'lucide-react';
|
|
5
5
|
import { memo, useMemo } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
@@ -58,7 +58,7 @@ const Actions = memo<ActionProps>(({ id, setOpen }) => {
|
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
],
|
|
61
|
-
icon: <Icon icon={
|
|
61
|
+
icon: <Icon icon={HardDriveDownload} />,
|
|
62
62
|
key: 'export',
|
|
63
63
|
label: t('export'),
|
|
64
64
|
},
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import isEqual from 'fast-deep-equal';
|
|
2
2
|
import Link from 'next/link';
|
|
3
3
|
import { memo } from 'react';
|
|
4
|
-
import { Flexbox } from 'react-layout-kit';
|
|
5
4
|
|
|
6
5
|
import { sessionSelectors, useSessionHydrated, useSessionStore } from '@/store/session';
|
|
7
6
|
|
|
@@ -17,13 +16,11 @@ const SessionList = memo(() => {
|
|
|
17
16
|
return !isInit ? (
|
|
18
17
|
<SkeletonList />
|
|
19
18
|
) : list.length > 0 ? (
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
))}
|
|
26
|
-
</Flexbox>
|
|
19
|
+
list.map(({ id }) => (
|
|
20
|
+
<Link href={`/chat/${id}`} key={id}>
|
|
21
|
+
<SessionItem id={id} />
|
|
22
|
+
</Link>
|
|
23
|
+
))
|
|
27
24
|
) : (
|
|
28
25
|
<AddButton />
|
|
29
26
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DraggablePanelBody } from '@lobehub/ui';
|
|
2
2
|
import { CollapseProps } from 'antd';
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
3
4
|
import { memo, useMemo } from 'react';
|
|
4
5
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { Flexbox } from 'react-layout-kit';
|
|
6
6
|
|
|
7
7
|
import FolderPanel from '@/features/FolderPanel';
|
|
8
8
|
|
|
@@ -11,8 +11,11 @@ import Header from './Header';
|
|
|
11
11
|
import Inbox from './Inbox';
|
|
12
12
|
import SessionList from './List';
|
|
13
13
|
|
|
14
|
+
const useStyles = createStyles(({ stylish }) => stylish.noScrollbar);
|
|
15
|
+
|
|
14
16
|
export const Sessions = memo(() => {
|
|
15
17
|
const { t } = useTranslation('common');
|
|
18
|
+
const { styles } = useStyles();
|
|
16
19
|
|
|
17
20
|
const items: CollapseProps['items'] = useMemo(
|
|
18
21
|
() => [
|
|
@@ -28,11 +31,9 @@ export const Sessions = memo(() => {
|
|
|
28
31
|
return (
|
|
29
32
|
<FolderPanel>
|
|
30
33
|
<Header />
|
|
31
|
-
<DraggablePanelBody style={{ padding: 0 }}>
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
<CollapseGroup defaultActiveKey={['sessionList']} items={items} />
|
|
35
|
-
</Flexbox>
|
|
34
|
+
<DraggablePanelBody className={styles} style={{ padding: 0 }}>
|
|
35
|
+
<Inbox />
|
|
36
|
+
<CollapseGroup defaultActiveKey={['sessionList']} items={items} />
|
|
36
37
|
</DraggablePanelBody>
|
|
37
38
|
</FolderPanel>
|
|
38
39
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActionIcon, ChatHeader, ChatHeaderTitle } from '@lobehub/ui';
|
|
2
2
|
import { Dropdown, MenuProps } from 'antd';
|
|
3
|
-
import {
|
|
3
|
+
import { HardDriveDownload, Share2 } from 'lucide-react';
|
|
4
4
|
import Router from 'next/router';
|
|
5
5
|
import { memo, useMemo } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
@@ -45,7 +45,7 @@ const Header = memo(() => {
|
|
|
45
45
|
<ActionIcon icon={Share2} size={{ fontSize: 24 }} title={t('share', { ns: 'common' })} />
|
|
46
46
|
<Dropdown arrow={false} menu={{ items }} trigger={['click']}>
|
|
47
47
|
<ActionIcon
|
|
48
|
-
icon={
|
|
48
|
+
icon={HardDriveDownload}
|
|
49
49
|
size={{ fontSize: 24 }}
|
|
50
50
|
title={t('export', { ns: 'common' })}
|
|
51
51
|
/>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BackBottom } from '@lobehub/ui';
|
|
2
|
+
import { memo, useRef } from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
2
4
|
import { Flexbox } from 'react-layout-kit';
|
|
3
5
|
|
|
4
6
|
import HeaderSpacing from '@/components/HeaderSpacing';
|
|
@@ -7,11 +9,16 @@ import ChatList from './ChatList';
|
|
|
7
9
|
import ChatInput from './Input';
|
|
8
10
|
|
|
9
11
|
const Conversation = () => {
|
|
12
|
+
const ref = useRef(null);
|
|
13
|
+
const { t } = useTranslation('common');
|
|
10
14
|
return (
|
|
11
15
|
<Flexbox flex={1} style={{ position: 'relative' }}>
|
|
12
|
-
<div style={{ flex: 1,
|
|
13
|
-
<
|
|
14
|
-
|
|
16
|
+
<div style={{ flex: 1, overflow: 'hidden', position: 'relative' }}>
|
|
17
|
+
<div ref={ref} style={{ height: '100%', overflowY: 'scroll' }}>
|
|
18
|
+
<HeaderSpacing />
|
|
19
|
+
<ChatList />
|
|
20
|
+
</div>
|
|
21
|
+
<BackBottom target={ref} text={t('backToBottom')} />
|
|
15
22
|
</div>
|
|
16
23
|
<ChatInput />
|
|
17
24
|
</Flexbox>
|
|
@@ -9,7 +9,7 @@ import TopicContent from './TopicContent';
|
|
|
9
9
|
|
|
10
10
|
const useStyles = createStyles(({ css, token, isDarkMode }) => ({
|
|
11
11
|
active: css`
|
|
12
|
-
background: ${isDarkMode ? token.
|
|
12
|
+
background: ${isDarkMode ? token.colorFillSecondary : token.colorFillTertiary};
|
|
13
13
|
transition: background 200ms ${token.motionEaseOut};
|
|
14
14
|
|
|
15
15
|
&:hover {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useTheme } from 'antd-style';
|
|
1
|
+
import { Icon, Logo } from '@lobehub/ui';
|
|
3
2
|
import { Loader2 } from 'lucide-react';
|
|
4
|
-
import { rgba } from 'polished';
|
|
5
3
|
import { memo } from 'react';
|
|
6
4
|
import { useTranslation } from 'react-i18next';
|
|
7
5
|
import { Center, Flexbox } from 'react-layout-kit';
|
|
@@ -9,25 +7,15 @@ import { Center, Flexbox } from 'react-layout-kit';
|
|
|
9
7
|
const Loading = memo(() => {
|
|
10
8
|
const { t } = useTranslation('common');
|
|
11
9
|
|
|
12
|
-
const theme = useTheme();
|
|
13
|
-
|
|
14
10
|
return (
|
|
15
11
|
<Flexbox height={'100vh'} width={'100%'}>
|
|
16
|
-
<GridBackground
|
|
17
|
-
animation
|
|
18
|
-
colorBack={rgba(theme.colorText, 0.12)}
|
|
19
|
-
colorFront={rgba(theme.colorText, 0.4)}
|
|
20
|
-
flip
|
|
21
|
-
/>
|
|
22
12
|
<Center flex={1} gap={12} width={'100%'}>
|
|
23
|
-
<
|
|
24
|
-
{
|
|
13
|
+
<Logo extra={'Chat'} size={48} type={'combine'} />
|
|
14
|
+
<Center gap={16} horizontal>
|
|
15
|
+
<Icon icon={Loader2} spin />
|
|
16
|
+
{t('appInitializing')}
|
|
17
|
+
</Center>
|
|
25
18
|
</Center>
|
|
26
|
-
<GridBackground
|
|
27
|
-
animation
|
|
28
|
-
colorBack={rgba(theme.colorText, 0.12)}
|
|
29
|
-
colorFront={rgba(theme.colorText, 0.4)}
|
|
30
|
-
/>
|
|
31
19
|
</Flexbox>
|
|
32
20
|
);
|
|
33
21
|
});
|