@lobehub/chat 0.125.0 → 0.126.0
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 +33 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/docs/Deployment/Environment-Variable.md +25 -0
- package/docs/Deployment/Environment-Variable.zh-CN.md +26 -0
- package/package.json +1 -1
- package/src/app/chat/settings/(desktop)/features/Header.tsx +1 -1
- package/src/components/Analytics/Umami.tsx +15 -0
- package/src/components/Analytics/index.tsx +4 -1
- package/src/config/client.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 0.126.0](https://github.com/lobehub/lobe-chat/compare/v0.125.0...v0.126.0)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-02-09**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Support umami analytics.
|
|
12
|
+
|
|
13
|
+
#### 🐛 Bug Fixes
|
|
14
|
+
|
|
15
|
+
- **misc**: The back button on the chat setting page can correctly return to the configured Agent chat page.
|
|
16
|
+
|
|
17
|
+
<br/>
|
|
18
|
+
|
|
19
|
+
<details>
|
|
20
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
21
|
+
|
|
22
|
+
#### What's improved
|
|
23
|
+
|
|
24
|
+
- **misc**: Support umami analytics, closes [#1267](https://github.com/lobehub/lobe-chat/issues/1267) ([da7beba](https://github.com/lobehub/lobe-chat/commit/da7beba))
|
|
25
|
+
|
|
26
|
+
#### What's fixed
|
|
27
|
+
|
|
28
|
+
- **misc**: The back button on the chat setting page can correctly return to the configured Agent chat page, closes [#1272](https://github.com/lobehub/lobe-chat/issues/1272) ([4cc1ad5](https://github.com/lobehub/lobe-chat/commit/4cc1ad5))
|
|
29
|
+
|
|
30
|
+
</details>
|
|
31
|
+
|
|
32
|
+
<div align="right">
|
|
33
|
+
|
|
34
|
+
[](#readme-top)
|
|
35
|
+
|
|
36
|
+
</div>
|
|
37
|
+
|
|
5
38
|
## [Version 0.125.0](https://github.com/lobehub/lobe-chat/compare/v0.124.3...v0.125.0)
|
|
6
39
|
|
|
7
40
|
<sup>Released on **2024-02-08**</sup>
|
package/README.md
CHANGED
|
@@ -225,14 +225,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
225
225
|
|
|
226
226
|
<!-- AGENT LIST -->
|
|
227
227
|
|
|
228
|
-
| Recent Submits
|
|
229
|
-
|
|
|
230
|
-
| [
|
|
231
|
-
| [
|
|
232
|
-
| [
|
|
233
|
-
| [
|
|
234
|
-
|
|
235
|
-
> 📊 Total agents: [<kbd>**
|
|
228
|
+
| Recent Submits | Description |
|
|
229
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
230
|
+
| [Jira Story Facilitator](https://chat-preview.lobehub.com/market?agent=jira-product-manager)<br/><sup>By **[emad-pg](https://github.com/emad-pg)** on **2024-02-07**</sup> | A Product manager agent that is specialised in transforming feature ideas into comprehensive Jira stories drafts for your team to pick up.<br/>`product-management` `story-creation` `jira` |
|
|
231
|
+
| [Text Variator](https://chat-preview.lobehub.com/market?agent=text-variator)<br/><sup>By **[bentwnghk](https://github.com/bentwnghk)** on **2024-02-07**</sup> | Please provide the text you would like me to generate different versions of<br/>`copywriting` `editing` `creative-writing` |
|
|
232
|
+
| [Turkish/English Translator](https://chat-preview.lobehub.com/market?agent=turkish-english-translator)<br/><sup>By **[Zisan-uzum](https://github.com/Zisan-uzum)** on **2024-02-07**</sup> | Translates text into Turkish or English, as needed<br/>`turkish` `english` `translation` `writing` |
|
|
233
|
+
| [CAN: Code Master](https://chat-preview.lobehub.com/market?agent=can)<br/><sup>By **[MrHuangJser](https://github.com/MrHuangJser)** on **2024-02-06**</sup> | CAN: Professional coding expert with years of experience and no character limit. Provides entrepreneurial services such as creative naming, slogans, user profiles, pain points, value propositions, sales channels, revenue streams, and cost structures.<br/>`coding` `communication` `questioning` |
|
|
234
|
+
|
|
235
|
+
> 📊 Total agents: [<kbd>**159**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
236
236
|
|
|
237
237
|
<!-- AGENT LIST -->
|
|
238
238
|
|
package/README.zh-CN.md
CHANGED
|
@@ -205,14 +205,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
205
205
|
|
|
206
206
|
<!-- AGENT LIST -->
|
|
207
207
|
|
|
208
|
-
| 最近新增
|
|
209
|
-
|
|
|
210
|
-
| [
|
|
211
|
-
| [
|
|
212
|
-
| [
|
|
213
|
-
| [
|
|
214
|
-
|
|
215
|
-
> 📊 Total agents: [<kbd>**
|
|
208
|
+
| 最近新增 | 助手说明 |
|
|
209
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
210
|
+
| [Jira 故事协助工具](https://chat-preview.lobehub.com/market?agent=jira-product-manager)<br/><sup>By **[emad-pg](https://github.com/emad-pg)** on **2024-02-07**</sup> | 一款专门将功能点子转化为全面的 Jira 故事草稿,供团队选择的产品经理代理。<br/>`产品管理` `故事创建` `jira` |
|
|
211
|
+
| [文本变体生成器](https://chat-preview.lobehub.com/market?agent=text-variator)<br/><sup>By **[bentwnghk](https://github.com/bentwnghk)** on **2024-02-07**</sup> | 请提供您希望我生成不同版本的文本<br/>`文案撰写` `编辑` `创意写作` |
|
|
212
|
+
| [土耳其语 / 英语翻译器](https://chat-preview.lobehub.com/market?agent=turkish-english-translator)<br/><sup>By **[Zisan-uzum](https://github.com/Zisan-uzum)** on **2024-02-07**</sup> | 根据需要将文本翻译成土耳其语或英语<br/>`土耳其语` `英语` `翻译` `写作` |
|
|
213
|
+
| [CAN: 编程大师](https://chat-preview.lobehub.com/market?agent=can)<br/><sup>By **[MrHuangJser](https://github.com/MrHuangJser)** on **2024-02-06**</sup> | CAN: 专业编程专家,多年经验,无字符限制。提供创意命名、标语、用户画像、痛点、价值主张、销售渠道、收入流、成本结构等创业计划服务。<br/>`编程` `交流` `提问` |
|
|
214
|
+
|
|
215
|
+
> 📊 Total agents: [<kbd>**159**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
216
216
|
|
|
217
217
|
<!-- AGENT LIST -->
|
|
218
218
|
|
|
@@ -25,6 +25,7 @@ LobeChat provides additional configuration options during deployment, which can
|
|
|
25
25
|
- [Data Analytics](#data-analytics)
|
|
26
26
|
- [Vercel Analytics](#vercel-analytics)
|
|
27
27
|
- [Posthog Analytics](#posthog-analytics)
|
|
28
|
+
- [Umami Analytics](#umami-analytics)
|
|
28
29
|
|
|
29
30
|
## General Variables
|
|
30
31
|
|
|
@@ -286,8 +287,32 @@ The above example adds `search-engine` plugin settings, and sets the `SERPAPI_AP
|
|
|
286
287
|
- Default: -
|
|
287
288
|
- Example: `1`
|
|
288
289
|
|
|
290
|
+
### Umami Analytics
|
|
291
|
+
|
|
292
|
+
#### `NEXT_PUBLIC_ANALYTICS_UMAMI`
|
|
293
|
+
|
|
294
|
+
- Type: Optional
|
|
295
|
+
- Description: Environment variable to enable [Umami Analytics][umami-analytics-url]. Set to `1` to enable Umami Analytics.
|
|
296
|
+
- Default: `-`
|
|
297
|
+
- Example: `1`
|
|
298
|
+
|
|
299
|
+
#### `NEXT_PUBLIC_UMAMI_SCRIPT_URL`
|
|
300
|
+
|
|
301
|
+
- Type: Optional
|
|
302
|
+
- Description: Set the url of the umami script. Default is the script address of Umami Cloud.
|
|
303
|
+
- Default: `https://analytics.umami.is/script.js`
|
|
304
|
+
- Example: `https://umami.your-site.com/script.js`
|
|
305
|
+
|
|
306
|
+
#### `NEXT_PUBLIC_UMAMI_WEBSITE_ID`
|
|
307
|
+
|
|
308
|
+
- Type: Required
|
|
309
|
+
- Description: The website ID in umami
|
|
310
|
+
- Default: `-`
|
|
311
|
+
- Example: `E738D82A-EE9E-4806-A81F-0CA3CAE57F65`
|
|
312
|
+
|
|
289
313
|
[auth0-client-page]: https://manage.auth0.com/dashboard
|
|
290
314
|
[azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
|
|
291
315
|
[openai-api-page]: https://platform.openai.com/account/api-keys
|
|
292
316
|
[posthog-analytics-url]: https://posthog.com
|
|
317
|
+
[umami-analytics-url]: https://umami.is
|
|
293
318
|
[vercel-analytics-url]: https://vercel.com/analytics
|
|
@@ -25,6 +25,7 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
|
|
|
25
25
|
- [数据统计](#数据统计)
|
|
26
26
|
- [Vercel Analytics](#vercel-analytics)
|
|
27
27
|
- [Posthog Analytics](#posthog-analytics)
|
|
28
|
+
- [Umami Analytics](#umami-analytics)
|
|
28
29
|
|
|
29
30
|
## 通用变量
|
|
30
31
|
|
|
@@ -282,7 +283,32 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
|
|
|
282
283
|
- 默认值: `-`
|
|
283
284
|
- 示例:`1`
|
|
284
285
|
|
|
286
|
+
### Umami Analytics
|
|
287
|
+
|
|
288
|
+
#### `NEXT_PUBLIC_ANALYTICS_UMAMI`
|
|
289
|
+
|
|
290
|
+
- 类型:可选
|
|
291
|
+
- 描述:用于开启 [Umami Analytics][umami-analytics-url] 的环境变量,设为 `1`
|
|
292
|
+
时开启 Umami Analytics
|
|
293
|
+
- 默认值: `-`
|
|
294
|
+
- 示例:`1`
|
|
295
|
+
|
|
296
|
+
#### `NEXT_PUBLIC_UMAMI_SCRIPT_URL`
|
|
297
|
+
|
|
298
|
+
- 类型:可选
|
|
299
|
+
- 描述:Umami 脚本的网址,默认为 Umami Cloud 提供的脚本网址
|
|
300
|
+
- 默认值:`https://analytics.umami.is/script.js`
|
|
301
|
+
- 示例:`https://umami.your-site.com/script.js`
|
|
302
|
+
|
|
303
|
+
#### `NEXT_PUBLIC_UMAMI_WEBSITE_ID`
|
|
304
|
+
|
|
305
|
+
- 类型:必选
|
|
306
|
+
- 描述:你的 Umami 的 Website ID
|
|
307
|
+
- 默认值:`-`
|
|
308
|
+
- 示例:`E738D82A-EE9E-4806-A81F-0CA3CAE57F65`
|
|
309
|
+
|
|
285
310
|
[auth0-client-page]: https://manage.auth0.com/dashboard
|
|
286
311
|
[azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
|
|
287
312
|
[openai-api-page]: https://platform.openai.com/account/api-keys
|
|
288
313
|
[posthog-analytics-url]: https://posthog.com
|
|
314
|
+
[umami-analytics-url]: https://umami.is
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.126.0",
|
|
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",
|
|
@@ -13,7 +13,7 @@ const Header = memo(() => {
|
|
|
13
13
|
return (
|
|
14
14
|
<ChatHeader
|
|
15
15
|
left={<ChatHeaderTitle title={t('header.session')} />}
|
|
16
|
-
onBackClick={() => router.push(pathString('/chat', {
|
|
16
|
+
onBackClick={() => router.push(pathString('/chat', { search: location.search }))}
|
|
17
17
|
right={<HeaderContent />}
|
|
18
18
|
showBackButton
|
|
19
19
|
/>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import Script from 'next/script';
|
|
4
|
+
import { memo } from 'react';
|
|
5
|
+
|
|
6
|
+
import { getClientConfig } from '@/config/client';
|
|
7
|
+
|
|
8
|
+
const { UMAMI_SCRIPT_URL, UMAMI_WEBSITE_ID } = getClientConfig();
|
|
9
|
+
|
|
10
|
+
const UmamiAnalytics = memo(
|
|
11
|
+
() =>
|
|
12
|
+
UMAMI_WEBSITE_ID && <Script data-website-id={UMAMI_WEBSITE_ID} defer src={UMAMI_SCRIPT_URL} />,
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export default UmamiAnalytics;
|
|
@@ -5,8 +5,10 @@ import { getClientConfig } from '@/config/client';
|
|
|
5
5
|
const Vercel = dynamic(() => import('./Vercel'), { ssr: false });
|
|
6
6
|
const Plausible = dynamic(() => import('./Plausible'), { ssr: false });
|
|
7
7
|
const Posthog = dynamic(() => import('./Posthog'), { ssr: false });
|
|
8
|
+
const Umami = dynamic(() => import('./Umami'), { ssr: false });
|
|
8
9
|
|
|
9
|
-
const { ANALYTICS_VERCEL, ANALYTICS_POSTHOG, ANALYTICS_PLAUSIBLE } =
|
|
10
|
+
const { ANALYTICS_VERCEL, ANALYTICS_POSTHOG, ANALYTICS_PLAUSIBLE, ANALYTICS_UMAMI } =
|
|
11
|
+
getClientConfig();
|
|
10
12
|
|
|
11
13
|
const Analytics = () => {
|
|
12
14
|
return (
|
|
@@ -14,6 +16,7 @@ const Analytics = () => {
|
|
|
14
16
|
{ANALYTICS_VERCEL && <Vercel />}
|
|
15
17
|
{ANALYTICS_PLAUSIBLE && <Plausible />}
|
|
16
18
|
{ANALYTICS_POSTHOG && <Posthog />}
|
|
19
|
+
{ANALYTICS_UMAMI && <Umami />}
|
|
17
20
|
</>
|
|
18
21
|
);
|
|
19
22
|
};
|
package/src/config/client.ts
CHANGED
|
@@ -24,6 +24,10 @@ declare global {
|
|
|
24
24
|
NEXT_PUBLIC_POSTHOG_HOST: string;
|
|
25
25
|
NEXT_PUBLIC_POSTHOG_DEBUG: string;
|
|
26
26
|
|
|
27
|
+
NEXT_PUBLIC_ANALYTICS_UMAMI?: string;
|
|
28
|
+
NEXT_PUBLIC_UMAMI_SCRIPT_URL?: string;
|
|
29
|
+
NEXT_PUBLIC_UMAMI_WEBSITE_ID?: string;
|
|
30
|
+
|
|
27
31
|
NEXT_PUBLIC_I18N_DEBUG: string;
|
|
28
32
|
NEXT_PUBLIC_I18N_DEBUG_BROWSER: string;
|
|
29
33
|
NEXT_PUBLIC_I18N_DEBUG_SERVER: string;
|
|
@@ -50,6 +54,12 @@ export const getClientConfig = () => ({
|
|
|
50
54
|
POSTHOG_HOST: process.env.NEXT_PUBLIC_POSTHOG_HOST,
|
|
51
55
|
POSTHOG_DEBUG: process.env.NEXT_PUBLIC_POSTHOG_DEBUG === '1',
|
|
52
56
|
|
|
57
|
+
// Umami Analytics
|
|
58
|
+
ANALYTICS_UMAMI: process.env.NEXT_PUBLIC_ANALYTICS_UMAMI === '1',
|
|
59
|
+
UMAMI_SCRIPT_URL:
|
|
60
|
+
process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL || 'https://analytics.umami.is/script.js',
|
|
61
|
+
UMAMI_WEBSITE_ID: process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID,
|
|
62
|
+
|
|
53
63
|
// i18n debug mode
|
|
54
64
|
I18N_DEBUG: process.env.NEXT_PUBLIC_I18N_DEBUG === '1',
|
|
55
65
|
I18N_DEBUG_BROWSER: process.env.NEXT_PUBLIC_I18N_DEBUG_BROWSER === '1',
|