@lobehub/chat 0.101.2 → 0.101.4

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,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.101.4](https://github.com/lobehub/lobe-chat/compare/v0.101.3...v0.101.4)
6
+
7
+ <sup>Released on **2023-11-14**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix the plugin array merge error when fork agent from market.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix the plugin array merge error when fork agent from market, closes [#459](https://github.com/lobehub/lobe-chat/issues/459) ([fc29b33](https://github.com/lobehub/lobe-chat/commit/fc29b33))
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.101.3](https://github.com/lobehub/lobe-chat/compare/v0.101.2...v0.101.3)
31
+
32
+ <sup>Released on **2023-11-14**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: Improve password ui to make it more clear.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: Improve password ui to make it more clear, closes [#458](https://github.com/lobehub/lobe-chat/issues/458) ([e3d2a8e](https://github.com/lobehub/lobe-chat/commit/e3d2a8e))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 0.101.2](https://github.com/lobehub/lobe-chat/compare/v0.101.1...v0.101.2)
6
56
 
7
57
  <sup>Released on **2023-11-14**</sup>
package/README.md CHANGED
@@ -126,12 +126,12 @@ In our agent market. We have accumulated a large number of practical, prompt age
126
126
 
127
127
  | Recent Submits | Description |
128
128
  | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
129
+ | [Translation Assistant](https://chat-preview.lobehub.com/market?agent=en-cn-translator)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2023-11-14**</sup> | Expert in Chinese-English translation, pursuing accurate and elegant translations<br/>`translation` `chinese` `english` |
130
+ | [Research Article Translation Assistant](https://chat-preview.lobehub.com/market?agent=s-rtranslation)<br/><sup>By **[aihoom](https://github.com/aihoom)** on **2023-11-14**</sup> | An assistant that helps you translate scientific articles<br/>`research` `translation` |
129
131
  | [Academic Writing Enhancement Bot](https://chat-preview.lobehub.com/market?agent=academic-writing-eb)<br/><sup>By **[Ruler27](https://github.com/Ruler27)** on **2023-11-11**</sup> | Academic English spelling and rhetoric refinement.<br/>`proofreading` `rhetoric` `academic` `research` `english` `editing` |
130
132
  | [LobeChat Technical Documentation Expert](https://chat-preview.lobehub.com/market?agent=lobe-chat-develop-doc-writter)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2023-11-05**</sup> | LobeChat is an AI conversation application built with the Next.js framework. I will help you write the development documentation for LobeChat.<br/>`development-documentation` `technical-introduction` `next-js` `react` `lobe-chat` |
131
- | [Sketch Feature Summary Expert](https://chat-preview.lobehub.com/market?agent=sketch-changelog-highlighter)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2023-11-02**</sup> | Skilled at extracting key changes from Sketch release notes<br/>`experience-design` `sketch` `update` `feature` `text-summary` |
132
- | [Master of Debating](https://chat-preview.lobehub.com/market?agent=tqg-20231026)<br/><sup>By **[cake79](https://github.com/cake79)** on **2023-10-26**</sup> | Simulates people who enjoy debating and can express counterarguments to any user input<br/>`writing` `dialogue` |
133
133
 
134
- > 📊 Total agents: [<kbd>**39**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
134
+ > 📊 Total agents: [<kbd>**41**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
135
135
 
136
136
  <!-- AGENT LIST -->
137
137
 
package/README.zh-CN.md CHANGED
@@ -124,12 +124,12 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-link])高
124
124
 
125
125
  | 最近新增 | 助手说明 |
126
126
  | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
127
+ | [中英文互译助手](https://chat-preview.lobehub.com/market?agent=en-cn-translator)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2023-11-14**</sup> | 中英文翻译专家,追求翻译信达雅<br/>`翻译` `中文` `英文` |
128
+ | [科研文章翻译助手](https://chat-preview.lobehub.com/market?agent=s-rtranslation)<br/><sup>By **[aihoom](https://github.com/aihoom)** on **2023-11-14**</sup> | 能够帮你翻译科技文章的翻译助手<br/>`科研` `翻译` |
127
129
  | [学术写作增强机器人](https://chat-preview.lobehub.com/market?agent=academic-writing-eb)<br/><sup>By **[Ruler27](https://github.com/Ruler27)** on **2023-11-11**</sup> | 学术英语拼写和修辞改进。<br/>`校对` `修辞` `学术` `研究` `英文` `润色` |
128
130
  | [LobeChat 技术文档专家](https://chat-preview.lobehub.com/market?agent=lobe-chat-develop-doc-writter)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2023-11-05**</sup> | LobeChat 是一个 Next.js 框架构建的 AI 会话应用,我将会帮你一起书写 LobeChat 的开发文档<br/>`开发文档` `技术介绍` `next-js` `react` `lobe-chat` |
129
- | [Sketch 特性总结专家](https://chat-preview.lobehub.com/market?agent=sketch-changelog-highlighter)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2023-11-02**</sup> | 擅长从 Sketch 的更新日志中提取关键变更要点<br/>`体验设计` `sketch` `更新` `特性` `文本总结` |
130
- | [抬杠高手](https://chat-preview.lobehub.com/market?agent=tqg-20231026)<br/><sup>By **[cake79](https://github.com/cake79)** on **2023-10-26**</sup> | 模拟那些喜欢抬杠的人,能对用户输入的任何观点进行抬杠表达的角色<br/>`写作` `对话` |
131
131
 
132
- > 📊 Total agents: [<kbd>**39**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
132
+ > 📊 Total agents: [<kbd>**41**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
133
133
 
134
134
  <!-- AGENT LIST -->
135
135
 
@@ -61,5 +61,10 @@
61
61
  },
62
62
  "translateTo": "Translate",
63
63
  "updateAgent": "Update Agent Information",
64
+ "upload": {
65
+ "actionTooltip": "Upload Image",
66
+ "dragDesc": "Drag and drop files here, supports uploading multiple images. Hold Shift to send images directly",
67
+ "dragTitle": "Upload Image"
68
+ },
64
69
  "warp": "Line Break"
65
70
  }
@@ -37,7 +37,8 @@
37
37
  "confirm": "Confirm and Retry",
38
38
  "password": {
39
39
  "description": "The application encryption has been enabled by the administrator. Enter the application password to unlock the application. The password only needs to be filled in once.",
40
- "title": "Enter Password to Unlock Application"
40
+ "title": "Enter Password to Unlock Application",
41
+ "placeholder": "Please enter password"
41
42
  },
42
43
  "closeMessage": "Close message"
43
44
  }
@@ -61,5 +61,10 @@
61
61
  },
62
62
  "translateTo": "翻訳",
63
63
  "updateAgent": "エージェント情報を更新",
64
+ "upload": {
65
+ "actionTooltip": "画像をアップロード",
66
+ "dragDesc": "ファイルをここにドラッグして複数の画像をアップロードできます。Shift キーを押しながら画像を直接送信できます",
67
+ "dragTitle": "画像をアップロード"
68
+ },
64
69
  "warp": "改行"
65
70
  }
@@ -38,7 +38,8 @@
38
38
  "confirm": "確認して再試行",
39
39
  "password": {
40
40
  "description": "管理者によってアプリが暗号化されました。アプリをロック解除するには、アプリのパスワードを入力してください。パスワードは1回だけ入力すればよいです",
41
- "title": "パスワードを入力してアプリをロック解除"
41
+ "title": "パスワードを入力してアプリをロック解除",
42
+ "placeholder": "パスワードを入力してください"
42
43
  }
43
44
  }
44
45
  }
@@ -61,5 +61,10 @@
61
61
  },
62
62
  "translateTo": "번역",
63
63
  "updateAgent": "도우미 정보 업데이트",
64
+ "upload": {
65
+ "actionTooltip": "이미지 업로드",
66
+ "dragDesc": "여기로 파일을 끌어다 놓으세요. 여러 이미지를 업로드할 수 있습니다. Shift를 누른 채로 이미지를 직접 보내세요.",
67
+ "dragTitle": "이미지 업로드"
68
+ },
64
69
  "warp": "줄바꿈"
65
70
  }
@@ -38,7 +38,8 @@
38
38
  "confirm": "확인 및 다시 시도",
39
39
  "password": {
40
40
  "description": "관리자가 애플리케이션 암호화를 활성화했습니다. 애플리케이션을 잠금 해제하려면 애플리케이션 비밀번호를 입력하십시오. 비밀번호는 한 번만 입력하면 됩니다.",
41
- "title": "암호 입력하여 애플리케이션 잠금 해제"
41
+ "title": "암호 입력하여 애플리케이션 잠금 해제",
42
+ "placeholder": "비밀번호를 입력하세요"
42
43
  }
43
44
  }
44
45
  }
@@ -61,5 +61,10 @@
61
61
  },
62
62
  "translateTo": "Перевести на",
63
63
  "updateAgent": "Обновить информацию о помощнике",
64
+ "upload": {
65
+ "actionTooltip": "Загрузить изображение",
66
+ "dragDesc": "Перетащите файлы сюда, поддерживается загрузка нескольких изображений. Удерживайте клавишу Shift для прямой отправки изображений",
67
+ "dragTitle": "Загрузить изображение"
68
+ },
64
69
  "warp": "Перенос строки"
65
70
  }
@@ -37,7 +37,8 @@
37
37
  "confirm": "Подтвердить и повторить попытку",
38
38
  "password": {
39
39
  "description": "Шифрование приложения включено администратором. Введите пароль приложения, чтобы разблокировать приложение. Пароль необходимо ввести только один раз.",
40
- "title": "Введите пароль для разблокировки приложения"
40
+ "title": "Введите пароль для разблокировки приложения",
41
+ "placeholder": "Введите пароль"
41
42
  },
42
43
  "closeMessage": "Закрыть сообщение"
43
44
  }
@@ -59,5 +59,10 @@
59
59
  },
60
60
  "translateTo": "翻译",
61
61
  "updateAgent": "更新助理信息",
62
+ "upload": {
63
+ "actionTooltip": "上传图片",
64
+ "dragDesc": "拖拽文件到这里,支持上传多个图片。按住 Shift 直接发送图片",
65
+ "dragTitle": "上传图片"
66
+ },
62
67
  "warp": "换行"
63
68
  }
@@ -38,6 +38,7 @@
38
38
  "confirm": "确认并重试",
39
39
  "password": {
40
40
  "description": "管理员已开启应用加密,输入应用密码后即可解锁应用。密码只需填写一次",
41
+ "placeholder": "请输入密码",
41
42
  "title": "输入密码解锁应用"
42
43
  }
43
44
  }
