@lobehub/chat 0.14.0 → 0.15.1

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/locales/en_US/common.json +19 -27
  3. package/locales/en_US/plugin.json +10 -0
  4. package/locales/en_US/setting.json +42 -6
  5. package/locales/zh_CN/common.json +8 -17
  6. package/locales/zh_CN/plugin.json +10 -0
  7. package/locales/zh_CN/setting.json +36 -0
  8. package/package.json +1 -1
  9. package/src/components/HeaderSpacing/index.tsx +3 -1
  10. package/src/components/HeaderTitle/index.tsx +42 -0
  11. package/src/const/layoutTokens.ts +6 -1
  12. package/src/const/meta.ts +3 -0
  13. package/src/locales/default/common.ts +31 -51
  14. package/src/locales/default/plugin.ts +10 -0
  15. package/src/locales/default/setting.ts +46 -1
  16. package/src/locales/resources/en_US.ts +2 -0
  17. package/src/locales/resources/zh_CN.ts +2 -0
  18. package/src/pages/chat/SessionList/List/SessionItem.tsx +1 -2
  19. package/src/pages/chat/[id]/Config/Header.tsx +26 -0
  20. package/src/pages/chat/[id]/Config/SideBar.tsx +86 -0
  21. package/src/pages/chat/[id]/Config/index.tsx +5 -45
  22. package/src/pages/chat/[id]/Conversation/FunctionMessage.tsx +1 -1
  23. package/src/pages/chat/[id]/Conversation/Input/Action.tsx +13 -5
  24. package/src/pages/chat/[id]/Conversation/Input/index.tsx +11 -3
  25. package/src/pages/chat/[id]/Conversation/MessageExtra.tsx +1 -1
  26. package/src/pages/chat/[id]/Header.tsx +34 -43
  27. package/src/pages/chat/[id]/edit/AgentConfig/index.tsx +154 -95
  28. package/src/pages/chat/[id]/edit/AgentMeta/AutoGenerateInput.tsx +39 -0
  29. package/src/pages/chat/[id]/edit/AgentMeta/BackgroundSwatches.tsx +31 -0
  30. package/src/pages/chat/[id]/edit/AgentMeta/EmojiPicker.tsx +7 -3
  31. package/src/pages/chat/[id]/edit/AgentMeta/index.tsx +68 -75
  32. package/src/pages/chat/[id]/edit/AgentPlugin/index.tsx +44 -0
  33. package/src/pages/chat/[id]/edit/AgentPrompt/index.tsx +48 -0
  34. package/src/pages/chat/[id]/edit/Header.tsx +31 -0
  35. package/src/pages/chat/[id]/edit/index.page.tsx +12 -40
  36. package/src/pages/chat/[id]/index.page.tsx +2 -1
  37. package/src/pages/setting/Header.tsx +4 -11
  38. package/src/pages/setting/SettingForm.tsx +9 -9
  39. package/src/pages/setting/index.page.tsx +2 -1
  40. package/src/store/session/slices/agentConfig/initialState.ts +1 -5
  41. package/src/store/session/slices/agentConfig/selectors.ts +15 -5
  42. package/src/store/session/slices/chat/selectors/chat.ts +2 -2
  43. package/src/store/session/slices/session/selectors/chat.ts +1 -1
  44. package/src/utils/genSiteHeadTitle.ts +1 -0
  45. package/src/pages/chat/[id]/Config/ReadMode.tsx +0 -64
  46. package/src/pages/chat/[id]/edit/AgentConfig/Plugin.tsx +0 -46
  47. package/src/pages/chat/[id]/edit/AgentConfig/Prompt.tsx +0 -69
