@lobehub/chat 0.48.0 → 0.50.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 +51 -0
- package/locales/en_US/common.json +24 -13
- package/locales/en_US/error.json +3 -3
- package/locales/en_US/plugin.json +7 -7
- package/locales/en_US/setting.json +12 -12
- package/locales/zh_CN/common.json +13 -2
- package/package.json +1 -1
- package/src/features/SideBar/BottomActions.tsx +4 -4
- package/src/locales/default/common.ts +8 -8
- package/src/locales/resources/en_US.ts +1 -13
- package/src/pages/chat/SessionList/List/Item/Actions.tsx +2 -2
- package/src/pages/chat/SessionList/List/SkeletonList.tsx +0 -1
- 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/ChatList/SkeletonList.tsx +1 -8
- 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/Header/index.tsx +0 -1
- package/src/pages/chat/features/Sidebar/Header.tsx +1 -1
- package/src/pages/chat/features/Sidebar/SystemRole.tsx +2 -3
- package/src/pages/chat/features/Sidebar/Topic/SkeletonList.tsx +0 -1
- package/src/pages/chat/features/Sidebar/Topic/TopicItem.tsx +1 -1
- package/src/pages/index/Loading.tsx +6 -18
- package/src/store/session/slices/chat/selectors/chat.ts +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 0.50.0](https://github.com/lobehub/lobe-chat/compare/v0.49.0...v0.50.0)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-08-15**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Update messages, settings, error codes, plugin names, weather data display, and UI.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **misc**: Update messages, settings, error codes, plugin names, weather data display, and UI ([a41db51](https://github.com/lobehub/lobe-chat/commit/a41db51))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
## [Version 0.49.0](https://github.com/lobehub/lobe-chat/compare/v0.48.0...v0.49.0)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-08-15**</sup>
|
|
33
|
+
|
|
34
|
+
#### ✨ Features
|
|
35
|
+
|
|
36
|
+
- **misc**: Add `BackToBottom` to conversation, Update icons and text in various components.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's improved
|
|
44
|
+
|
|
45
|
+
- **misc**: Add `BackToBottom` to conversation ([1433aa9](https://github.com/lobehub/lobe-chat/commit/1433aa9))
|
|
46
|
+
- **misc**: Update icons and text in various components ([0e7a683](https://github.com/lobehub/lobe-chat/commit/0e7a683))
|
|
47
|
+
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
<div align="right">
|
|
51
|
+
|
|
52
|
+
[](#readme-top)
|
|
53
|
+
|
|
54
|
+
</div>
|
|
55
|
+
|
|
5
56
|
## [Version 0.48.0](https://github.com/lobehub/lobe-chat/compare/v0.47.0...v0.48.0)
|
|
6
57
|
|
|
7
58
|
<sup>Released on **2023-08-15**</sup>
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"about": "About",
|
|
3
3
|
"advanceSettings": "Advanced Settings",
|
|
4
|
-
"
|
|
4
|
+
"agentDefaultMessage": "Hello, I'm **{{name}}**. You can start chatting with me right away or go to [Assistant Settings](/chat/{{id}}/setting) to complete my information.",
|
|
5
|
+
"agentDefaultMessageWithSystemRole": "Hello, I'm **{{name}}**, {{systemRole}}. Let's start chatting!",
|
|
6
|
+
"agentMaxToken": "Max Session Length",
|
|
5
7
|
"agentModel": "Model",
|
|
6
|
-
"agentProfile": "
|
|
8
|
+
"agentProfile": "Assistant Information",
|
|
9
|
+
"appInitializing": "LobeChat is initializing, please wait...",
|
|
7
10
|
"archive": "Archive",
|
|
8
11
|
"autoGenerate": "Auto Generate",
|
|
9
12
|
"autoGenerateTooltip": "Auto generate assistant description based on prompts",
|
|
13
|
+
"backToBottom": "Go to Latest Messages",
|
|
10
14
|
"cancel": "Cancel",
|
|
11
15
|
"changelog": "Changelog",
|
|
12
|
-
"clearCurrentMessages": "Clear Current Messages",
|
|
16
|
+
"clearCurrentMessages": "Clear Current Session Messages",
|
|
13
17
|
"close": "Close",
|
|
14
|
-
"confirmClearCurrentMessages": "You are about to clear the current messages. Once cleared, they cannot be recovered. Please confirm your
|
|
15
|
-
"confirmRemoveSessionItemAlert": "You are about to delete this assistant. Once deleted, it cannot be recovered. Please confirm your
|
|
18
|
+
"confirmClearCurrentMessages": "You are about to clear the current session messages. Once cleared, they cannot be recovered. Please confirm your operation.",
|
|
19
|
+
"confirmRemoveSessionItemAlert": "You are about to delete this assistant. Once deleted, it cannot be recovered. Please confirm your operation.",
|
|
16
20
|
"copy": "Copy",
|
|
17
|
-
"copySuccess": "Copy
|
|
18
|
-
"defaultAgent": "
|
|
19
|
-
"defaultSession": "
|
|
21
|
+
"copySuccess": "Copy Success",
|
|
22
|
+
"defaultAgent": "Custom Assistant",
|
|
23
|
+
"defaultSession": "Custom Assistant",
|
|
20
24
|
"delete": "Delete",
|
|
21
25
|
"edit": "Edit",
|
|
22
26
|
"export": "Export Configuration",
|
|
@@ -30,30 +34,37 @@
|
|
|
30
34
|
},
|
|
31
35
|
"feedback": "Feedback",
|
|
32
36
|
"import": "Import Configuration",
|
|
37
|
+
"inbox": {
|
|
38
|
+
"defaultMessage": "Hello, I'm your intelligent assistant. You can ask me any questions and I will do my best to answer you. If you need a more professional or customized assistant, you can click <kbd>+</kbd> to create a custom assistant.",
|
|
39
|
+
"desc": "Activate the brain cluster and spark your thinking. Your intelligent assistant is here to communicate with you about everything.",
|
|
40
|
+
"title": "Chat Freely"
|
|
41
|
+
},
|
|
33
42
|
"message": {
|
|
34
43
|
"function_loading": "Plugin request in progress..."
|
|
35
44
|
},
|
|
36
45
|
"moreSetting": "More Settings...",
|
|
37
46
|
"newAgent": "New Assistant",
|
|
38
|
-
"noDescription": "No
|
|
47
|
+
"noDescription": "No Description",
|
|
39
48
|
"ok": "OK",
|
|
40
49
|
"pin": "Pin",
|
|
41
50
|
"pinOff": "Unpin",
|
|
42
51
|
"regenerate": "Regenerate",
|
|
43
52
|
"rename": "Rename",
|
|
44
53
|
"reset": "Reset",
|
|
45
|
-
"roleAndArchive": "Roles and
|
|
46
|
-
"searchAgentPlaceholder": "Search Assistants and
|
|
54
|
+
"roleAndArchive": "Roles and Archives",
|
|
55
|
+
"searchAgentPlaceholder": "Search Assistants and Conversations...",
|
|
47
56
|
"send": "Send",
|
|
48
57
|
"sendPlaceholder": "Enter chat content...",
|
|
58
|
+
"sessionList": "Assistant List",
|
|
49
59
|
"setting": "Settings",
|
|
50
60
|
"share": "Share",
|
|
61
|
+
"stop": "Stop",
|
|
51
62
|
"tab": {
|
|
52
63
|
"chat": "Chat",
|
|
53
64
|
"market": "Assistant Market"
|
|
54
65
|
},
|
|
55
66
|
"temp": "Temporary",
|
|
56
|
-
"tokenDetail": "Role Setting: {{systemRoleToken}} ·
|
|
67
|
+
"tokenDetail": "Role Setting: {{systemRoleToken}} · Message History: {{chatsToken}}",
|
|
57
68
|
"tokenTag": {
|
|
58
69
|
"overload": "Exceeded Limit",
|
|
59
70
|
"remained": "Remaining",
|
|
@@ -65,6 +76,6 @@
|
|
|
65
76
|
"saveCurrentMessages": "Save the current session as a topic",
|
|
66
77
|
"searchPlaceholder": "Search Topics..."
|
|
67
78
|
},
|
|
68
|
-
"updateAgent": "Update Assistant
|
|
79
|
+
"updateAgent": "Update Assistant Information",
|
|
69
80
|
"updatePrompt": "Update Prompts"
|
|
70
81
|
}
|
package/locales/en_US/error.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"response": {
|
|
3
|
-
"400": "Sorry, the server
|
|
4
|
-
"401": "Sorry, the server has rejected your request
|
|
3
|
+
"400": "Sorry, the server does not understand your request. Please make sure your request parameters are correct.",
|
|
4
|
+
"401": "Sorry, the server has rejected your request, possibly due to insufficient permissions or invalid authentication.",
|
|
5
5
|
"403": "Sorry, the server has rejected your request. You do not have permission to access this content.",
|
|
6
6
|
"404": "Sorry, the server cannot find the page or resource you requested. Please make sure your URL is correct.",
|
|
7
7
|
"405": "Sorry, the server does not support the request method you are using. Please make sure your request method is correct.",
|
|
8
8
|
"429": "Sorry, your request is too frequent and the server is a bit tired. Please try again later.",
|
|
9
9
|
"500": "Sorry, the server seems to be experiencing some difficulties and is temporarily unable to complete your request. Please try again later.",
|
|
10
10
|
"502": "Sorry, the server seems to be lost and is temporarily unable to provide service. Please try again later.",
|
|
11
|
-
"503": "Sorry, the server is currently unable to process your request
|
|
11
|
+
"503": "Sorry, the server is currently unable to process your request, possibly due to overload or maintenance. Please try again later.",
|
|
12
12
|
"504": "Sorry, the server did not receive a response from the upstream server. Please try again later.",
|
|
13
13
|
"InvalidAccessCode": "The password is incorrect or empty. Please enter the correct access password or add a custom OpenAI API Key.",
|
|
14
14
|
"OpenAIBizError": "Error requesting OpenAI service. Please troubleshoot or retry based on the following information."
|
|
@@ -5,28 +5,28 @@
|
|
|
5
5
|
"response": "Response"
|
|
6
6
|
},
|
|
7
7
|
"loading": {
|
|
8
|
-
"content": "Loading
|
|
8
|
+
"content": "Loading...",
|
|
9
9
|
"plugin": "Plugin is running..."
|
|
10
10
|
},
|
|
11
11
|
"pluginList": "Plugin List",
|
|
12
12
|
"plugins": {
|
|
13
|
-
"realtimeWeather": "
|
|
13
|
+
"realtimeWeather": "Realtime Weather",
|
|
14
14
|
"searchEngine": "Search Engine",
|
|
15
|
-
"undefined": "Plugin
|
|
16
|
-
"websiteCrawler": "Website
|
|
15
|
+
"undefined": "Plugin Detection...",
|
|
16
|
+
"websiteCrawler": "Website Crawler"
|
|
17
17
|
},
|
|
18
18
|
"realtimeWeather": {
|
|
19
19
|
"data": {
|
|
20
20
|
"date": "Date",
|
|
21
21
|
"daytemp_float": "Daytime Temperature",
|
|
22
22
|
"dayweather": "Daytime Weather",
|
|
23
|
-
"daywind": "Daytime Wind
|
|
23
|
+
"daywind": "Daytime Wind",
|
|
24
24
|
"nighttemp_float": "Nighttime Temperature",
|
|
25
25
|
"nightweather": "Nighttime Weather",
|
|
26
|
-
"nightwind": "Nighttime Wind
|
|
26
|
+
"nightwind": "Nighttime Wind",
|
|
27
27
|
"week": "Week"
|
|
28
28
|
},
|
|
29
|
-
"title": "Weather Data for the
|
|
29
|
+
"title": "Weather Data for the Next 7 Days ({{city}})",
|
|
30
30
|
"updateAt": "Last Updated"
|
|
31
31
|
},
|
|
32
32
|
"responseData": "Response Data"
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"title": "Background Color"
|
|
29
29
|
},
|
|
30
30
|
"description": {
|
|
31
|
-
"placeholder": "
|
|
31
|
+
"placeholder": "Please enter assistant description",
|
|
32
32
|
"title": "Assistant Description"
|
|
33
33
|
},
|
|
34
34
|
"name": {
|
|
35
|
-
"placeholder": "
|
|
35
|
+
"placeholder": "Please enter assistant name",
|
|
36
36
|
"title": "Name"
|
|
37
37
|
},
|
|
38
38
|
"prompt": {
|
|
39
|
-
"placeholder": "
|
|
39
|
+
"placeholder": "Please enter role prompt",
|
|
40
40
|
"title": "Role Prompt"
|
|
41
41
|
},
|
|
42
42
|
"tag": {
|
|
43
|
-
"placeholder": "
|
|
43
|
+
"placeholder": "Please enter tag",
|
|
44
44
|
"title": "Tag"
|
|
45
45
|
},
|
|
46
46
|
"title": "Assistant Information"
|
|
@@ -61,18 +61,18 @@
|
|
|
61
61
|
"title": "Enable History Message Length Compression Threshold"
|
|
62
62
|
},
|
|
63
63
|
"enableHistoryCount": {
|
|
64
|
-
"title": "Enable History Message Count Limit",
|
|
65
64
|
"alias": "Unlimited",
|
|
66
|
-
"limited": "Only include {{number}}
|
|
67
|
-
"
|
|
65
|
+
"limited": "Only include {{number}} session messages",
|
|
66
|
+
"title": "Limit History Message Count",
|
|
67
|
+
"unlimited": "Unlimited History Message Count"
|
|
68
68
|
},
|
|
69
69
|
"historyCount": {
|
|
70
70
|
"desc": "Number of history messages carried in each request",
|
|
71
|
-
"title": "History Message Count"
|
|
71
|
+
"title": "Attached History Message Count"
|
|
72
72
|
},
|
|
73
73
|
"inputTemplate": {
|
|
74
74
|
"desc": "The latest user message will be filled into this template",
|
|
75
|
-
"placeholder": "Enter the input template, {text} will be replaced with real-time input",
|
|
75
|
+
"placeholder": "Enter the input template, {text} will be replaced with real-time input information",
|
|
76
76
|
"title": "User Input Preprocessing"
|
|
77
77
|
},
|
|
78
78
|
"title": "Chat Settings"
|
|
@@ -111,14 +111,14 @@
|
|
|
111
111
|
"title": "Model Settings",
|
|
112
112
|
"topP": {
|
|
113
113
|
"desc": "Similar to randomness, but do not change together with randomness",
|
|
114
|
-
"title": "
|
|
114
|
+
"title": "Nucleus Sampling"
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
"settingOpenAI": {
|
|
118
118
|
"endpoint": {
|
|
119
119
|
"desc": "Must include http(s)://, in addition to the default address",
|
|
120
120
|
"placeholder": "https://api.openai.com/v1",
|
|
121
|
-
"title": "API Proxy
|
|
121
|
+
"title": "API Proxy Address"
|
|
122
122
|
},
|
|
123
123
|
"title": "OpenAI Settings",
|
|
124
124
|
"token": {
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"settingSystem": {
|
|
134
134
|
"accessCode": {
|
|
135
135
|
"desc": "Encryption access has been enabled by the administrator",
|
|
136
|
-
"placeholder": "
|
|
136
|
+
"placeholder": "Please enter access password",
|
|
137
137
|
"title": "Access Password"
|
|
138
138
|
},
|
|
139
139
|
"title": "System Settings"
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"about": "关于",
|
|
3
3
|
"advanceSettings": "高级设置",
|
|
4
|
+
"agentDefaultMessage": "你好,我是 **{{name}}**,你可以立即与我开始对话,也可以前往 [助手设置](/chat/{{id}}/setting) 完善我的信息。",
|
|
5
|
+
"agentDefaultMessageWithSystemRole": "你好,我是 **{{name}}**,{{systemRole}},让我们开始对话吧!",
|
|
4
6
|
"agentMaxToken": "会话最大长度",
|
|
5
7
|
"agentModel": "模型",
|
|
6
8
|
"agentProfile": "助手信息",
|
|
9
|
+
"appInitializing": "LobeChat 启动中,请耐心等待...",
|
|
7
10
|
"archive": "归档",
|
|
8
11
|
"autoGenerate": "自动补全",
|
|
9
12
|
"autoGenerateTooltip": "基于提示词自动补全助手描述",
|
|
13
|
+
"backToBottom": "查看最新消息",
|
|
10
14
|
"cancel": "取消",
|
|
11
15
|
"changelog": "更新日志",
|
|
12
16
|
"clearCurrentMessages": "清空当前会话消息",
|
|
@@ -15,8 +19,8 @@
|
|
|
15
19
|
"confirmRemoveSessionItemAlert": "即将删除该助手,删除后该将无法找回,请确认你的操作",
|
|
16
20
|
"copy": "复制",
|
|
17
21
|
"copySuccess": "复制成功",
|
|
18
|
-
"defaultAgent": "
|
|
19
|
-
"defaultSession": "
|
|
22
|
+
"defaultAgent": "自定义助手",
|
|
23
|
+
"defaultSession": "自定义助手",
|
|
20
24
|
"delete": "删除",
|
|
21
25
|
"edit": "编辑",
|
|
22
26
|
"export": "导出配置",
|
|
@@ -30,6 +34,11 @@
|
|
|
30
34
|
},
|
|
31
35
|
"feedback": "反馈与建议",
|
|
32
36
|
"import": "导入配置",
|
|
37
|
+
"inbox": {
|
|
38
|
+
"defaultMessage": "你好,我是你的智能助手,你可以问我任何问题,我会尽力回答你。如果需要获得更加专业或定制的助手,可以点击<kbd>+</kbd>创建自定义助手",
|
|
39
|
+
"desc": "开启大脑集群,激发思维火花。你的智能助理,就在这里与你交流一切",
|
|
40
|
+
"title": "随便聊聊"
|
|
41
|
+
},
|
|
33
42
|
"message": {
|
|
34
43
|
"function_loading": "插件请求中..."
|
|
35
44
|
},
|
|
@@ -46,8 +55,10 @@
|
|
|
46
55
|
"searchAgentPlaceholder": "搜索助手和对话...",
|
|
47
56
|
"send": "发送",
|
|
48
57
|
"sendPlaceholder": "输入聊天内容...",
|
|
58
|
+
"sessionList": "助手列表",
|
|
49
59
|
"setting": "设置",
|
|
50
60
|
"share": "分享",
|
|
61
|
+
"stop": "停止",
|
|
51
62
|
"tab": {
|
|
52
63
|
"chat": "会话",
|
|
53
64
|
"market": "助手市场"
|
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
|
},
|
|
@@ -2,16 +2,16 @@ export default {
|
|
|
2
2
|
about: '关于',
|
|
3
3
|
advanceSettings: '高级设置',
|
|
4
4
|
agentDefaultMessage:
|
|
5
|
-
'
|
|
6
|
-
agentDefaultMessageWithSystemRole:
|
|
7
|
-
'你好,我是你的自定义助手,我的角色设定如下: \n\n --- \n\n {{systemRole}} \n\n --- \n\n 立即与我开始对话吧~',
|
|
5
|
+
'你好,我是 **{{name}}**,你可以立即与我开始对话,也可以前往 [助手设置](/chat/{{id}}/setting) 完善我的信息。',
|
|
6
|
+
agentDefaultMessageWithSystemRole: '你好,我是 **{{name}}**,{{systemRole}},让我们开始对话吧!',
|
|
8
7
|
agentMaxToken: '会话最大长度',
|
|
9
8
|
agentModel: '模型',
|
|
10
9
|
agentProfile: '助手信息',
|
|
11
|
-
appInitializing: '
|
|
10
|
+
appInitializing: 'LobeChat 启动中,请耐心等待...',
|
|
12
11
|
archive: '归档',
|
|
13
12
|
autoGenerate: '自动补全',
|
|
14
13
|
autoGenerateTooltip: '基于提示词自动补全助手描述',
|
|
14
|
+
backToBottom: '查看最新消息',
|
|
15
15
|
cancel: '取消',
|
|
16
16
|
changelog: '更新日志',
|
|
17
17
|
clearCurrentMessages: '清空当前会话消息',
|
|
@@ -20,8 +20,8 @@ export default {
|
|
|
20
20
|
confirmRemoveSessionItemAlert: '即将删除该助手,删除后该将无法找回,请确认你的操作',
|
|
21
21
|
copy: '复制',
|
|
22
22
|
copySuccess: '复制成功',
|
|
23
|
-
defaultAgent: '
|
|
24
|
-
defaultSession: '
|
|
23
|
+
defaultAgent: '自定义助手',
|
|
24
|
+
defaultSession: '自定义助手',
|
|
25
25
|
delete: '删除',
|
|
26
26
|
edit: '编辑',
|
|
27
27
|
export: '导出配置',
|
|
@@ -35,10 +35,9 @@ export default {
|
|
|
35
35
|
},
|
|
36
36
|
feedback: '反馈与建议',
|
|
37
37
|
import: '导入配置',
|
|
38
|
-
|
|
39
38
|
inbox: {
|
|
40
39
|
defaultMessage:
|
|
41
|
-
'
|
|
40
|
+
'你好,我是你的智能助手,你可以问我任何问题,我会尽力回答你。如果需要获得更加专业或定制的助手,可以点击<kbd>+</kbd>创建自定义助手',
|
|
42
41
|
desc: '开启大脑集群,激发思维火花。你的智能助理,就在这里与你交流一切',
|
|
43
42
|
title: '随便聊聊',
|
|
44
43
|
},
|
|
@@ -61,6 +60,7 @@ export default {
|
|
|
61
60
|
sessionList: '助手列表',
|
|
62
61
|
setting: '设置',
|
|
63
62
|
share: '分享',
|
|
63
|
+
stop: '停止',
|
|
64
64
|
tab: {
|
|
65
65
|
chat: '会话',
|
|
66
66
|
market: '助手市场',
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import empty from '../../../locales/en_US/empty.json';
|
|
3
|
-
import error from '../../../locales/en_US/error.json';
|
|
4
|
-
import plugin from '../../../locales/en_US/plugin.json';
|
|
5
|
-
import setting from '../../../locales/en_US/setting.json';
|
|
6
|
-
|
|
7
|
-
const resources = {
|
|
8
|
-
common,
|
|
9
|
-
empty,
|
|
10
|
-
error,
|
|
11
|
-
plugin,
|
|
12
|
-
setting,
|
|
13
|
-
} as const;
|
|
1
|
+
const resources = {} as const;
|
|
14
2
|
|
|
15
3
|
export default resources;
|
|
@@ -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
|
/>
|
|
@@ -26,16 +26,9 @@ const SkeletonList = memo(() => {
|
|
|
26
26
|
avatar={{ size: 40 }}
|
|
27
27
|
className={styles.user}
|
|
28
28
|
paragraph={{ width: ['50%', '30%'] }}
|
|
29
|
-
round
|
|
30
|
-
title={false}
|
|
31
|
-
/>
|
|
32
|
-
<Skeleton
|
|
33
|
-
active
|
|
34
|
-
avatar={{ size: 40 }}
|
|
35
|
-
paragraph={{ width: ['50%', '30%'] }}
|
|
36
|
-
round
|
|
37
29
|
title={false}
|
|
38
30
|
/>
|
|
31
|
+
<Skeleton active avatar={{ size: 40 }} paragraph={{ width: ['50%', '30%'] }} title={false} />
|
|
39
32
|
</Flexbox>
|
|
40
33
|
);
|
|
41
34
|
});
|
|
@@ -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>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActionIcon, EditableMessage } from '@lobehub/ui';
|
|
2
2
|
import { Skeleton } from 'antd';
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
|
-
import {
|
|
4
|
+
import { Edit } from 'lucide-react';
|
|
5
5
|
import { memo, useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { Flexbox } from 'react-layout-kit';
|
|
@@ -60,7 +60,7 @@ const SystemRole = memo(() => {
|
|
|
60
60
|
<Header
|
|
61
61
|
actions={
|
|
62
62
|
<ActionIcon
|
|
63
|
-
icon={
|
|
63
|
+
icon={Edit}
|
|
64
64
|
onClick={() => setOpenModal(true)}
|
|
65
65
|
size="small"
|
|
66
66
|
title={t('edit')}
|
|
@@ -73,7 +73,6 @@ const SystemRole = memo(() => {
|
|
|
73
73
|
<Skeleton
|
|
74
74
|
active
|
|
75
75
|
avatar={false}
|
|
76
|
-
round
|
|
77
76
|
style={{ marginTop: 12, paddingInline: 16 }}
|
|
78
77
|
title={false}
|
|
79
78
|
/>
|
|
@@ -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
|
});
|
|
@@ -50,14 +50,16 @@ export const currentChatsWithGuideMessage = (s: SessionStore): ChatMessage[] =>
|
|
|
50
50
|
if (!isBrandNewChat) return data;
|
|
51
51
|
|
|
52
52
|
const [activeId, isInbox] = [s.activeId, s.activeId === INBOX_SESSION_ID];
|
|
53
|
-
const systemRole = agentSelectors.currentAgentSystemRole(s);
|
|
54
53
|
const meta = agentSelectors.currentAgentMeta(s);
|
|
55
54
|
const emptyInboxGuideMessage = {
|
|
56
55
|
content: isInbox
|
|
57
56
|
? t('inbox.defaultMessage')
|
|
58
|
-
: !!
|
|
59
|
-
? t('agentDefaultMessageWithSystemRole', {
|
|
60
|
-
|
|
57
|
+
: !!meta.description
|
|
58
|
+
? t('agentDefaultMessageWithSystemRole', {
|
|
59
|
+
name: meta.title || t('defaultAgent'),
|
|
60
|
+
systemRole: meta.description,
|
|
61
|
+
})
|
|
62
|
+
: t('agentDefaultMessage', { id: activeId, name: meta.title || t('defaultAgent') }),
|
|
61
63
|
createAt: Date.now(),
|
|
62
64
|
extra: {},
|
|
63
65
|
id: 'default',
|