@lobehub/chat 0.119.7 โ 0.119.9
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/.github/ISSUE_TEMPLATE/1_bug_report.yml +22 -9
- package/.github/ISSUE_TEMPLATE/1_bug_report_cn.yml +59 -0
- package/.github/ISSUE_TEMPLATE/2_feature_request.yml +6 -6
- package/.github/ISSUE_TEMPLATE/2_feature_request_cn.yml +21 -0
- package/.github/ISSUE_TEMPLATE/config.yml +4 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +1 -0
- package/CHANGELOG.md +50 -0
- package/docs/Deployment/Common-Error.md +70 -0
- package/docs/Deployment/Common-Error.zh-CN.md +69 -0
- package/docs/Home.md +2 -1
- package/docs/_Sidebar.md +2 -1
- package/package.json +3 -3
- package/src/features/Conversation/index.tsx +2 -2
- package/src/layout/GlobalLayout/Locale.tsx +2 -8
- package/src/store/chat/slices/message/action.ts +13 -1
- package/src/store/tool/slices/store/action.test.ts +4 -6
- package/.github/ISSUE_TEMPLATE/3_question.yml +0 -15
- package/.github/ISSUE_TEMPLATE/4_other.md +0 -7
- package/src/layout/GlobalLayout/LocaleLoading.tsx +0 -21
|
@@ -1,22 +1,35 @@
|
|
|
1
|
-
name: '๐
|
|
2
|
-
description: '
|
|
1
|
+
name: '๐ Bug Report'
|
|
2
|
+
description: 'Report an bug'
|
|
3
3
|
title: '[Bug] '
|
|
4
|
-
labels: '๐ Bug'
|
|
4
|
+
labels: ['๐ Bug']
|
|
5
5
|
body:
|
|
6
6
|
- type: dropdown
|
|
7
7
|
attributes:
|
|
8
|
-
label: '๐ป
|
|
8
|
+
label: '๐ป Operating System'
|
|
9
9
|
options:
|
|
10
10
|
- Windows
|
|
11
11
|
- macOS
|
|
12
12
|
- Ubuntu
|
|
13
13
|
- Other Linux
|
|
14
|
+
- iOS
|
|
15
|
+
- Android
|
|
14
16
|
- Other
|
|
15
17
|
validations:
|
|
16
18
|
required: true
|
|
17
19
|
- type: dropdown
|
|
18
20
|
attributes:
|
|
19
|
-
label: '
|
|
21
|
+
label: '๐ฆ Environment'
|
|
22
|
+
options:
|
|
23
|
+
- Official Preview
|
|
24
|
+
- Vercel / Zeabur / Sealos
|
|
25
|
+
- Docker
|
|
26
|
+
- Other
|
|
27
|
+
validations:
|
|
28
|
+
required: true
|
|
29
|
+
|
|
30
|
+
- type: dropdown
|
|
31
|
+
attributes:
|
|
32
|
+
label: '๐ Browser'
|
|
20
33
|
options:
|
|
21
34
|
- Chrome
|
|
22
35
|
- Edge
|
|
@@ -27,19 +40,19 @@ body:
|
|
|
27
40
|
required: true
|
|
28
41
|
- type: textarea
|
|
29
42
|
attributes:
|
|
30
|
-
label: '๐
|
|
43
|
+
label: '๐ Bug Description'
|
|
31
44
|
description: A clear and concise description of the bug.
|
|
32
45
|
validations:
|
|
33
46
|
required: true
|
|
34
47
|
- type: textarea
|
|
35
48
|
attributes:
|
|
36
|
-
label: '๐ฆ
|
|
49
|
+
label: '๐ฆ Expected Behavior'
|
|
37
50
|
description: A clear and concise description of what you expected to happen.
|
|
38
51
|
- type: textarea
|
|
39
52
|
attributes:
|
|
40
|
-
label: '๐ท
|
|
53
|
+
label: '๐ท Recurrence Steps'
|
|
41
54
|
description: A clear and concise description of how to recurrence.
|
|
42
55
|
- type: textarea
|
|
43
56
|
attributes:
|
|
44
|
-
label: '๐
|
|
57
|
+
label: '๐ Additional Information'
|
|
45
58
|
description: If your problem needs further explanation, or if the issue you're seeing cannot be reproduced in a gist, please add more information here.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: '๐ ๅ้ฆ็ผบ้ท'
|
|
2
|
+
description: 'ๅ้ฆไธไธช้ฎ้ข็ผบ้ท'
|
|
3
|
+
title: '[Bug] '
|
|
4
|
+
labels: ['๐ Bug']
|
|
5
|
+
body:
|
|
6
|
+
- type: dropdown
|
|
7
|
+
attributes:
|
|
8
|
+
label: '๐ป ็ณป็ป็ฏๅข'
|
|
9
|
+
options:
|
|
10
|
+
- Windows
|
|
11
|
+
- macOS
|
|
12
|
+
- Ubuntu
|
|
13
|
+
- Other Linux
|
|
14
|
+
- iOS
|
|
15
|
+
- Android
|
|
16
|
+
- Other
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: dropdown
|
|
21
|
+
attributes:
|
|
22
|
+
label: '๐ฆ ้จ็ฝฒ็ฏๅข'
|
|
23
|
+
options:
|
|
24
|
+
- Official Preview
|
|
25
|
+
- Vercel / Zeabur / Sealos
|
|
26
|
+
- Docker
|
|
27
|
+
- Other
|
|
28
|
+
validations:
|
|
29
|
+
required: true
|
|
30
|
+
|
|
31
|
+
- type: dropdown
|
|
32
|
+
attributes:
|
|
33
|
+
label: '๐ ๆต่งๅจ'
|
|
34
|
+
options:
|
|
35
|
+
- Chrome
|
|
36
|
+
- Edge
|
|
37
|
+
- Safari
|
|
38
|
+
- Firefox
|
|
39
|
+
- Other
|
|
40
|
+
validations:
|
|
41
|
+
required: true
|
|
42
|
+
- type: textarea
|
|
43
|
+
attributes:
|
|
44
|
+
label: '๐ ้ฎ้ขๆ่ฟฐ'
|
|
45
|
+
description: ่ฏทๆไพไธไธชๆธ
ๆฐไธ็ฎๆด็้ฎ้ขๆ่ฟฐใ
|
|
46
|
+
validations:
|
|
47
|
+
required: true
|
|
48
|
+
- type: textarea
|
|
49
|
+
attributes:
|
|
50
|
+
label: '๐ฆ ๆๆ็ปๆ'
|
|
51
|
+
description: ่ฏทๆไพไธไธชๆธ
ๆฐไธ็ฎๆด็ๆ่ฟฐ๏ผ่ฏดๆๆจๆๆๅ็ไปไนใ
|
|
52
|
+
- type: textarea
|
|
53
|
+
attributes:
|
|
54
|
+
label: '๐ท ๅค็ฐๆญฅ้ชค'
|
|
55
|
+
description: ่ฏทๆไพไธไธชๆธ
ๆฐไธ็ฎๆด็ๆ่ฟฐ๏ผ่ฏดๆๅฆไฝๅค็ฐ้ฎ้ขใ
|
|
56
|
+
- type: textarea
|
|
57
|
+
attributes:
|
|
58
|
+
label: '๐ ่กฅๅ
ไฟกๆฏ'
|
|
59
|
+
description: ๅฆๆๆจ็้ฎ้ข้่ฆ่ฟไธๆญฅ่ฏดๆ๏ผๆ่
ๆจ้ๅฐ็้ฎ้ขๆ ๆณๅจไธไธช็ฎๅ็็คบไพไธญๅค็ฐ๏ผ่ฏทๅจ่ฟ้ๆทปๅ ๆดๅคไฟกๆฏใ
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
name: '๐
|
|
2
|
-
description: '
|
|
1
|
+
name: '๐ Feature Request'
|
|
2
|
+
description: 'Suggest an idea'
|
|
3
3
|
title: '[Request] '
|
|
4
|
-
labels: '๐ Feature Request'
|
|
4
|
+
labels: ['๐ Feature Request']
|
|
5
5
|
body:
|
|
6
6
|
- type: textarea
|
|
7
7
|
attributes:
|
|
8
|
-
label: '๐ฅฐ
|
|
8
|
+
label: '๐ฅฐ Feature Description'
|
|
9
9
|
description: Please add a clear and concise description of the problem you are seeking to solve with this feature request.
|
|
10
10
|
validations:
|
|
11
11
|
required: true
|
|
12
12
|
- type: textarea
|
|
13
13
|
attributes:
|
|
14
|
-
label: '๐ง
|
|
14
|
+
label: '๐ง Proposed Solution'
|
|
15
15
|
description: Describe the solution you'd like in a clear and concise manner.
|
|
16
16
|
validations:
|
|
17
17
|
required: true
|
|
18
18
|
- type: textarea
|
|
19
19
|
attributes:
|
|
20
|
-
label: '๐
|
|
20
|
+
label: '๐ Additional Information'
|
|
21
21
|
description: Add any other context about the problem here.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: '๐ ๅ่ฝ้ๆฑ'
|
|
2
|
+
description: 'ๆๅบ้ๆฑๆๅปบ่ฎฎ'
|
|
3
|
+
title: '[Request] '
|
|
4
|
+
labels: ['๐ ๅ่ฝ้ๆฑ']
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
attributes:
|
|
8
|
+
label: '๐ฅฐ ้ๆฑๆ่ฟฐ'
|
|
9
|
+
description: ่ฏทๆทปๅ ไธไธชๆธ
ๆฐไธ็ฎๆด็้ฎ้ขๆ่ฟฐ๏ผ้่ฟฐๆจๅธๆ้่ฟ่ฟไธชๅ่ฝ้ๆฑ่งฃๅณ็้ฎ้ขใ
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
attributes:
|
|
14
|
+
label: '๐ง ่งฃๅณๆนๆก'
|
|
15
|
+
description: ่ฏทๆธ
ๆฐไธ็ฎๆดๅฐๆ่ฟฐๆจๆณ่ฆ็่งฃๅณๆนๆกใ
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
attributes:
|
|
20
|
+
label: '๐ ่กฅๅ
ไฟกๆฏ'
|
|
21
|
+
description: ๅจ่ฟ้ๆทปๅ ๅ
ณไบ้ฎ้ข็ไปปไฝๅ
ถไป่ๆฏไฟกๆฏใ
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.119.9](https://github.com/lobehub/lobe-chat/compare/v0.119.8...v0.119.9)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-01-08**</sup>
|
|
8
|
+
|
|
9
|
+
#### ๐ Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix ChatInput fullscreen display not correct.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix ChatInput fullscreen display not correct, closes [#982](https://github.com/lobehub/lobe-chat/issues/982) ([e4012c4](https://github.com/lobehub/lobe-chat/commit/e4012c4))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.119.8](https://github.com/lobehub/lobe-chat/compare/v0.119.7...v0.119.8)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-01-07**</sup>
|
|
33
|
+
|
|
34
|
+
#### ๐ Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Fix spotting tool call correctly.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: Fix spotting tool call correctly, closes [#972](https://github.com/lobehub/lobe-chat/issues/972) ([216e700](https://github.com/lobehub/lobe-chat/commit/216e700))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.119.7](https://github.com/lobehub/lobe-chat/compare/v0.119.6...v0.119.7)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-01-07**</sup>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Frequently Asked Questions
|
|
2
|
+
|
|
3
|
+
## When using a proxy(e.g. Surge), I encounter the `UNABLE_TO_VERIFY_LEAF_SIGNATURE` error
|
|
4
|
+
|
|
5
|
+
### Problem Description
|
|
6
|
+
|
|
7
|
+
When making network requests during private deployment, certificate validation errors may occur. The error messages may be as follows:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
[TypeError: fetch failed] {
|
|
11
|
+
cause: [Error: unable to verify the first certificate] {
|
|
12
|
+
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
{
|
|
21
|
+
"endpoint": "https://api.openai.com/v1",
|
|
22
|
+
"error": {
|
|
23
|
+
"cause": {
|
|
24
|
+
"code": "UNABLE_TO_VERIFY_LEAF_SIGNATURE"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This problem typically occurs when using a proxy server with a self-signed certificate or a man-in-the-middle certificate that is not trusted by Node.js by default.
|
|
31
|
+
|
|
32
|
+
### Solution
|
|
33
|
+
|
|
34
|
+
To resolve this issue, you can add an environment variable to bypass Node.js certificate validation when starting the application. The specific approach is to include `NODE_TLS_REJECT_UNAUTHORIZED=0` in the startup command. For example:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
NODE_TLS_REJECT_UNAUTHORIZED=0 npm run start
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Alternatively, when running in a Docker container, you can set the environment variable in the Dockerfile or docker-compose.yml:
|
|
41
|
+
|
|
42
|
+
```dockerfile
|
|
43
|
+
# In the Dockerfile
|
|
44
|
+
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
# In the docker-compose.yml
|
|
49
|
+
environment:
|
|
50
|
+
- NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Example Docker run command:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
docker run -e NODE_TLS_REJECT_UNAUTHORIZED=0 <other parameters> <image name>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Please note that this method reduces security because it allows Node.js to accept unverified certificates. Therefore, it is only recommended for use in private deployments with fully trusted network environments, and the default certificate validation settings should be restored after resolving the certificate issue.
|
|
60
|
+
|
|
61
|
+
### More Secure Alternatives
|
|
62
|
+
|
|
63
|
+
If possible, it is recommended to address certificate issues using the following methods:
|
|
64
|
+
|
|
65
|
+
1. Ensure that all man-in-the-middle certificates are correctly installed on the proxy server and the corresponding clients.
|
|
66
|
+
2. Replace self-signed or man-in-the-middle certificates with valid certificates issued by trusted certificate authorities.
|
|
67
|
+
3. Properly configure the certificate chain in the code to ensure that Node.js can validate to the root certificate.
|
|
68
|
+
|
|
69
|
+
Implementing these methods can resolve certificate validation issues without sacrificing security.
|
|
70
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# ๅธธ่ง้ฎ้ข
|
|
2
|
+
|
|
3
|
+
## ไฝฟ็จไปฃ็ไธญ่ฝฌ่ฏทๆฑๆถ๏ผไพๅฆ๏ผSurge๏ผ๏ผๆฅ `UNABLE_TO_VERIFY_LEAF_SIGNATURE` ้่ฏฏ
|
|
4
|
+
|
|
5
|
+
### ้ฎ้ขๆ่ฟฐ
|
|
6
|
+
|
|
7
|
+
ๅจ็งๆๅ้จ็ฝฒๆถ๏ผ่ฟ่ก็ฝ็ป่ฏทๆฑๅฏ่ฝไผ้ๅฐ่ฏไนฆ้ช่ฏ้่ฏฏใ้่ฏฏไฟกๆฏๅฏ่ฝๅฆไธ๏ผ
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
[TypeError: fetch failed] {
|
|
11
|
+
cause: [Error: unable to verify the first certificate] {
|
|
12
|
+
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
ๆ่
ๆฏ๏ผ
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
{
|
|
21
|
+
"endpoint": "https://api.openai.com/v1",
|
|
22
|
+
"error": {
|
|
23
|
+
"cause": {
|
|
24
|
+
"code": "UNABLE_TO_VERIFY_LEAF_SIGNATURE"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
่ฟไธช้ฎ้ข้ๅธธๅบ็ฐๅจไฝฟ็จไปฃ็ๆๅกๅจๆถ๏ผไปฃ็ๆๅกๅจไฝฟ็จ็่ช็ญพๅ่ฏไนฆๆไธญ้ดไบบ่ฏไนฆไธ่ขซ Node.js ้ป่ฎคไฟกไปปใ
|
|
31
|
+
|
|
32
|
+
### ่งฃๅณๆนๆก
|
|
33
|
+
|
|
34
|
+
่ฆ่งฃๅณ่ฟไธช้ฎ้ข๏ผๅฏไปฅๅจๅฏๅจๅบ็จๆถๆทปๅ ็ฏๅขๅ้๏ผ่ทณ่ฟ Node.js ็่ฏไนฆ้ช่ฏใๅ
ทไฝๅๆณๆฏๅจๅฏๅจๅฝไปคไธญๅ ๅ
ฅ `NODE_TLS_REJECT_UNAUTHORIZED=0`ใไพๅฆ๏ผ
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
NODE_TLS_REJECT_UNAUTHORIZED=0 npm run start
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
ๆ่
ๅจ Docker ๅฎนๅจไธญ่ฟ่กๆถ๏ผๅฏไปฅๅจ Dockerfile ๆ่
docker-compose.yml ไธญ่ฎพ็ฝฎ็ฏๅขๅ้๏ผ
|
|
41
|
+
|
|
42
|
+
```dockerfile
|
|
43
|
+
# ๅจ Dockerfile ไธญ
|
|
44
|
+
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
# ๅจ docker-compose.yml ไธญ
|
|
49
|
+
environment:
|
|
50
|
+
- NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Docker ่ฟ่กๅฝไปค็คบไพ๏ผ
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
docker run -e NODE_TLS_REJECT_UNAUTHORIZED=0 <ๅ
ถไปๅๆฐ> <้ๅๅ>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
่ฏทๆณจๆ๏ผ่ฟ็งๆนๆณไผ้ไฝๅฎๅ
จๆง๏ผๅ ไธบๅฎๅ
่ฎธ Node.js ๆฅๅๆช็ป้ช่ฏ็่ฏไนฆใๅ ๆญค๏ผไป
ๅปบ่ฎฎๅจๅฎๅ
จไฟกไปป็ฝ็ป็ฏๅข็็งๆๅ้จ็ฝฒไธญไฝฟ็จ๏ผไธ้่ฆๅจ่งฃๅณ่ฏไนฆ้ฎ้ขๅๆขๅค้ป่ฎค็่ฏไนฆ้ช่ฏ่ฎพ็ฝฎใ
|
|
60
|
+
|
|
61
|
+
### ๆดๅฎๅ
จ็ๆฟไปฃๆนๆก
|
|
62
|
+
|
|
63
|
+
ๅฆๆๅฏ่ฝ๏ผๅปบ่ฎฎ้่ฟไปฅไธๆนๆณ่งฃๅณ่ฏไนฆ้ฎ้ข๏ผ
|
|
64
|
+
|
|
65
|
+
1. ็กฎไฟๆๆ็ไธญ้ดไบบ่ฏไนฆ้ฝ่ขซๆญฃ็กฎๅฐๅฎ่ฃ
ๅจไปฃ็ๆๅกๅจๅ็ธๅบ็ๅฎขๆท็ซฏไธใ
|
|
66
|
+
2. ไฝฟ็จๆๆ็ใ็ฑๅไฟกไปป็่ฏไนฆ้ขๅๆบๆ็ญพๅ็่ฏไนฆๆฟๆข่ช็ญพๅๆไธญ้ดไบบ่ฏไนฆใ
|
|
67
|
+
3. ๅจไปฃ็ ไธญๆญฃ็กฎ้
็ฝฎ่ฏไนฆ้พ๏ผ็กฎไฟ Node.js ๅฏไปฅ้ช่ฏๅฐๆ น่ฏไนฆใ
|
|
68
|
+
|
|
69
|
+
้็จ่ฟไบๆนๆณๅฏไปฅๅจไธ็บ็ฒๅฎๅ
จๆง็ๅๆไธ่งฃๅณ่ฏไนฆ้ช่ฏ้ฎ้ขใ
|
package/docs/Home.md
CHANGED
|
@@ -25,10 +25,11 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform
|
|
|
25
25
|
|
|
26
26
|
### ๐ณ Self-Hosting
|
|
27
27
|
|
|
28
|
-
- [Environment Variables](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable) | [็ฏๅขๅ้](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable.zh-CN)
|
|
29
28
|
- [Docker Deployment Guide](https://github.com/lobehub/lobe-chat/wiki/Docker-Deployment) | [Docker ้จ็ฝฒๆๅผ](https://github.com/lobehub/lobe-chat/wiki/Docker-Deployment.zh-CN)
|
|
30
29
|
- [Deploying with Azure OpenAI](https://github.com/lobehub/lobe-chat/wiki/Deploy-with-Azure-OpenAI) | [ไฝฟ็จ Azure OpenAI ้จ็ฝฒ](https://github.com/lobehub/lobe-chat/wiki/Deploy-with-Azure-OpenAI.zh-CN)
|
|
30
|
+
- [Environment Variables](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable) | [็ฏๅขๅ้](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable.zh-CN)
|
|
31
31
|
- [Upstream Sync](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync) | [่ช้จ็ฝฒไฟๆๆดๆฐ](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN)
|
|
32
|
+
- [Common Error](https://github.com/lobehub/lobe-chat/wiki/Common-Error) | [ๅธธ่ง้ฎ้ข](https://github.com/lobehub/lobe-chat/wiki/Common-Error.zh-CN)
|
|
32
33
|
- [Data Statistics](https://github.com/lobehub/lobe-chat/wiki/Analytics) | [ๆฐๆฎ็ป่ฎก](https://github.com/lobehub/lobe-chat/wiki/Analytics.zh-CN)
|
|
33
34
|
|
|
34
35
|
<br/>
|
package/docs/_Sidebar.md
CHANGED
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
|
|
16
16
|
#### ๐ณ Self-Hosting
|
|
17
17
|
|
|
18
|
-
- [Environment Variables](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable) | [ไธญๆ](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable.zh-CN)
|
|
19
18
|
- [Docker Deployment Guide](https://github.com/lobehub/lobe-chat/wiki/Docker-Deployment) | [Docker ้จ็ฝฒๆๅผ](https://github.com/lobehub/lobe-chat/wiki/Docker-Deployment.zh-CN)
|
|
20
19
|
- [Deploying with Azure OpenAI](https://github.com/lobehub/lobe-chat/wiki/Deploy-with-Azure-OpenAI) | [ไฝฟ็จ Azure OpenAI ้จ็ฝฒ](https://github.com/lobehub/lobe-chat/wiki/Deploy-with-Azure-OpenAI.zh-CN)
|
|
20
|
+
- [Environment Variables](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable) | [็ฏๅขๅ้](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable.zh-CN)
|
|
21
21
|
- [Upstream Sync](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync) | [่ช้จ็ฝฒไฟๆๆดๆฐ](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN)
|
|
22
|
+
- [Common Error](https://github.com/lobehub/lobe-chat/wiki/Common-Error) | [ๅธธ่ง้ฎ้ข](https://github.com/lobehub/lobe-chat/wiki/Common-Error.zh-CN)
|
|
22
23
|
- [Data Statistics](https://github.com/lobehub/lobe-chat/wiki/Analytics) | [ๆฐๆฎ็ป่ฎก](https://github.com/lobehub/lobe-chat/wiki/Analytics.zh-CN)
|
|
23
24
|
|
|
24
25
|
#### โจ๏ธ Development
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.119.
|
|
3
|
+
"version": "0.119.9",
|
|
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",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"@types/ua-parser-js": "^0.7",
|
|
154
154
|
"@types/uuid": "^9",
|
|
155
155
|
"@umijs/lint": "^4",
|
|
156
|
-
"@vitest/coverage-v8": "1.1.
|
|
156
|
+
"@vitest/coverage-v8": "^1.1.3",
|
|
157
157
|
"commitlint": "^18",
|
|
158
158
|
"consola": "^3",
|
|
159
159
|
"dpdm": "^3",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"typescript": "^5",
|
|
178
178
|
"unified": "^11",
|
|
179
179
|
"unist-util-visit": "^5",
|
|
180
|
-
"vitest": "1.1.
|
|
180
|
+
"vitest": "^1.1.3",
|
|
181
181
|
"vitest-canvas-mock": "^0.3.3"
|
|
182
182
|
},
|
|
183
183
|
"publishConfig": {
|
|
@@ -47,11 +47,11 @@ const Conversation = memo<ConversationProps>(({ chatInput, mobile }) => {
|
|
|
47
47
|
const fontSize = useGlobalStore((s) => settingsSelectors.currentSettings(s).fontSize);
|
|
48
48
|
const { styles } = useStyles(fontSize);
|
|
49
49
|
|
|
50
|
-
// init conversation
|
|
51
50
|
const init = useInitConversation();
|
|
52
51
|
|
|
53
52
|
return (
|
|
54
|
-
|
|
53
|
+
// relative is required, ChatInput's absolute position needs it
|
|
54
|
+
<Flexbox flex={1} style={{ position: 'relative' }}>
|
|
55
55
|
<div className={styles}>
|
|
56
56
|
{init ? <ChatList mobile={mobile} /> : <SkeletonList mobile={mobile} />}
|
|
57
57
|
</div>
|
|
@@ -11,7 +11,7 @@ interface LocaleLayoutProps extends PropsWithChildren {
|
|
|
11
11
|
lang?: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const Locale = memo<LocaleLayoutProps>(({ children, lang }) => {
|
|
15
15
|
const { data: locale } = useSWR(
|
|
16
16
|
lang,
|
|
17
17
|
async () =>
|
|
@@ -41,10 +41,4 @@ const InnerLocale = memo<LocaleLayoutProps>(({ children, lang }) => {
|
|
|
41
41
|
return <ConfigProvider locale={locale}>{children}</ConfigProvider>;
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
// <Suspense fallback={<Loading />}>
|
|
46
|
-
// <InnerLocale {...props} />
|
|
47
|
-
// </Suspense>
|
|
48
|
-
// ));
|
|
49
|
-
|
|
50
|
-
export default InnerLocale;
|
|
44
|
+
export default Locale;
|
|
@@ -303,7 +303,13 @@ export const chatMessage: StateCreator<
|
|
|
303
303
|
set({ messages }, false, n(`dispatchMessage/${payload.type}`, payload));
|
|
304
304
|
},
|
|
305
305
|
fetchAIChatMessage: async (messages, assistantId) => {
|
|
306
|
-
const {
|
|
306
|
+
const {
|
|
307
|
+
toggleChatLoading,
|
|
308
|
+
refreshMessages,
|
|
309
|
+
updateMessageContent,
|
|
310
|
+
dispatchMessage,
|
|
311
|
+
createSmoothMessage,
|
|
312
|
+
} = get();
|
|
307
313
|
|
|
308
314
|
const abortController = toggleChatLoading(
|
|
309
315
|
true,
|
|
@@ -403,6 +409,12 @@ export const chatMessage: StateCreator<
|
|
|
403
409
|
// is this message is just a function call
|
|
404
410
|
if (isFunctionMessageAtStart(output)) {
|
|
405
411
|
stopAnimation();
|
|
412
|
+
dispatchMessage({
|
|
413
|
+
id: assistantId,
|
|
414
|
+
key: 'content',
|
|
415
|
+
type: 'updateMessage',
|
|
416
|
+
value: output,
|
|
417
|
+
});
|
|
406
418
|
isFunctionCall = true;
|
|
407
419
|
}
|
|
408
420
|
|
|
@@ -19,12 +19,6 @@ vi.mock('@/services/plugin', () => ({
|
|
|
19
19
|
},
|
|
20
20
|
}));
|
|
21
21
|
|
|
22
|
-
// Mock necessary modules and functions
|
|
23
|
-
vi.mock('antd', () => ({
|
|
24
|
-
notification: {
|
|
25
|
-
error: vi.fn(),
|
|
26
|
-
},
|
|
27
|
-
}));
|
|
28
22
|
// Mock i18next
|
|
29
23
|
vi.mock('i18next', () => ({
|
|
30
24
|
t: vi.fn((key) => key),
|
|
@@ -179,6 +173,8 @@ describe('useToolStore:pluginStore', () => {
|
|
|
179
173
|
|
|
180
174
|
describe('installPlugin', () => {
|
|
181
175
|
it('should install a plugin with valid manifest', async () => {
|
|
176
|
+
vi.spyOn(notification, 'error');
|
|
177
|
+
|
|
182
178
|
const pluginIdentifier = 'plugin1';
|
|
183
179
|
|
|
184
180
|
const originalUpdateInstallLoadingState = useToolStore.getState().updateInstallLoadingState;
|
|
@@ -253,6 +249,8 @@ describe('useToolStore:pluginStore', () => {
|
|
|
253
249
|
|
|
254
250
|
const error = new TypeError('noManifest');
|
|
255
251
|
|
|
252
|
+
// Mock necessary modules and functions
|
|
253
|
+
vi.spyOn(notification, 'error');
|
|
256
254
|
(pluginService.getPluginManifest as Mock).mockRejectedValue(error);
|
|
257
255
|
|
|
258
256
|
useToolStore.setState({
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
name: '๐ ็้ฎๆๅธฎๅฉ Help Wanted'
|
|
2
|
-
description: '็้ฎๆ้่ฆๅธฎๅฉ | Need help'
|
|
3
|
-
title: '[Question] '
|
|
4
|
-
labels: '๐ Help Wanted'
|
|
5
|
-
body:
|
|
6
|
-
- type: textarea
|
|
7
|
-
attributes:
|
|
8
|
-
label: '๐ง ้ฎ้ขๆ่ฟฐ | Proposed Solution'
|
|
9
|
-
description: A clear and concise description of the proplem.
|
|
10
|
-
validations:
|
|
11
|
-
required: true
|
|
12
|
-
- type: textarea
|
|
13
|
-
attributes:
|
|
14
|
-
label: '๐ ่กฅๅ
ไฟกๆฏ | Additional Information'
|
|
15
|
-
description: Add any other context about the problem here.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Icon } from '@lobehub/ui';
|
|
2
|
-
import { Loader2 } from 'lucide-react';
|
|
3
|
-
import { memo } from 'react';
|
|
4
|
-
import { Center } from 'react-layout-kit';
|
|
5
|
-
|
|
6
|
-
const Loading = memo(() => (
|
|
7
|
-
<div
|
|
8
|
-
style={{
|
|
9
|
-
backdropFilter: 'blur(3px)',
|
|
10
|
-
height: '100%',
|
|
11
|
-
width: '100vw',
|
|
12
|
-
zIndex: 100,
|
|
13
|
-
}}
|
|
14
|
-
>
|
|
15
|
-
<Center flex={1} gap={12} width={'100%'}>
|
|
16
|
-
<Icon icon={Loader2} spin />
|
|
17
|
-
</Center>
|
|
18
|
-
</div>
|
|
19
|
-
));
|
|
20
|
-
|
|
21
|
-
export default Loading;
|