package/CHANGELOG.md CHANGED
@@ -2,6 +2,57 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.15.1](https://github.com/lobehub/lobe-chat/compare/v0.15.0...v0.15.1)
6
+
7
+ <sup>Released on **2023-07-24**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: 更新插件文案.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: 更新插件文案 ([0411335](https://github.com/lobehub/lobe-chat/commit/0411335))
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
+
30
+ ## [Version 0.15.0](https://github.com/lobehub/lobe-chat/compare/v0.14.0...v0.15.0)
31
+
32
+ <sup>Released on **2023-07-24**</sup>
33
+
34
+ #### ✨ Features
35
+
36
+ - **misc**: Add new features and improve user experience, Import and use constants from "meta.ts" instead of "agentConfig".
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's improved
44
+
45
+ - **misc**: Add new features and improve user experience ([64c8782](https://github.com/lobehub/lobe-chat/commit/64c8782))
46
+ - **misc**: Import and use constants from "meta.ts" instead of "agentConfig" ([1eb6a17](https://github.com/lobehub/lobe-chat/commit/1eb6a17))
47
+
48
+ </details>
49
+
50
+ <div align="right">
51
+
52
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
53
+
54
+ </div>
55
+
5
56
  ## [Version 0.14.0](https://github.com/lobehub/lobe-chat/compare/v0.13.1...v0.14.0)
6
57
 
7
58
  <sup>Released on **2023-07-24**</sup>
@@ -1,41 +1,33 @@
1
1
  {
2
+ "DefaultSession": "Default Session",
2
3
  "advanceSettings": "Advanced Settings",
3
- "agentAvatar": "Avatar",
4
- "agentDescription": "Description",
5
- "agentDescriptionPlaceholder": "Please enter a description",
4
+ "agentMaxToken": "Max Token Length",
6
5
  "agentModel": "Model",
7
- "agentName": "Name",
8
- "agentNamePlaceholder": "Please enter a name",
9
6
  "agentProfile": "Agent Profile",
10
- "agentPrompt": "AI Prompt",
11
- "agentPromptPlaceholder": "Please enter AI prompt",
12
- "agentTag": "Tag",
13
- "agentTagPlaceholder": "Please enter a tag",
14
7
  "archive": "Archive",
8
+ "archiveCurrentMessages": "Archive Current Session",
15
9
  "autoGenerate": "Auto Generate",
16
- "autoGenerateTooltip": "Description of the autocomplete assistant based on prompts",
10
+ "autoGenerateTooltip": "Auto generate assistant description based on prompts",
17
11
  "cancel": "Cancel",
12
+ "clearCurrentMessages": "Clear Current Session Messages",
18
13
  "close": "Close",
19
- "confirmRemoveSessionItemAlert": "You are about to remove this agent. Once removed, it cannot be recovered. Please confirm your action.",
20
- "defaultAgent": "Default Agent",
14
+ "confirmClearCurrentMessages": "You are about to clear the current session 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.",
16
+ "defaultAgent": "Default Assistant",
17
+ "defaultSession": "Default Session",
21
18
  "edit": "Edit",
22
- "editAgentProfile": "Edit Agent Profile",
23
19
  "export": "Export",
24
- "gpt-3.5-turbo": "GPT 3.5 Turbo",
25
- "gpt-3.5-turbo-16k": "GPT 3.5 Turbo (16K)",
26
- "gpt-4": "GPT 4",
27
- "gpt-4-32k": "GPT 4 (32K)",
28
- "modelConfig": "Model Configuration",
29
- "modelTemperature": "Temperature",
30
- "newAgent": "New Agent",
31
- "noDescription": "No description",
20
+ "newAgent": "New Assistant",
21
+ "noDescription": "No description available",
32
22
  "ok": "OK",
33
- "profile": "Profile",
34
23
  "reset": "Reset",
35
- "searchAgentPlaceholder": "Search agents and conversations...",
36
- "sessionSetting": "Session Setting",
37
- "setting": "Setting",
24
+ "searchAgentPlaceholder": "Search assistants and sessions...",
25
+ "send": "Send",
26
+ "sendPlaceholder": "Enter chat content...",
27
+ "sessionSetting": "Session Settings",
28
+ "setting": "Settings",
38
29
  "share": "Share",
39
- "updateAgent": "Update Agent",
40
- "updatePrompt": "Update Prompt"
30
+ "tokenDetail": "System Role Token: {{systemRoleToken}} Chats Token: {{chatsToken}}",
31
+ "updateAgent": "Update Assistant Profile",
32
+ "updatePrompt": "Update Prompts"
41
33
  }
@@ -0,0 +1,10 @@
1
+ {
2
+ "pluginList": "Plugin List",
3
+ "pluginLoading": "Plugin Loading...",
4
+ "plugins": {
5
+ "realtimeWeather": "Real-time Weather Forecast",
6
+ "searchEngine": "Search Engine",
7
+ "undefined": "Plugin Detection...",
8
+ "websiteCrawler": "Website Content Extraction"
9
+ }
10
+ }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "agentHeader": "Edit Assistant Information",
2
3
  "danger": {
3
4
  "clear": {
4
5
  "action": "Clear Now",
@@ -15,6 +16,31 @@
15
16
  }
16
17
  },
17
18
  "header": "Settings",
19
+ "settingAgent": {
20
+ "avatar": {
21
+ "title": "Avatar"
22
+ },
23
+ "description": {
24
+ "placeholder": "Please enter assistant description",
25
+ "title": "Assistant Description"
26
+ },
27
+ "name": {
28
+ "placeholder": "Please enter assistant name",
29
+ "title": "Name"
30
+ },
31
+ "prompt": {
32
+ "placeholder": "Please enter AI prompt",
33
+ "title": "Assistant Role"
34
+ },
35
+ "tag": {
36
+ "placeholder": "Please enter tags",
37
+ "title": "Tags"
38
+ },
39
+ "title": "Assistant Information",
40
+ "backgroundColor": {
41
+ "title": "Background Color"
42
+ }
43
+ },
18
44
  "settingChat": {
19
45
  "compressThreshold": {
20
46
  "desc": "When the uncompressed chat history exceeds this value, it will be compressed",
@@ -27,12 +53,13 @@
27
53
  "title": "Enable History Message Count Limit"
28
54
  },
29
55
  "historyCount": {
30
- "desc": "Number of history messages to include in each request",
56
+ "desc": "Number of history messages carried in each request",
31
57
  "title": "History Message Count"
32
58
  },
33
59
  "inputTemplate": {
34
60
  "desc": "The latest user message will be filled into this template",
35
- "title": "User Input Preprocessing"
61
+ "title": "User Input Preprocessing",
62
+ "placeholder": "Enter pre-processing template, {text} will be replaced with real-time input information"
36
63
  },
37
64
  "title": "Chat Settings"
38
65
  },
@@ -50,6 +77,12 @@
50
77
  },
51
78
  "model": {
52
79
  "desc": "ChatGPT Model",
80
+ "list": {
81
+ "gpt-3.5-turbo": "GPT 3.5",
82
+ "gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
83
+ "gpt-4": "GPT 4",
84
+ "gpt-4-32k": "GPT 4 (32K)"
85
+ },
53
86
  "title": "Model"
54
87
  },
55
88
  "presencePenalty": {
@@ -63,7 +96,7 @@
63
96
  "title": "Model Settings",
64
97
  "topP": {
65
98
  "desc": "Similar to randomness, but do not change together with randomness",
66
- "title": "Top-p Sampling"
99
+ "title": "Nucleus Sampling"
67
100
  }
68
101
  },
69
102
  "settingOpenAI": {
@@ -79,10 +112,13 @@
79
112
  "title": "API Key"
80
113
  }
81
114
  },
115
+ "settingPlugin": {
116
+ "title": "Plugin List"
117
+ },
82
118
  "settingSystem": {
83
119
  "accessCode": {
84
- "desc": "Encryption access is enabled by the administrator",
85
- "placeholder": "Please enter the access password",
120
+ "desc": "Encrypted access has been enabled by the administrator",
121
+ "placeholder": "Please enter access password",
86
122
  "title": "Access Password"
87
123
  },
88
124
  "title": "System Settings"
@@ -99,7 +135,7 @@
99
135
  "title": "Language Settings"
100
136
  },
101
137
  "neutralColor": {
102
- "desc": "Custom grayscale for different color biases",
138
+ "desc": "Custom grayscale for different color tendencies",
103
139
  "title": "Neutral Color"
104
140
  },
105
141
  "primaryColor": {
@@ -1,41 +1,32 @@
1
1
  {
2
2
  "advanceSettings": "高级设置",
3
- "agentAvatar": "头像",
4
- "agentDescription": "描述",
5
- "agentDescriptionPlaceholder": "请输入描述",
3
+ "agentMaxToken": "会话最大长度",
6
4
  "agentModel": "模型",
7
- "agentName": "名称",
8
- "agentNamePlaceholder": "请输入名称",
9
5
  "agentProfile": "助手信息",
10
- "agentPrompt": "提示词",
11
- "agentPromptPlaceholder": "请输入 AI 提示词",
12
- "agentTag": "标签",
13
- "agentTagPlaceholder": "请输入标签",
14
6
  "archive": "归档",
7
+ "archiveCurrentMessages": "归档当前会话",
15
8
  "autoGenerate": "自动补全",
16
9
  "autoGenerateTooltip": "基于提示词自动补全助手描述",
17
10
  "cancel": "取消",
11
+ "clearCurrentMessages": "清空当前会话消息",
18
12
  "close": "关闭",
13
+ "confirmClearCurrentMessages": "即将清空当前会话消息,清空后将无法找回,请确认你的操作",
19
14
  "confirmRemoveSessionItemAlert": "即将删除该助手,删除后该将无法找回,请确认你的操作",
20
15
  "defaultAgent": "默认助手",
16
+ "defaultSession": "默认对话",
21
17
  "edit": "编辑",
22
- "editAgentProfile": "编辑助手信息",
23
18
  "export": "导出",
24
- "gpt-3.5-turbo": "GPT 3.5",
25
- "gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
26
- "gpt-4": "GPT 4",
27
- "gpt-4-32k": "GPT 4 (32K)",
28
- "modelConfig": "模型配置",
29
- "modelTemperature": "发散度",
30
19
  "newAgent": "新建助手",
31
20
  "noDescription": "暂无描述",
32
21
  "ok": "确定",
33
- "profile": "助手身份",
34
22
  "reset": "重置",
35
23
  "searchAgentPlaceholder": "搜索助手和对话...",
24
+ "send": "发送",
25
+ "sendPlaceholder": "输入聊天内容...",
36
26
  "sessionSetting": "会话设置",
37
27
  "setting": "设置",
38
28
  "share": "分享",
29
+ "tokenDetail": "系统设定: {{systemRoleToken}} 历史消息: {{chatsToken}}",
39
30
  "updateAgent": "更新助理信息",
40
31
  "updatePrompt": "更新提示词"
41
32
  }
@@ -0,0 +1,10 @@
1
+ {
2
+ "pluginList": "插件列表",
3
+ "pluginLoading": "插件运行中...",
4
+ "plugins": {
5
+ "realtimeWeather": "实时天气预报",
6
+ "searchEngine": "搜索引擎",
7
+ "undefined": "插件检测中...",
8
+ "websiteCrawler": "网页内容提取"
9
+ }
10
+ }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "agentHeader": "编辑助手信息",
2
3
  "danger": {
3
4
  "clear": {
4
5
  "action": "立即清除",
@@ -15,6 +16,31 @@
15
16
  }
16
17
  },
17
18
  "header": "设置",
19
+ "settingAgent": {
20
+ "avatar": {
21
+ "title": "头像"
22
+ },
23
+ "backgroundColor": {
24
+ "title": "背景色"
25
+ },
26
+ "description": {
27
+ "placeholder": "请输入助手描述",
28
+ "title": "助手描述"
29
+ },
30
+ "name": {
31
+ "placeholder": "请输入助手名称",
32
+ "title": "名称"
33
+ },
34
+ "prompt": {
35
+ "placeholder": "请输入 AI 提示词",
36
+ "title": "助手角色"
37
+ },
38
+ "tag": {
39
+ "placeholder": "请输入标签",
40
+ "title": "标签"
41
+ },
42
+ "title": "助手信息"
43
+ },
18
44
  "settingChat": {
19
45
  "compressThreshold": {
20
46
  "desc": "当未压缩的历史消息超过该值时,将进行压缩",
@@ -32,6 +58,7 @@
32
58
  },
33
59
  "inputTemplate": {
34
60
  "desc": "用户最新的一条消息会填充到此模板",
61
+ "placeholder": "输入预处理模版,{text} 将替换为实时输入信息",
35
62
  "title": "用户输入预处理"
36
63
  },
37
64
  "title": "聊天设置"
@@ -50,6 +77,12 @@
50
77
  },
51
78
  "model": {
52
79
  "desc": "ChatGPT 模型",
80
+ "list": {
81
+ "gpt-3.5-turbo": "GPT 3.5",
82
+ "gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
83
+ "gpt-4": "GPT 4",
84
+ "gpt-4-32k": "GPT 4 (32K)"
85
+ },
53
86
  "title": "模型"
54
87
  },
55
88
  "presencePenalty": {
@@ -79,6 +112,9 @@
79
112
  "title": "API Key"
80
113
  }
81
114
  },
115
+ "settingPlugin": {
116
+ "title": "插件列表"
117
+ },
82
118
  "settingSystem": {
83
119
  "accessCode": {
84
120
  "desc": "管理员已开启加密访问",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "Lobe Chat is an open-source chatbot client using LangChain, Typescript and Next.js",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -2,6 +2,8 @@ import { memo } from 'react';
2
2
 
3
3
  import { HEADER_HEIGHT } from '@/const/layoutTokens';
4
4
 
5
- const HeaderSpacing = memo(() => <div style={{ flex: 'none', height: HEADER_HEIGHT }} />);
5
+ const HeaderSpacing = memo<{ height?: number }>(({ height = HEADER_HEIGHT }) => (
6
+ <div style={{ flex: 'none', height }} />
7
+ ));
6
8
 
7
9
  export default HeaderSpacing;
@@ -0,0 +1,42 @@
1
+ import { createStyles } from 'antd-style';
2
+ import { ReactNode, memo } from 'react';
3
+ import { Flexbox } from 'react-layout-kit';
4
+
5
+ const useStyles = createStyles(({ css, token }) => ({
6
+ desc: css`
7
+ font-size: 12px;
8
+ color: ${token.colorTextTertiary};
9
+ `,
10
+ title: css`
11
+ font-size: 16px;
12
+ font-weight: bold;
13
+ `,
14
+ titleWithDesc: css`
15
+ font-weight: bold;
16
+ `,
17
+ }));
18
+
19
+ export interface HeaderTitleProps {
20
+ desc?: string | ReactNode;
21
+ tag?: ReactNode;
22
+ title: string | ReactNode;
23
+ }
24
+
25
+ const HeaderTitle = memo<HeaderTitleProps>(({ title, desc, tag }) => {
26
+ const { styles } = useStyles();
27
+ if (desc)
28
+ return (
29
+ <Flexbox>
30
+ <Flexbox align={'center'} className={styles.titleWithDesc} gap={8} horizontal>
31
+ {title}
32
+ {tag}
33
+ </Flexbox>
34
+ <Flexbox align={'center'} className={styles.desc} horizontal>
35
+ {desc}
36
+ </Flexbox>
37
+ </Flexbox>
38
+ );
39
+ return <div className={styles.title}>{title}</div>;
40
+ });
41
+
42
+ export default HeaderTitle;
@@ -1,5 +1,10 @@
1
+ import type { FormProps } from '@lobehub/ui';
2
+
1
3
  export const HEADER_HEIGHT = 64;
2
4
  export const CHAT_TEXTAREA_HEIGHT = 200;
3
5
  export const CHAT_SIDEBAR_WIDTH = 280;
4
-
5
6
  export const FOLDER_WIDTH = 256;
7
+ export const FORM_STYLE: FormProps = {
8
+ itemMinWidth: 'max(30%,240px)',
9
+ style: { maxWidth: 1024, width: '100%' },
10
+ };
@@ -0,0 +1,3 @@
1
+ export const DEFAULT_AVATAR = '🤖';
2
+ export const DEFAULT_USER_AVATAR = '😀';
3
+ export const DEFAULT_BACKGROUND_COLOR = 'rgba(0,0,0,0)';
@@ -1,53 +1,33 @@
1
1
  export default {
2
- 'DefaultSession': '默认对话',
3
- 'advanceSettings': '高级设置',
4
- 'agentAvatar': '头像',
5
- 'agentDescription': '描述',
6
- 'agentDescriptionPlaceholder': '请输入描述',
7
- 'agentMaxToken': '会话最大长度',
8
- 'agentModel': '模型',
9
- 'agentName': '名称',
10
- 'agentNamePlaceholder': '请输入名称',
11
- 'agentProfile': '助手信息',
12
- 'agentPrompt': '提示词',
13
- 'agentPromptPlaceholder': '请输入 AI 提示词',
14
- 'agentTag': '标签',
15
- 'agentTagPlaceholder': '请输入标签',
16
- 'archive': '归档',
17
- 'archiveCurrentMessages': '归档当前会话',
18
- 'autoGenerate': '自动补全',
19
- 'autoGenerateTooltip': '基于提示词自动补全助手描述',
20
- 'cancel': '取消',
21
- 'clearCurrentMessages': '清空当前会话消息',
22
- 'close': '关闭',
23
- 'confirmClearCurrentMessages': '即将清空当前会话消息,清空后将无法找回,请确认你的操作',
24
- 'confirmRemoveSessionItemAlert': '即将删除该助手,删除后该将无法找回,请确认你的操作',
25
- 'defaultAgent': '默认助手',
26
- 'edit': '编辑',
27
- 'editAgentProfile': '编辑助手信息',
28
- 'export': '导出',
29
- 'gpt-3.5-turbo': 'GPT 3.5',
30
- 'gpt-3.5-turbo-16k': 'GPT 3.5 (16K)',
31
- 'gpt-4': 'GPT 4',
32
- 'gpt-4-32k': 'GPT 4 (32K)',
33
- 'modelConfig': '模型配置',
34
- 'modelTemperature': '发散度',
35
- 'newAgent': '新建助手',
36
- 'noDescription': '暂无描述',
37
- 'ok': '确定',
38
- 'plugin-realtimeWeather': '实时天气预报',
39
- 'plugin-searchEngine': '搜索引擎',
40
- 'plugin-undefined': '插件检测中...',
41
- 'plugin-websiteCrawler': '网页内容提取',
42
- 'pluginList': '插件列表',
43
- 'pluginLoading': '插件运行中...',
44
- 'profile': '助手身份',
45
- 'reset': '重置',
46
- 'searchAgentPlaceholder': '搜索助手和对话...',
47
- 'sessionSetting': '会话设置',
48
- 'setting': '设置',
49
- 'share': '分享',
50
- 'tokenDetail': '系统设定: {{systemRoleToken}} 历史消息: {{chatsToken}}',
51
- 'updateAgent': '更新助理信息',
52
- 'updatePrompt': '更新提示词',
2
+ advanceSettings: '高级设置',
3
+ agentMaxToken: '会话最大长度',
4
+ agentModel: '模型',
5
+ agentProfile: '助手信息',
6
+ archive: '归档',
7
+ archiveCurrentMessages: '归档当前会话',
8
+ archiveSearchPlaceholder: '搜索归档对话...',
9
+ autoGenerate: '自动补全',
10
+ autoGenerateTooltip: '基于提示词自动补全助手描述',
11
+ cancel: '取消',
12
+ clearCurrentMessages: '清空当前会话消息',
13
+ close: '关闭',
14
+ confirmClearCurrentMessages: '即将清空当前会话消息,清空后将无法找回,请确认你的操作',
15
+ confirmRemoveSessionItemAlert: '即将删除该助手,删除后该将无法找回,请确认你的操作',
16
+ defaultAgent: '默认助手',
17
+ defaultSession: '默认对话',
18
+ edit: '编辑',
19
+ export: '导出',
20
+ newAgent: '新建助手',
21
+ noDescription: '暂无描述',
22
+ ok: '确定',
23
+ reset: '重置',
24
+ roleAndArchive: '角色与记录',
25
+ searchAgentPlaceholder: '搜索助手和对话...',
26
+ send: '发送',
27
+ sendPlaceholder: '输入聊天内容...',
28
+ setting: '设置',
29
+ share: '分享',
30
+ tokenDetail: '系统设定: {{systemRoleToken}} 历史消息: {{chatsToken}}',
31
+ updateAgent: '更新助理信息',
32
+ updatePrompt: '更新提示词',
53
33
  };
@@ -0,0 +1,10 @@
1
+ export default {
2
+ pluginList: '插件列表',
3
+ pluginLoading: '插件运行中...',
4
+ plugins: {
5
+ realtimeWeather: '实时天气预报',
6
+ searchEngine: '搜索引擎',
7
+ undefined: '插件检测中...',
8
+ websiteCrawler: '网页内容提取',
9
+ },
10
+ };
@@ -14,8 +14,43 @@ export default {
14
14
  title: '重置所有设置',
15
15
  },
16
16
  },
17
- header: '设置',
17
+ header: {
18
+ global: '全局设置',
19
+ session: '会话设置',
20
+ },
21
+ settingAgent: {
22
+ avatar: {
23
+ title: '头像',
24
+ },
25
+ backgroundColor: {
26
+ title: '背景色',
27
+ },
28
+ description: {
29
+ placeholder: '请输入助手描述',
30
+ title: '助手描述',
31
+ },
32
+ name: {
33
+ placeholder: '请输入助手名称',
34
+ title: '名称',
35
+ },
36
+ prompt: {
37
+ placeholder: '请输入 AI 提示词',
38
+ title: '助手角色',
39
+ },
40
+ tag: {
41
+ placeholder: '请输入标签',
42
+ title: '标签',
43
+ },
44
+ title: '助手信息',
45
+ },
18
46
  settingChat: {
47
+ chatStyleType: {
48
+ title: '聊天窗口样式',
49
+ type: {
50
+ bubble: '气泡模式',
51
+ docs: '文档模式',
52
+ },
53
+ },
19
54
  compressThreshold: {
20
55
  desc: '当未压缩的历史消息超过该值时,将进行压缩',
21
56
  title: '历史消息长度压缩阈值',
@@ -32,6 +67,7 @@ export default {
32
67
  },
33
68
  inputTemplate: {
34
69
  desc: '用户最新的一条消息会填充到此模板',
70
+ placeholder: '输入预处理模版,{text} 将替换为实时输入信息',
35
71
  title: '用户输入预处理',
36
72
  },
37
73
  title: '聊天设置',
@@ -50,6 +86,12 @@ export default {
50
86
  },
51
87
  model: {
52
88
  desc: 'ChatGPT 模型',
89
+ list: {
90
+ 'gpt-3.5-turbo': 'GPT 3.5',
91
+ 'gpt-3.5-turbo-16k': 'GPT 3.5 (16K)',
92
+ 'gpt-4': 'GPT 4',
93
+ 'gpt-4-32k': 'GPT 4 (32K)',
94
+ },
53
95
  title: '模型',
54
96
  },
55
97
  presencePenalty: {
@@ -79,6 +121,9 @@ export default {
79
121
  title: 'API Key',
80
122
  },
81
123
  },
124
+ settingPlugin: {
125
+ title: '插件列表',
126
+ },
82
127
  settingSystem: {
83
128
  accessCode: {
84
129
  desc: '管理员已开启加密访问',
@@ -1,8 +1,10 @@
1
1
  import common from '../../../locales/en_US/common.json';
2
+ import plugin from '../../../locales/en_US/plugin.json';
2
3
  import setting from '../../../locales/en_US/setting.json';
3
4
 
4
5
  const resources = {
5
6
  common,
7
+ plugin,
6
8
  setting,
7
9
  } as const;
8
10
 
@@ -1,8 +1,10 @@
1
1
  import common from '../default/common';
2
+ import plugin from '../default/plugin';
2
3
  import setting from '../default/setting';
3
4
 
4
5
  const resources = {
5
6
  common,
7
+ plugin,
6
8
  setting,
7
9
  } as const;
8
10
 
@@ -7,7 +7,6 @@ import { Flexbox } from 'react-layout-kit';
7
7
  import { shallow } from 'zustand/shallow';
8
8
 
9
9
  import { chatSelectors, sessionSelectors, useSessionStore } from '@/store/session';
10
- import { DEFAULT_TITLE } from '@/store/session/slices/agentConfig';
11
10
  import { useSettings } from '@/store/settings';
12
11
 
13
12
  import { useStyles } from './style';
@@ -96,7 +95,7 @@ const SessionItem: FC<SessionItemProps> = memo(({ id, active = true, loading })
96
95
  }
97
96
  loading={loading}
98
97
  style={{ color: theme.colorText }}
99
- title={title || t(DEFAULT_TITLE)}
98
+ title={title || t('defaultSession')}
100
99
  />
101
100
  <Popconfirm
102
101
  arrow={false}