@lobehub/lobehub 2.0.0-next.55 → 2.0.0-next.57
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 +50 -0
- package/changelog/v1.json +18 -0
- package/package.json +1 -1
- package/src/app/[variants]/(main)/chat/components/WorkspaceLayout.tsx +23 -32
- package/src/features/Conversation/Messages/User/index.tsx +1 -11
- package/src/features/KnowledgeManager/FileExplorer/index.tsx +0 -13
- package/src/features/KnowledgeManager/Header/AddButton.tsx +15 -4
- package/src/features/KnowledgeManager/Home/RecentFilesSkeleton.tsx +0 -2
- package/src/locales/default/file.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.57](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.56...v2.0.0-next.57)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2025-11-14**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Revert background style.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Revert background style, closes [#10218](https://github.com/lobehub/lobe-chat/issues/10218) ([97b0413](https://github.com/lobehub/lobe-chat/commit/97b0413))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
## [Version 2.0.0-next.56](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.55...v2.0.0-next.56)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2025-11-14**</sup>
|
|
33
|
+
|
|
34
|
+
#### ✨ Features
|
|
35
|
+
|
|
36
|
+
- **misc**: Add folder creation UI and clean up debug code.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's improved
|
|
44
|
+
|
|
45
|
+
- **misc**: Add folder creation UI and clean up debug code ([d5ecd0a](https://github.com/lobehub/lobe-chat/commit/d5ecd0a))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
## [Version 2.0.0-next.55](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.54...v2.0.0-next.55)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2025-11-14**</sup>
|
package/changelog/v1.json
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"children": {
|
|
4
|
+
"improvements": [
|
|
5
|
+
"Revert background style."
|
|
6
|
+
]
|
|
7
|
+
},
|
|
8
|
+
"date": "2025-11-14",
|
|
9
|
+
"version": "2.0.0-next.57"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"children": {
|
|
13
|
+
"features": [
|
|
14
|
+
"Add folder creation UI and clean up debug code."
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"date": "2025-11-14",
|
|
18
|
+
"version": "2.0.0-next.56"
|
|
19
|
+
},
|
|
2
20
|
{
|
|
3
21
|
"children": {
|
|
4
22
|
"features": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.57",
|
|
4
4
|
"description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useTheme } from 'antd-style';
|
|
2
1
|
import { Suspense, memo } from 'react';
|
|
3
2
|
import { Flexbox } from 'react-layout-kit';
|
|
4
3
|
|
|
@@ -19,38 +18,30 @@ interface WorkspaceLayoutProps {
|
|
|
19
18
|
mobile?: boolean;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
const DesktopWorkspace = memo(() =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
>
|
|
34
|
-
<Flexbox
|
|
35
|
-
height={'100%'}
|
|
36
|
-
style={{ background: theme.colorBgContainer, overflow: 'hidden', position: 'relative' }}
|
|
37
|
-
width={'100%'}
|
|
38
|
-
>
|
|
39
|
-
<ConversationArea mobile={false} />
|
|
40
|
-
</Flexbox>
|
|
41
|
-
<Portal>
|
|
42
|
-
<Suspense fallback={<BrandTextLoading />}>
|
|
43
|
-
<PortalPanel mobile={false} />
|
|
44
|
-
</Suspense>
|
|
45
|
-
</Portal>
|
|
46
|
-
<TopicPanel>
|
|
47
|
-
<TopicSidebar mobile={false} />
|
|
48
|
-
</TopicPanel>
|
|
21
|
+
const DesktopWorkspace = memo(() => (
|
|
22
|
+
<>
|
|
23
|
+
<ChatHeaderDesktop />
|
|
24
|
+
<Flexbox
|
|
25
|
+
height={'100%'}
|
|
26
|
+
horizontal
|
|
27
|
+
style={{ overflow: 'hidden', position: 'relative' }}
|
|
28
|
+
width={'100%'}
|
|
29
|
+
>
|
|
30
|
+
<Flexbox height={'100%'} style={{ overflow: 'hidden', position: 'relative' }} width={'100%'}>
|
|
31
|
+
<ConversationArea mobile={false} />
|
|
49
32
|
</Flexbox>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
33
|
+
<Portal>
|
|
34
|
+
<Suspense fallback={<BrandTextLoading />}>
|
|
35
|
+
<PortalPanel mobile={false} />
|
|
36
|
+
</Suspense>
|
|
37
|
+
</Portal>
|
|
38
|
+
<TopicPanel>
|
|
39
|
+
<TopicSidebar mobile={false} />
|
|
40
|
+
</TopicPanel>
|
|
41
|
+
</Flexbox>
|
|
42
|
+
<MainInterfaceTracker />
|
|
43
|
+
</>
|
|
44
|
+
));
|
|
54
45
|
|
|
55
46
|
DesktopWorkspace.displayName = 'DesktopWorkspace';
|
|
56
47
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIChatMessage } from '@lobechat/types';
|
|
2
2
|
import { Tag } from '@lobehub/ui';
|
|
3
|
-
import {
|
|
3
|
+
import { useResponsive } from 'antd-style';
|
|
4
4
|
import isEqual from 'fast-deep-equal';
|
|
5
5
|
import { ReactNode, memo, useCallback, useMemo } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
@@ -45,13 +45,6 @@ const remarkPlugins = markdownElements
|
|
|
45
45
|
.map((element) => element.remarkPlugin)
|
|
46
46
|
.filter(Boolean);
|
|
47
47
|
|
|
48
|
-
const useUserStyles = createStyles(({ css, token }) => ({
|
|
49
|
-
messageContainer: css`
|
|
50
|
-
border: none;
|
|
51
|
-
background: ${token.colorFillTertiary};
|
|
52
|
-
`,
|
|
53
|
-
}));
|
|
54
|
-
|
|
55
48
|
const UserMessage = memo<UserMessageProps>(({ id, disableEditing, index }) => {
|
|
56
49
|
const item = useChatStore(
|
|
57
50
|
displayMessageSelectors.getDisplayMessageById(id),
|
|
@@ -63,8 +56,6 @@ const UserMessage = memo<UserMessageProps>(({ id, disableEditing, index }) => {
|
|
|
63
56
|
const { t } = useTranslation('chat');
|
|
64
57
|
const { mobile } = useResponsive();
|
|
65
58
|
const avatar = useUserAvatar();
|
|
66
|
-
const { styles: userStyles } = useUserStyles();
|
|
67
|
-
|
|
68
59
|
const title = useUserStore(userProfileSelectors.displayUserName);
|
|
69
60
|
|
|
70
61
|
const displayMode = useAgentStore(agentChatConfigSelectors.displayMode);
|
|
@@ -174,7 +165,6 @@ const UserMessage = memo<UserMessageProps>(({ id, disableEditing, index }) => {
|
|
|
174
165
|
>
|
|
175
166
|
<Flexbox flex={1} style={{ maxWidth: '100%', minWidth: 0 }}>
|
|
176
167
|
<MessageContent
|
|
177
|
-
className={userStyles.messageContainer}
|
|
178
168
|
editing={editing}
|
|
179
169
|
id={id}
|
|
180
170
|
markdownProps={markdownProps}
|
|
@@ -119,19 +119,6 @@ const FileExplorer = memo<FileExplorerProps>(({ knowledgeBaseId, category, onOpe
|
|
|
119
119
|
...viewConfig,
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
// Debug: Log received data
|
|
123
|
-
React.useEffect(() => {
|
|
124
|
-
if (data) {
|
|
125
|
-
console.log('[FileList] Received data:', {
|
|
126
|
-
count: data.length,
|
|
127
|
-
documents: data.filter((item) => item.sourceType === 'document'),
|
|
128
|
-
sampleDocumentWithEditorData: data.find(
|
|
129
|
-
(item) => item.sourceType === 'document' && item.editorData,
|
|
130
|
-
),
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}, [data]);
|
|
134
|
-
|
|
135
122
|
// Handle view transition with a brief delay to show skeleton
|
|
136
123
|
React.useEffect(() => {
|
|
137
124
|
if (isTransitioning && data) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { Button, Dropdown, Icon, MenuProps } from '@lobehub/ui';
|
|
4
4
|
import { Upload } from 'antd';
|
|
5
5
|
import { css, cx } from 'antd-style';
|
|
6
|
-
import { FilePenLine, FileUp, FolderUp, Plus } from 'lucide-react';
|
|
6
|
+
import { FilePenLine, FileUp, FolderIcon, FolderUp, Plus } from 'lucide-react';
|
|
7
7
|
import { useMemo, useState } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
|
|
@@ -34,14 +34,25 @@ const AddButton = ({ knowledgeBaseId }: { knowledgeBaseId?: string }) => {
|
|
|
34
34
|
setIsModalOpen(false);
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
+
const handleCreateFolder = () => {
|
|
38
|
+
setIsModalOpen(false);
|
|
39
|
+
console.log('create folder');
|
|
40
|
+
};
|
|
41
|
+
|
|
37
42
|
const items = useMemo<MenuProps['items']>(
|
|
38
43
|
() => [
|
|
39
44
|
{
|
|
40
45
|
icon: <Icon icon={FilePenLine} />,
|
|
41
46
|
key: 'create-note',
|
|
42
|
-
label: t('
|
|
47
|
+
label: t('header.actions.newPage'),
|
|
43
48
|
onClick: handleOpenNoteEditor,
|
|
44
49
|
},
|
|
50
|
+
{
|
|
51
|
+
icon: <Icon icon={FolderIcon} />,
|
|
52
|
+
key: 'create-folder',
|
|
53
|
+
label: t('header.actions.newFolder'),
|
|
54
|
+
onClick: handleCreateFolder,
|
|
55
|
+
},
|
|
45
56
|
{
|
|
46
57
|
type: 'divider',
|
|
47
58
|
},
|
|
@@ -58,7 +69,7 @@ const AddButton = ({ knowledgeBaseId }: { knowledgeBaseId?: string }) => {
|
|
|
58
69
|
multiple={true}
|
|
59
70
|
showUploadList={false}
|
|
60
71
|
>
|
|
61
|
-
<div className={cx(hotArea)}>
|
|
72
|
+
<div className={cx(hotArea)}>{t('header.actions.uploadFile')}</div>
|
|
62
73
|
</Upload>
|
|
63
74
|
),
|
|
64
75
|
},
|
|
@@ -76,7 +87,7 @@ const AddButton = ({ knowledgeBaseId }: { knowledgeBaseId?: string }) => {
|
|
|
76
87
|
multiple={true}
|
|
77
88
|
showUploadList={false}
|
|
78
89
|
>
|
|
79
|
-
<div className={cx(hotArea)}>
|
|
90
|
+
<div className={cx(hotArea)}>{t('header.actions.uploadFolder')}</div>
|
|
80
91
|
</Upload>
|
|
81
92
|
),
|
|
82
93
|
},
|
|
@@ -40,7 +40,6 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
|
40
40
|
background: ${token.colorFillQuaternary};
|
|
41
41
|
`,
|
|
42
42
|
scrollContainer: css`
|
|
43
|
-
|
|
44
43
|
/* Hide scrollbar */
|
|
45
44
|
scrollbar-width: none;
|
|
46
45
|
|
|
@@ -80,4 +79,3 @@ const RecentFilesSkeleton = memo(() => {
|
|
|
80
79
|
});
|
|
81
80
|
|
|
82
81
|
export default RecentFilesSkeleton;
|
|
83
|
-
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
addFolder: '创建文件夹',
|
|
2
3
|
addKnowledge: '添加知识',
|
|
3
4
|
addPage: '创建文稿',
|
|
4
5
|
desc: '管理你的工作、学习与生活知识。',
|
|
@@ -65,6 +66,7 @@ export default {
|
|
|
65
66
|
header: {
|
|
66
67
|
actions: {
|
|
67
68
|
newFolder: '新建文件夹',
|
|
69
|
+
newPage: '新建文稿',
|
|
68
70
|
uploadFile: '上传文件',
|
|
69
71
|
uploadFolder: '上传文件夹',
|
|
70
72
|
},
|