@@ -61,5 +61,10 @@
61
61
  },
62
62
  "translateTo": "翻譯",
63
63
  "updateAgent": "更新助理資訊",
64
+ "upload": {
65
+ "actionTooltip": "上傳圖片",
66
+ "dragDesc": "拖曳檔案到這裡,支援上傳多張圖片。按住 Shift 直接發送圖片",
67
+ "dragTitle": "上傳圖片"
68
+ },
64
69
  "warp": "換行"
65
70
  }
@@ -37,7 +37,8 @@
37
37
  "confirm": "確認並重試",
38
38
  "password": {
39
39
  "description": "管理員已啟用應用程式加密,輸入應用程式密碼後即可解鎖應用程式。密碼只需填寫一次。",
40
- "title": "輸入密碼解鎖應用程式"
40
+ "title": "輸入密碼解鎖應用程式",
41
+ "placeholder": "請輸入密碼"
41
42
  },
42
43
  "closeMessage": "關閉提示"
43
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.101.2",
3
+ "version": "0.101.4",
4
4
  "description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -1,5 +1,5 @@
1
1
  import { Icon, RenderErrorMessage } from '@lobehub/ui';
2
- import { Button, Segmented } from 'antd';
2
+ import { Button, Input, Segmented } from 'antd';
3
3
  import { KeySquare, SquareAsterisk } from 'lucide-react';
