@lobehub/chat 0.101.3 → 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,31 @@
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
+
5
30
  ### [Version 0.101.3](https://github.com/lobehub/lobe-chat/compare/v0.101.2...v0.101.3)
6
31
 
7
32
  <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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.101.3",
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,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(),