@lobehub/chat 1.77.14 → 1.77.15

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 1.77.15](https://github.com/lobehub/lobe-chat/compare/v1.77.14...v1.77.15)
6
+
7
+ <sup>Released on **2025-04-06**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **misc**: Improve public procedure implement.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Code refactoring
19
+
20
+ - **misc**: Improve public procedure implement, closes [#7314](https://github.com/lobehub/lobe-chat/issues/7314) ([1b28230](https://github.com/lobehub/lobe-chat/commit/1b28230))
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 1.77.14](https://github.com/lobehub/lobe-chat/compare/v1.77.13...v1.77.14)
6
31
 
7
32
  <sup>Released on **2025-04-06**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Improve public procedure implement."
6
+ ]
7
+ },
8
+ "date": "2025-04-06",
9
+ "version": "1.77.15"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "improvements": [
@@ -319,8 +319,8 @@ This section mainly introduces the configurations that need to be modified to cu
319
319
 
320
320
  ```sh
321
321
  curl -O https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/docker-compose.yml
322
- curl -O https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/.env.en_US.example
323
- mv .env.en_US.example .env
322
+ curl -O https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/.env.example
323
+ mv .env.example .env
324
324
  ```
325
325
 
326
326
  <Callout type="info">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.77.14",
3
+ "version": "1.77.15",
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",
@@ -7,6 +7,8 @@
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';
10
12
 
11
13
  import { trpc } from './init';
12
14
  import { jwtPayloadChecker } from './middleware/jwtPayload';
@@ -22,7 +24,11 @@ export const router = trpc.router;
22
24
  * Create an unprotected procedure
23
25
  * @link https://trpc.io/docs/v11/procedures
24
26
  **/
25
- export const publicProcedure = trpc.procedure;
27
+ export const publicProcedure = trpc.procedure.use(({ next, ctx }) => {
28
+ return next({
29
+ ctx: { userId: isDesktop ? DESKTOP_USER_ID : ctx.userId },
30
+ });
31
+ });
26
32
 
27
33
  // procedure that asserts that the user is logged in
28
34
  export const authedProcedure = trpc.procedure.use(userAuth);