@lobehub/chat 0.96.5 → 0.96.6
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 +25 -0
- package/package.json +1 -1
- package/src/components/Analytics/Plausible.tsx +10 -7
- package/src/config/client.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.96.6](https://github.com/lobehub/lobe-chat/compare/v0.96.5...v0.96.6)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-10-30**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Improve plausible analytics ENV.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Improve plausible analytics ENV ([aa851d4](https://github.com/lobehub/lobe-chat/commit/aa851d4))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 0.96.5](https://github.com/lobehub/lobe-chat/compare/v0.96.4...v0.96.5)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2023-10-29**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.96.
|
|
3
|
+
"version": "0.96.6",
|
|
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",
|
|
@@ -5,14 +5,17 @@ import { memo } from 'react';
|
|
|
5
5
|
|
|
6
6
|
import { getClientConfig } from '@/config/client';
|
|
7
7
|
|
|
8
|
-
const { PLAUSIBLE_DOMAIN } = getClientConfig();
|
|
8
|
+
const { PLAUSIBLE_DOMAIN, PLAUSIBLE_SCRIPT_BASE_URL } = getClientConfig();
|
|
9
9
|
|
|
10
|
-
const PlausibleAnalytics = memo(
|
|
11
|
-
|
|
10
|
+
const PlausibleAnalytics = memo(
|
|
11
|
+
() =>
|
|
12
12
|
PLAUSIBLE_DOMAIN && (
|
|
13
|
-
<Script
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
13
|
+
<Script
|
|
14
|
+
data-domain={PLAUSIBLE_DOMAIN}
|
|
15
|
+
defer
|
|
16
|
+
src={`${PLAUSIBLE_SCRIPT_BASE_URL}/js/script.js`}
|
|
17
|
+
/>
|
|
18
|
+
),
|
|
19
|
+
);
|
|
17
20
|
|
|
18
21
|
export default PlausibleAnalytics;
|
package/src/config/client.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare global {
|
|
|
16
16
|
|
|
17
17
|
NEXT_PUBLIC_ANALYTICS_PLAUSIBLE?: string;
|
|
18
18
|
NEXT_PUBLIC_PLAUSIBLE_DOMAIN?: string;
|
|
19
|
+
NEXT_PUBLIC_PLAUSIBLE_SCRIPT_BASE_URL?: string;
|
|
19
20
|
|
|
20
21
|
NEXT_PUBLIC_ANALYTICS_POSTHOG: string;
|
|
21
22
|
NEXT_PUBLIC_POSTHOG_KEY: string;
|
|
@@ -40,6 +41,8 @@ export const getClientConfig = () => ({
|
|
|
40
41
|
// Plausible Analytics
|
|
41
42
|
ANALYTICS_PLAUSIBLE: process.env.NEXT_PUBLIC_ANALYTICS_PLAUSIBLE === '1',
|
|
42
43
|
PLAUSIBLE_DOMAIN: process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN,
|
|
44
|
+
PLAUSIBLE_SCRIPT_BASE_URL:
|
|
45
|
+
process.env.NEXT_PUBLIC_PLAUSIBLE_SCRIPT_BASE_URL || 'https://plausible.io',
|
|
43
46
|
|
|
44
47
|
// Posthog Analytics
|
|
45
48
|
ANALYTICS_POSTHOG: process.env.NEXT_PUBLIC_ANALYTICS_POSTHOG === '1',
|