@lobehub/chat 1.77.12 → 1.77.14

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 1.77.14](https://github.com/lobehub/lobe-chat/compare/v1.77.13...v1.77.14)
6
+
7
+ <sup>Released on **2025-04-06**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Add `ernie-x1-32k-preview` support for Wenxin.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Add `ernie-x1-32k-preview` support for Wenxin, closes [#7302](https://github.com/lobehub/lobe-chat/issues/7302) ([8e8337c](https://github.com/lobehub/lobe-chat/commit/8e8337c))
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 1.77.13](https://github.com/lobehub/lobe-chat/compare/v1.77.12...v1.77.13)
31
+
32
+ <sup>Released on **2025-04-06**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Fix data not show correctly in 1.77.11.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Fix data not show correctly in 1.77.11, closes [#7311](https://github.com/lobehub/lobe-chat/issues/7311) ([d99ca04](https://github.com/lobehub/lobe-chat/commit/d99ca04))
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 1.77.12](https://github.com/lobehub/lobe-chat/compare/v1.77.11...v1.77.12)
6
56
 
7
57
  <sup>Released on **2025-04-06**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Add ernie-x1-32k-preview support for Wenxin."
6
+ ]
7
+ },
8
+ "date": "2025-04-06",
9
+ "version": "1.77.14"
10
+ },
11
+ {
12
+ "children": {
13
+ "fixes": [
14
+ "Fix data not show correctly in 1.77.11."
15
+ ]
16
+ },
17
+ "date": "2025-04-06",
18
+ "version": "1.77.13"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.77.12",
3
+ "version": "1.77.14",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -185,7 +185,7 @@
185
185
  "langfuse": "3.29.1",
186
186
  "langfuse-core": "3.29.1",
187
187
  "lodash-es": "^4.17.21",
188
- "lucide-react": "^0.485.0",
188
+ "lucide-react": "^0.487.0",
189
189
  "mammoth": "^1.9.0",
190
190
  "mdast-util-to-markdown": "^2.1.2",
191
191
  "modern-screenshot": "^4.6.0",
@@ -1,11 +1,9 @@
1
1
  import { AIChatModelCard } from '@/types/aiModel';
2
2
 
3
3
  const wenxinChatModels: AIChatModelCard[] = [
4
- /*
5
4
  {
6
5
  abilities: {
7
- resoning: true,
8
- search: true,
6
+ reasoning: true,
9
7
  },
10
8
  contextWindowTokens: 32_768,
11
9
  description:
@@ -19,12 +17,8 @@ const wenxinChatModels: AIChatModelCard[] = [
19
17
  output: 8,
20
18
  },
21
19
  releasedAt: '2025-03-16',
22
- settings: {
23
- searchImpl: 'params',
24
- },
25
20
  type: 'chat',
26
21
  },
27
- */
28
22
  {
29
23
  abilities: {
30
24
  search: true,
@@ -7,8 +7,6 @@
7
7
  * @link https://trpc.io/docs/v11/router
8
8
  * @link https://trpc.io/docs/v11/procedures
9
9
  */
10
- import { DESKTOP_USER_ID } from '@/const/desktop';
11
- import { isDesktop } from '@/const/version';
12
10
 
13
11
  import { trpc } from './init';
14
12
  import { jwtPayloadChecker } from './middleware/jwtPayload';
@@ -24,11 +22,7 @@ export const router = trpc.router;
24
22
  * Create an unprotected procedure
25
23
  * @link https://trpc.io/docs/v11/procedures
26
24
  **/
27
- export const publicProcedure = trpc.procedure.use(({ next }) => {
28
- return next({
29
- ctx: { userId: isDesktop ? DESKTOP_USER_ID : null },
30
- });
31
- });
25
+ export const publicProcedure = trpc.procedure;
32
26
 
33
27
  // procedure that asserts that the user is logged in
34
28
  export const authedProcedure = trpc.procedure.use(userAuth);
@@ -0,0 +1,44 @@
1
+ import { describe, expect, it } from 'vitest';
2
+
3
+ import { INBOX_SESSION_ID } from '@/const/session';
4
+
5
+ import { ServerService } from '../server';
6
+
7
+ describe('ServerService', () => {
8
+ describe('toDbSessionId', () => {
9
+ const service = new ServerService();
10
+ // @ts-ignore access private method for testing
11
+ const toDbSessionId = service.toDbSessionId;
12
+
13
+ it('should return null for INBOX_SESSION_ID', () => {
14
+ expect(toDbSessionId(INBOX_SESSION_ID)).toBeNull();
15
+ });
16
+
17
+ it('should return the same session id for non-inbox sessions', () => {
18
+ const sessionId = 'test-session-123';
19
+ expect(toDbSessionId(sessionId)).toBe(sessionId);
20
+ });
21
+
22
+ it('should handle undefined input', () => {
23
+ expect(toDbSessionId(undefined)).toBeUndefined(); // Updated to match the actual behavior
24
+ });
25
+
26
+ it('should handle empty string input', () => {
27
+ expect(toDbSessionId('')).toBe(''); // No changes needed
28
+ });
29
+
30
+ it('should handle special characters in session id', () => {
31
+ const specialSessionId = '!@#$%^&*()_+';
32
+ expect(toDbSessionId(specialSessionId)).toBe(specialSessionId);
33
+ });
34
+
35
+ it('should handle numeric session id', () => {
36
+ const numericSessionId = '12345';
37
+ expect(toDbSessionId(numericSessionId)).toBe(numericSessionId);
38
+ });
39
+
40
+ it('should handle null session id', () => {
41
+ expect(toDbSessionId(null as any)).toBeNull(); // Cast null to any to bypass type errors
42
+ });
43
+ });
44
+ });