@lobehub/chat 0.18.0 → 0.18.2

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.18.2](https://github.com/lobehub/lobe-chat/compare/v0.18.1...v0.18.2)
6
+
7
+ <sup>Released on **2023-07-24**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: 修正 markdown li 丢失的问题.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: 修正 markdown li 丢失的问题 ([eb6e831](https://github.com/lobehub/lobe-chat/commit/eb6e831))
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.18.1](https://github.com/lobehub/lobe-chat/compare/v0.18.0...v0.18.1)
31
+
32
+ <sup>Released on **2023-07-24**</sup>
33
+
34
+ #### ♻ Code Refactoring
35
+
36
+ - **misc**: 优化新会话的创建逻辑 session.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Code refactoring
44
+
45
+ - **misc**: 优化新会话的创建逻辑 session ([d70f22d](https://github.com/lobehub/lobe-chat/commit/d70f22d))
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.18.0](https://github.com/lobehub/lobe-chat/compare/v0.17.0...v0.18.0)
6
56
 
7
57
  <sup>Released on **2023-07-24**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.18.0",
3
+ "version": "0.18.2",
4
4
  "description": "Lobe Chat is an open-source chatbot client using LangChain, Typescript and Next.js",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -33,4 +33,5 @@ export const useSessionStore = create<SessionStore>()(
33
33
 
34
34
  export * from './selectors';
35
35
  export { initialLobeAgentConfig } from './slices/agentConfig';
36
+ export { initLobeSession } from './slices/session';
36
37
  export type { SessionStore } from './store';
@@ -1,9 +1,9 @@
1
+ import { merge } from 'lodash-es';
1
2
  import Router from 'next/router';
2
3
  import { StateCreator } from 'zustand/vanilla';
3
4
 
4
- import { SessionStore } from '@/store/session';
5
- import { LanguageModel } from '@/types/llm';
6
- import { LobeAgentSession, LobeSessionType } from '@/types/session';
5
+ import { SessionStore, initLobeSession } from '@/store/session';
6
+ import { LobeAgentSession } from '@/types/session';
7
7
  import { uuid } from '@/utils/uuid';
8
8
 
9
9
  import { SessionDispatch, sessionsReducer } from './reducers/session';
@@ -58,21 +58,12 @@ export const createSessionSlice: StateCreator<
58
58
 
59
59
  const timestamp = Date.now();
60
60
 
61
- const newSession: LobeAgentSession = {
62
- chats: {},
63
- config: {
64
- model: LanguageModel.GPT3_5,
65
- params: {
66
- temperature: 0.6,
67
- },
68
- systemRole: '',
69
- },
61
+ // TODO: 等 settings 里的 defaultAgent 都改好以后,做个合并即可
62
+ const newSession: LobeAgentSession = merge({}, initLobeSession, {
70
63
  createAt: timestamp,
71
64
  id: uuid(),
72
- meta: {},
73
- type: LobeSessionType.Agent,
74
65
  updateAt: timestamp,
75
- };
66
+ });
76
67
 
77
68
  dispatchSession({ session: newSession, type: 'addSession' });
78
69
 
@@ -16,8 +16,4 @@ export default () => css`
16
16
  p {
17
17
  margin-bottom: 0;
18
18
  }
19
-
20
- li {
21
- display: block;
22
- }
23
19
  `;