4
4
  import { memo, useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
@@ -8,7 +8,6 @@ import { Flexbox } from 'react-layout-kit';
8
8
  import { useGlobalStore } from '@/store/global';
9
9
  import { useSessionStore } from '@/store/session';
10
10
 
11
- import OtpInput from '../OTPInput';
12
11
  import APIKeyForm from './ApiKeyForm';
13
12
  import { ErrorActionContainer, FormAction } from './style';
14
13
 
@@ -47,11 +46,12 @@ const InvalidAccess: RenderErrorMessage = memo(({ id }) => {
47
46
  description={t('unlock.password.description')}
48
47
  title={t('unlock.password.title')}
49
48
  >
50
- <OtpInput
49
+ <Input.Password
51
50
  onChange={(e) => {
52
- setSettings({ password: e });
51
+ setSettings({ password: e.target.value });
53
52
  }}
54
- validationPattern={/.*/}
53
+ placeholder={t('unlock.password.placeholder')}
54
+ type={'block'}
55
55
  value={password}
56
56
  />
57
57
  </FormAction>
@@ -45,6 +45,7 @@ export default {
45
45
  confirm: '确认并重试',
46
46
  password: {
47
47
  description: '管理员已开启应用加密,输入应用密码后即可解锁应用。密码只需填写一次',
48
+ placeholder: '请输入密码',
48
49
  title: '输入密码解锁应用',
49
50
  },
50
51
  },
@@ -1,13 +1,13 @@
1
1
  import { produce } from 'immer';
2
- import { merge } from 'lodash-es';
3
2
  import { DeepPartial } from 'utility-types';
4
3
  import { StateCreator } from 'zustand/vanilla';
5
4
 
6
5
  import { INBOX_SESSION_ID } from '@/const/session';
7
6
  import { SESSION_CHAT_URL } from '@/const/url';
8
- import { useGlobalStore } from '@/store/global';
7
+ import { settingsSelectors, useGlobalStore } from '@/store/global';
9
8
  import { SessionStore } from '@/store/session';
10
9
  import { LobeAgentSession, LobeAgentSettings, LobeSessions } from '@/types/session';
10
+ import { merge } from '@/utils/merge';
11
11
  import { setNamespace } from '@/utils/storeDebug';
12
12
  import { uuid } from '@/utils/uuid';
13
13
 
@@ -85,8 +85,12 @@ export const createSessionSlice: StateCreator<
85
85
  const timestamp = Date.now();
86
86
 
87
87
  // 合并 settings 里的 defaultAgent
88
- const globalDefaultAgent = useGlobalStore.getState().settings.defaultAgent;
89
- const newSession: LobeAgentSession = merge({}, initLobeSession, globalDefaultAgent, {
88
+ const defaultAgent = merge(
89
+ initLobeSession,
90
+ settingsSelectors.defaultAgent(useGlobalStore.getState()),
91
+ );
92
+
93
+ const newSession: LobeAgentSession = merge(defaultAgent, {
90
94
  ...agent,
91
95
  createAt: timestamp,
92
96
  id: uuid(),