@lobehub/chat 0.8.0 → 0.8.2

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,57 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.8.2](https://github.com/lobehub/lobe-chat/compare/v0.8.1...v0.8.2)
6
+
7
+ <sup>Released on **2023-07-22**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix miss manifest.json link, 优化 model tag 展示逻辑.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix miss manifest.json link ([ac4b2f3](https://github.com/lobehub/lobe-chat/commit/ac4b2f3))
21
+ - **misc**: 优化 model tag 展示逻辑 ([3463ede](https://github.com/lobehub/lobe-chat/commit/3463ede))
22
+
23
+ </details>
24
+
25
+ <div align="right">
26
+
27
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
28
+
29
+ </div>
30
+
31
+ ### [Version 0.8.1](https://github.com/lobehub/lobe-chat/compare/v0.8.0...v0.8.1)
32
+
33
+ <sup>Released on **2023-07-22**</sup>
34
+
35
+ #### 🐛 Bug Fixes
36
+
37
+ - **misc**: Fix import.
38
+
39
+ <br/>
40
+
41
+ <details>
42
+ <summary><kbd>Improvements and Fixes</kbd></summary>
43
+
44
+ #### What's fixed
45
+
46
+ - **misc**: Fix import ([4fb9967](https://github.com/lobehub/lobe-chat/commit/4fb9967))
47
+
48
+ </details>
49
+
50
+ <div align="right">
51
+
52
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
53
+
54
+ </div>
55
+
5
56
  ## [Version 0.8.0](https://github.com/lobehub/lobe-chat/compare/v0.7.0...v0.8.0)
6
57
 
7
58
  <sup>Released on **2023-07-22**</sup>
package/next.config.mjs CHANGED
@@ -1,12 +1,13 @@
1
- const API_END_PORT_URL = process.env.API_END_PORT_URL || '';
1
+ import nextPWA from 'next-pwa';
2
2
 
3
- const withPWA = require('next-pwa')({
3
+ const withPWA = nextPWA({
4
4
  dest: 'public',
5
5
  register: true,
6
6
  skipWaiting: true,
7
7
  disable: process.env.NODE_ENV === 'development',
8
8
  });
9
9
 
10
+ const API_END_PORT_URL = process.env.API_END_PORT_URL || '';
10
11
  /** @type {import('next').NextConfig} */
11
12
  const nextConfig = {
12
13
  reactStrictMode: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Lobe Chat is an open-source chatbot client using LangChain, Typescript and Next.js",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -57,6 +57,7 @@ class MyDocument extends Document {
57
57
  <meta content="LobeHub" name="application-name" />
58
58
  <meta content="#000000" name="msapplication-TileColor" />
59
59
  <meta content="#000000" name="theme-color" />
60
+ <link href="/manifest.json" rel="manifest" />
60
61
  </Head>
61
62
  <body>
62
63
  <Main />
@@ -18,20 +18,20 @@ const MessageExtra = ({ role, extra }: ChatMessage): ReactNode => {
18
18
 
19
19
  const [model] = useSessionStore((s) => [agentSelectors.currentAgentModel(s)], shallow);
20
20
 
21
- // 只有 ai 的 message 才会需要展示
22
- if (role !== 'assistant') return;
23
- // 只有当 当前的 model 和 fromModel 不一致时,才需要展示
24
- if (extra?.fromModel && model === extra?.fromModel) return;
25
-
26
- return (
27
- <Flexbox className={styles.container}>
28
- <div>
29
- <Tag bordered={false} style={{ borderRadius: 6 }}>
30
- {extra?.fromModel}
31
- </Tag>
32
- </div>
33
- </Flexbox>
34
- );
21
+ // 1. 只有 ai 的 message
22
+ // 2. 且存在 fromModel
23
+ // 3. 且当前的 model 和 fromModel 不一致时
24
+ if (role === 'assistant' && extra?.fromModel && model !== extra?.fromModel)
25
+ // 才需要展示 model tag
26
+ return (
27
+ <Flexbox className={styles.container}>
28
+ <div>
29
+ <Tag bordered={false} style={{ borderRadius: 6 }}>
30
+ {extra?.fromModel}
31
+ </Tag>
32
+ </div>
33
+ </Flexbox>
34
+ );
35
35
  };
36
36
 
37
37
  export default MessageExtra;