@lobehub/chat 0.49.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 CHANGED
@@ -2,6 +2,31 @@
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
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ## [Version 0.49.0](https://github.com/lobehub/lobe-chat/compare/v0.48.0...v0.49.0)
6
31
 
7
32
  <sup>Released on **2023-08-15**</sup>
@@ -1,22 +1,26 @@
1
1
  {
2
2
  "about": "About",
3
3
  "advanceSettings": "Advanced Settings",
4
- "agentMaxToken": "Max Token Length",
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": "Agent Profile",
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 action.",
15
- "confirmRemoveSessionItemAlert": "You are about to delete this assistant. Once deleted, it cannot be recovered. Please confirm your action.",
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 Successful",
18
- "defaultAgent": "Default Assistant",
19
- "defaultSession": "Default Session",
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 description available",
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 Archive",
46
- "searchAgentPlaceholder": "Search Assistants and Sessions...",
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}} · Chat History: {{chatsToken}}",
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 Profile",
79
+ "updateAgent": "Update Assistant Information",
69
80
  "updatePrompt": "Update Prompts"
70
81
  }
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "response": {
3
- "400": "Sorry, the server doesn't understand your request. Please make sure your request parameters are correct.",
4
- "401": "Sorry, the server has rejected your request. This may be due to insufficient permissions or invalid authentication.",
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. This may be due to overload or maintenance. Please try again later.",
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 data...",
8
+ "content": "Loading...",
9
9
  "plugin": "Plugin is running..."
10
10
  },
11
11
  "pluginList": "Plugin List",
12
12
  "plugins": {
13
- "realtimeWeather": "Real-time Weather Forecast",
13
+ "realtimeWeather": "Realtime Weather",
14
14
  "searchEngine": "Search Engine",
15
- "undefined": "Plugin detection in progress...",
16
- "websiteCrawler": "Website Content Extraction"
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 Speed",
23
+ "daywind": "Daytime Wind",
24
24
  "nighttemp_float": "Nighttime Temperature",
25
25
  "nightweather": "Nighttime Weather",
26
- "nightwind": "Nighttime Wind Speed",
26
+ "nightwind": "Nighttime Wind",
27
27
  "week": "Week"
28
28
  },
29
- "title": "Weather Data for the Past 7 Days ({{city}})",
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": "Enter assistant description",
31
+ "placeholder": "Please enter assistant description",
32
32
  "title": "Assistant Description"
33
33
  },
34
34
  "name": {
35
- "placeholder": "Enter assistant name",
35
+ "placeholder": "Please enter assistant name",
36
36
  "title": "Name"
37
37
  },
38
38
  "prompt": {
39
- "placeholder": "Enter role prompt",
39
+ "placeholder": "Please enter role prompt",
40
40
  "title": "Role Prompt"
41
41
  },
42
42
  "tag": {
43
- "placeholder": "Enter tag",
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}} chat messages",
67
- "unlimited": "Unlimited chat history"
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": "Top-p Sampling"
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 Endpoint"
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": "Enter access password",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "description": "Lobe Chat is an open-source chatbot client using LangChain, Typescript and Next.js",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -2,9 +2,8 @@ export default {
2
2
  about: '关于',
3
3
  advanceSettings: '高级设置',
4
4
  agentDefaultMessage:
5
- '你好,我是你的自定义助手,你可以立即与我开始对话,也可以前往 [助手设置](/chat/{{id}}/setting) 完善我的信息。',
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: '助手信息',
@@ -21,8 +20,8 @@ export default {
21
20
  confirmRemoveSessionItemAlert: '即将删除该助手,删除后该将无法找回,请确认你的操作',
22
21
  copy: '复制',
23
22
  copySuccess: '复制成功',
24
- defaultAgent: '默认助手',
25
- defaultSession: '默认助手',
23
+ defaultAgent: '自定义助手',
24
+ defaultSession: '自定义助手',
26
25
  delete: '删除',
27
26
  edit: '编辑',
28
27
  export: '导出配置',
@@ -1,15 +1,3 @@
1
- import common from '../../../locales/en_US/common.json';
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;
@@ -37,7 +37,6 @@ const SkeletonList = () => {
37
37
  avatar
38
38
  key={index}
39
39
  paragraph={{ className: styles.paragraph, rows: 1 }}
40
- round
41
40
  title={{ className: styles.title }}
42
41
  />
43
42
  ))}
@@ -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
  });
@@ -47,7 +47,6 @@ const Header = memo<{ settings?: boolean }>(({ settings = true }) => {
47
47
  active
48
48
  avatar={{ shape: 'circle', size: 'default' }}
49
49
  paragraph={false}
50
- round
51
50
  title={{ style: { margin: 0, marginTop: 8 }, width: 200 }}
52
51
  />
53
52
  </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 { Maximize2Icon } from 'lucide-react';
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={Maximize2Icon}
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
  />
@@ -11,7 +11,6 @@ const SkeletonList = memo(() => {
11
11
  avatar={false}
12
12
  key={i}
13
13
  paragraph={{ rows: 1, width: '100%' }}
14
- round
15
14
  title={false}
16
15
  />
17
16
  ))}
@@ -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
- : !!systemRole
59
- ? t('agentDefaultMessageWithSystemRole', { systemRole })
60
- : t('agentDefaultMessage', { id: activeId }),
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',