@lobehub/chat 1.97.10 → 1.97.12

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,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.97.12](https://github.com/lobehub/lobe-chat/compare/v1.97.11...v1.97.12)
6
+
7
+ <sup>Released on **2025-07-11**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Grok-4 reasoning model universal matching.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Grok-4 reasoning model universal matching, closes [#8390](https://github.com/lobehub/lobe-chat/issues/8390) ([d6f17f8](https://github.com/lobehub/lobe-chat/commit/d6f17f8))
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
+
30
+ ### [Version 1.97.11](https://github.com/lobehub/lobe-chat/compare/v1.97.10...v1.97.11)
31
+
32
+ <sup>Released on **2025-07-11**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: Open new topic by tap Just Chat again.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: Open new topic by tap Just Chat again, closes [#8311](https://github.com/lobehub/lobe-chat/issues/8311) ([7e2f4ce](https://github.com/lobehub/lobe-chat/commit/7e2f4ce))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 1.97.10](https://github.com/lobehub/lobe-chat/compare/v1.97.9...v1.97.10)
6
56
 
7
57
  <sup>Released on **2025-07-11**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Grok-4 reasoning model universal matching."
6
+ ]
7
+ },
8
+ "date": "2025-07-11",
9
+ "version": "1.97.12"
10
+ },
11
+ {
12
+ "children": {
13
+ "improvements": [
14
+ "Open new topic by tap Just Chat again."
15
+ ]
16
+ },
17
+ "date": "2025-07-11",
18
+ "version": "1.97.11"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.97.10",
3
+ "version": "1.97.12",
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",
@@ -41,11 +41,8 @@
41
41
  "db:generate": "drizzle-kit generate && npm run db:generate-client && npm run workflow:dbml",
42
42
  "db:generate-client": "tsx ./scripts/migrateClientDB/compile-migrations.ts",
43
43
  "db:migrate": "MIGRATION_DB=1 tsx ./scripts/migrateServerDB/index.ts",
44
- "db:push": "drizzle-kit push",
45
- "db:push-test": "NODE_ENV=test drizzle-kit push",
46
44
  "db:studio": "drizzle-kit studio",
47
45
  "db:visualize": "dbdocs build docs/development/database-schema.dbml --project lobe-chat",
48
- "db:z-pull": "drizzle-kit introspect",
49
46
  "desktop:build": "npm run desktop:build-next && npm run desktop:prepare-dist && npm run desktop:build-electron",
50
47
  "desktop:build-electron": "tsx scripts/electronWorkflow/buildElectron.ts",
51
48
  "desktop:build-next": "npm run build:electron",
@@ -170,7 +167,6 @@
170
167
  "@vercel/speed-insights": "^1.2.0",
171
168
  "@xterm/xterm": "^5.5.0",
172
169
  "ahooks": "^3.8.5",
173
- "ai": "^3.4.33",
174
170
  "antd": "^5.26.4",
175
171
  "antd-style": "^3.7.1",
176
172
  "brotli-wasm": "^3.0.1",
@@ -6,6 +6,8 @@ import { DEFAULT_INBOX_AVATAR } from '@/const/meta';
6
6
  import { INBOX_SESSION_ID } from '@/const/session';
7
7
  import { SESSION_CHAT_URL } from '@/const/url';
8
8
  import { useSwitchSession } from '@/hooks/useSwitchSession';
9
+ import { getChatStoreState, useChatStore } from '@/store/chat';
10
+ import { chatSelectors } from '@/store/chat/selectors';
9
11
  import { useServerConfigStore } from '@/store/serverConfig';
10
12
  import { useSessionStore } from '@/store/session';
11
13
 
@@ -17,13 +19,24 @@ const Inbox = memo(() => {
17
19
  const activeId = useSessionStore((s) => s.activeId);
18
20
  const switchSession = useSwitchSession();
19
21
 
22
+ const openNewTopicOrSaveTopic = useChatStore((s) => s.openNewTopicOrSaveTopic);
23
+
20
24
  return (
21
25
  <Link
22
26
  aria-label={t('inbox.title')}
23
27
  href={SESSION_CHAT_URL(INBOX_SESSION_ID, mobile)}
24
- onClick={(e) => {
28
+ onClick={async (e) => {
25
29
  e.preventDefault();
26
- switchSession(INBOX_SESSION_ID);
30
+ if (activeId === INBOX_SESSION_ID) {
31
+ // If user tap the inbox again, open a new topic
32
+ const inboxMessages = chatSelectors.inboxActiveTopicMessages(getChatStoreState());
33
+
34
+ if (inboxMessages.length > 0) {
35
+ await openNewTopicOrSaveTopic();
36
+ }
37
+ } else {
38
+ switchSession(INBOX_SESSION_ID);
39
+ }
27
40
  }}
28
41
  >
29
42
  <ListItem
@@ -13,7 +13,7 @@ const xaiChatModels: AIChatModelCard[] = [
13
13
  '我们最新最强大的旗舰模型,在自然语言处理、数学计算和推理方面表现卓越 —— 是一款完美的全能型选手。',
14
14
  displayName: 'Grok 4 0709',
15
15
  enabled: true,
16
- id: 'grok-4-0709',
16
+ id: 'grok-4',
17
17
  pricing: {
18
18
  cachedInput: 0.75,
19
19
  input: 3,
@@ -0,0 +1,12 @@
1
+ -- Migration to apply specific autovacuum settings to high-traffic tables
2
+ -- This is crucial to prevent table and TOAST bloat for 'embeddings' and 'chunks'
3
+ -- https://github.com/lobehub/lobe-chat/issues/8316
4
+
5
+ -- Tuning for the 'embeddings' table
6
+ -- Default scale factor (0.2) is too high, leading to infrequent vacuuming.
7
+ -- Lowering to 2% to ensure frequent cleanup.
8
+ ALTER TABLE "embeddings" SET (autovacuum_vacuum_scale_factor = 0.02, autovacuum_vacuum_threshold = 1000);
9
+
10
+ -- Tuning for the 'chunks' table
11
+ -- This table also experiences many updates/deletes and requires similar tuning.
12
+ ALTER TABLE "chunks" SET (autovacuum_vacuum_scale_factor = 0.02, autovacuum_vacuum_threshold = 1000);