@lobehub/lobehub 2.0.0-next.173 → 2.0.0-next.175

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.
Files changed (46) hide show
  1. package/.cursor/rules/db-migrations.mdc +10 -4
  2. package/.cursor/rules/drizzle-schema-style-guide.mdc +33 -17
  3. package/.cursor/rules/hotkey.mdc +161 -0
  4. package/.cursor/rules/i18n.mdc +2 -5
  5. package/.cursor/rules/project-introduce.mdc +3 -2
  6. package/.cursor/rules/project-structure.mdc +33 -37
  7. package/.cursor/rules/react.mdc +155 -0
  8. package/.cursor/rules/recent-data-usage.mdc +138 -0
  9. package/.cursor/rules/rules-index.mdc +1 -1
  10. package/.cursor/rules/testing-guide/agent-runtime-e2e.mdc +285 -0
  11. package/.cursor/rules/testing-guide/zustand-store-action-test.mdc +11 -16
  12. package/.cursor/rules/typescript.mdc +0 -4
  13. package/.cursor/rules/zustand-action-patterns.mdc +137 -169
  14. package/.cursor/rules/zustand-slice-organization.mdc +16 -8
  15. package/.husky/pre-commit +1 -1
  16. package/.i18nrc.js +3 -1
  17. package/AGENTS.md +3 -2
  18. package/CHANGELOG.md +42 -0
  19. package/CLAUDE.md +10 -3
  20. package/GEMINI.md +2 -1
  21. package/README.md +9 -9
  22. package/README.zh-CN.md +12 -12
  23. package/changelog/v1.json +14 -0
  24. package/docs/development/database-schema.dbml +18 -3
  25. package/docs/development/state-management/state-management-selectors.mdx +1 -1
  26. package/glossary.json +8 -0
  27. package/package.json +3 -3
  28. package/packages/database/migrations/0063_add_columns_for_several_tables.sql +30 -0
  29. package/packages/database/migrations/0064_add_agents_session_group_id.sql +7 -0
  30. package/packages/database/migrations/meta/0063_snapshot.json +9113 -0
  31. package/packages/database/migrations/meta/0064_snapshot.json +9143 -0
  32. package/packages/database/migrations/meta/_journal.json +14 -0
  33. package/packages/database/src/core/migrations.json +39 -0
  34. package/packages/database/src/schemas/_helpers.ts +5 -1
  35. package/packages/database/src/schemas/agent.ts +8 -1
  36. package/packages/database/src/schemas/aiInfra.ts +18 -3
  37. package/packages/database/src/schemas/message.ts +11 -6
  38. package/packages/database/src/schemas/topic.ts +17 -2
  39. package/packages/database/src/schemas/user.ts +5 -2
  40. package/packages/database/src/schemas/userMemories.ts +9 -8
  41. package/packages/types/src/topic/thread.ts +24 -0
  42. package/packages/types/src/user/index.ts +1 -0
  43. package/packages/types/src/user/onboarding.ts +16 -0
  44. package/vitest.config.mts +3 -0
  45. package/.cursor/rules/group-chat.mdc +0 -35
  46. package/.cursor/rules/react-component.mdc +0 -173
package/CLAUDE.md CHANGED
@@ -19,6 +19,7 @@ read @.cursor/rules/project-structure.mdc
19
19
  - git commit message should prefix with gitmoji
20
20
  - git branch name format example: tj/feat/feature-name
21
21
  - use .github/PULL_REQUEST_TEMPLATE.md to generate pull request description
22
+ - PR titles starting with `✨ feat/` or `🐛 fix` will trigger the release workflow upon merge. Only use these prefixes for significant user-facing feature changes or bug fixes
22
23
 
23
24
  ### Package Management
24
25
 
@@ -44,10 +45,12 @@ see @.cursor/rules/typescript.mdc
44
45
  - wrap the file path in single quotes to avoid shell expansion
45
46
  - Never run `bun run test` etc to run tests, this will run all tests and cost about 10mins
46
47
  - If trying to fix the same test twice, but still failed, stop and ask for help.
48
+ - **Prefer `vi.spyOn` over `vi.mock`**: When mocking modules or functions, prefer using `vi.spyOn` to mock specific functions rather than `vi.mock` to mock entire modules. This approach is more targeted, easier to maintain, and allows for better control over mock behavior in individual tests.
49
+ - **Tests must pass type check**: After writing or modifying tests, run `bun run type-check` to ensure there are no type errors. Tests should pass both runtime execution and TypeScript type checking.
47
50
 
48
51
  ### Typecheck
49
52
 
50
- - use `bun run typecheck` to check type errors.
53
+ - use `bun run type-check` to check type errors.
51
54
 
52
55
  ### i18n
53
56
 
@@ -55,7 +58,7 @@ see @.cursor/rules/typescript.mdc
55
58
  - **Dev**: Translate `locales/zh-CN/namespace.json` and `locales/en-US/namespace.json` locales file only for dev preview
56
59
  - DON'T run `pnpm i18n`, let CI auto handle it
57
60
 
58
- ## Linear Issue Management
61
+ ## Linear Issue Management (ignore if not installed linear mcp)
59
62
 
60
63
  When working with Linear issues:
61
64
 
@@ -64,6 +67,10 @@ When working with Linear issues:
64
67
  3. **Update issue status** when completing tasks using `mcp__linear-server__update_issue`
65
68
  4. **MUST add completion comment** using `mcp__linear-server__create_comment`
66
69
 
70
+ ### Creating Issues
71
+
72
+ When creating new Linear issues using `mcp__linear-server__create_issue`, **MUST add the `claude code` label** to indicate the issue was created by Claude Code.
73
+
67
74
  ### Completion Comment (REQUIRED)
68
75
 
69
76
  **Every time you complete an issue, you MUST add a comment summarizing the work done.** This is critical for:
@@ -79,7 +86,7 @@ When working with Linear issues:
79
86
  **Workflow for EACH individual issue:**
80
87
 
81
88
  1. Complete the implementation for this specific issue
82
- 2. Run type check: `bun run typecheck`
89
+ 2. Run type check: `bun run type-check`
83
90
  3. Run related tests if applicable
84
91
  4. Create PR if needed
85
92
  5. **IMMEDIATELY** update issue status to **"In Review"** (NOT "Done"): `mcp__linear-server__update_issue`
package/GEMINI.md CHANGED
@@ -18,6 +18,7 @@ read @.cursor/rules/project-structure.mdc
18
18
  - git commit message should prefix with gitmoji
19
19
  - git branch name format example: tj/feat/feature-name
20
20
  - use .github/PULL_REQUEST_TEMPLATE.md to generate pull request description
21
+ - PR titles starting with `✨ feat/` or `🐛 fix` will trigger the release workflow upon merge. Only use these prefixes for significant user-facing feature changes or bug fixes
21
22
 
22
23
  ### Package Management
23
24
 
@@ -46,7 +47,7 @@ see @.cursor/rules/typescript.mdc
46
47
 
47
48
  ### Typecheck
48
49
 
49
- - use `bun run typecheck` to check type errors.
50
+ - use `bun run type-check` to check type errors.
50
51
 
51
52
  ### i18n
52
53
 
package/README.md CHANGED
@@ -345,14 +345,14 @@ In addition, these plugins are not limited to news aggregation, but can also ext
345
345
 
346
346
  <!-- PLUGIN LIST -->
347
347
 
348
- | Recent Submits | Description |
349
- | ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
350
- | [Video Captions](https://lobechat.com/discover/plugin/VideoCaptions)<br/><sup>By **maila** on **2025-12-13**</sup> | Convert Youtube links into transcribed text, enable asking questions, create chapters, and summarize its content.<br/>`video-to-text` `youtube` |
351
- | [WeatherGPT](https://lobechat.com/discover/plugin/WeatherGPT)<br/><sup>By **steven-tey** on **2025-12-13**</sup> | Get current weather information for a specific location.<br/>`weather` |
352
- | [Git OSS Stats](https://lobechat.com/discover/plugin/gitUserRepoStats)<br/><sup>By **yunwei37** on **2025-12-13**</sup> | Dynamically generate and analyze stats and history for OSS repos and developers.<br/>`github` `oss` |
353
- | [Questmate Forms](https://lobechat.com/discover/plugin/questmate)<br/><sup>By **questmate** on **2025-12-13**</sup> | Create forms, checklists and workflows (we call 'em Quests!) that you can assign, schedule or make public.<br/>`forms` `checklists` `productivity` |
348
+ | Recent Submits | Description |
349
+ | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
350
+ | [Shopping tools](https://lobechat.com/discover/plugin/ShoppingTools)<br/><sup>By **shoppingtools** on **2025-12-17**</sup> | Search for products on eBay & AliExpress, find eBay events & coupons. Get prompt examples.<br/>`shopping` `e-bay` `ali-express` `coupons` |
351
+ | [SEO Assistant](https://lobechat.com/discover/plugin/seo_assistant)<br/><sup>By **webfx** on **2025-12-17**</sup> | The SEO Assistant can generate search engine keyword information in order to aid the creation of content.<br/>`seo` `keyword` |
352
+ | [Video Captions](https://lobechat.com/discover/plugin/VideoCaptions)<br/><sup>By **maila** on **2025-12-13**</sup> | Convert Youtube links into transcribed text, enable asking questions, create chapters, and summarize its content.<br/>`video-to-text` `youtube` |
353
+ | [WeatherGPT](https://lobechat.com/discover/plugin/WeatherGPT)<br/><sup>By **steven-tey** on **2025-12-13**</sup> | Get current weather information for a specific location.<br/>`weather` |
354
354
 
355
- > 📊 Total plugins: [<kbd>**39**</kbd>](https://lobechat.com/discover/plugins)
355
+ > 📊 Total plugins: [<kbd>**40**</kbd>](https://lobechat.com/discover/plugins)
356
356
 
357
357
  <!-- PLUGIN LIST -->
358
358
 
@@ -820,7 +820,7 @@ This project is [LobeHub Community License](./LICENSE) licensed.
820
820
  [docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat-database
821
821
  [docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat-database?color=369eff&labelColor=black&style=flat-square&sort=semver
822
822
  [docs]: https://lobehub.com/docs/usage/start
823
- [docs-dev-guide]: https://github.com/lobehub/lobe-chat/wiki/index
823
+ [docs-dev-guide]: https://lobehub.com/docs/development/start
824
824
  [docs-docker]: https://lobehub.com/docs/self-hosting/server-database/docker-compose
825
825
  [docs-env-var]: https://lobehub.com/docs/self-hosting/environment-variables
826
826
  [docs-feat-agent]: https://lobehub.com/docs/usage/features/agent-market
@@ -840,7 +840,7 @@ This project is [LobeHub Community License](./LICENSE) licensed.
840
840
  [docs-feat-tts]: https://lobehub.com/docs/usage/features/tts
841
841
  [docs-feat-vision]: https://lobehub.com/docs/usage/features/vision
842
842
  [docs-function-call]: https://lobehub.com/blog/openai-function-call
843
- [docs-lighthouse]: https://github.com/lobehub/lobe-chat/wiki/Lighthouse
843
+ [docs-lighthouse]: https://lobehub.com/docs/development/others/lighthouse
844
844
  [docs-plugin-dev]: https://lobehub.com/docs/usage/plugins/development
845
845
  [docs-self-hosting]: https://lobehub.com/docs/self-hosting/start
846
846
  [docs-upstream-sync]: https://lobehub.com/docs/self-hosting/advanced/upstream-sync
package/README.zh-CN.md CHANGED
@@ -12,7 +12,7 @@
12
12
  <h1>Lobe Chat</h1>
13
13
 
14
14
  现代化设计的开源 ChatGPT/LLMs 聊天应用与开发框架<br/>
15
- 支持语音合成、多模态、可扩展的([function call][docs-functionc-call])插件系统<br/>
15
+ 支持语音合成、多模态、可扩展的([function call][docs-function-call])插件系统<br/>
16
16
  一键**免费**拥有你自己的 ChatGPT/Gemini/Claude/Ollama 应用
17
17
 
18
18
  [English](./README.md) ¡ **简体中文** ¡ [官网][official-site] ¡ [更新日志][changelog] ¡ [文档][docs] ¡ [博客][blog] ¡ [反馈问题][github-issues-link]
@@ -338,14 +338,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
338
338
 
339
339
  <!-- PLUGIN LIST -->
340
340
 
341
- | 最近新增 | 描述 |
342
- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
343
- | [视频字幕](https://lobechat.com/discover/plugin/VideoCaptions)<br/><sup>By **maila** on **2025-12-13**</sup> | 将 Youtube 链接转换为转录文本,使其能够提问,创建章节,并总结其内容。<br/>`视频转文字` `you-tube` |
344
- | [天气 GPT](https://lobechat.com/discover/plugin/WeatherGPT)<br/><sup>By **steven-tey** on **2025-12-13**</sup> | 获取特定位置的当前天气信息。<br/>`天气` |
345
- | [Git OSS Stats](https://lobechat.com/discover/plugin/gitUserRepoStats)<br/><sup>By **yunwei37** on **2025-12-13**</sup> | 动态生成和分析开源软件仓库和开发者的统计数据和历史记录。<br/>`github` `oss` |
346
- | [Questmate Forms](https://lobechat.com/discover/plugin/questmate)<br/><sup>By **questmate** on **2025-12-13**</sup> | 创建表单、清单和工作流程(我们称之为任务!),您可以分配、安排或公开。<br/>`表单` `清单` `生产力` |
341
+ | 最近新增 | 描述 |
342
+ | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
343
+ | [购物工具](https://lobechat.com/discover/plugin/ShoppingTools)<br/><sup>By **shoppingtools** on **2025-12-17**</sup> | 在 eBay 和 AliExpress 上搜索产品,查找 eBay 活动和优惠券。获取快速示例。<br/>`购物` `e-bay` `ali-express` `优惠券` |
344
+ | [SEO 助手](https://lobechat.com/discover/plugin/seo_assistant)<br/><sup>By **webfx** on **2025-12-17**</sup> | SEO 助手可以生成搜索引擎关键词信息,以帮助创建内容。<br/>`seo` `关键词` |
345
+ | [视频字幕](https://lobechat.com/discover/plugin/VideoCaptions)<br/><sup>By **maila** on **2025-12-13**</sup> | 将 Youtube 链接转换为转录文本,使其能够提问,创建章节,并总结其内容。<br/>`视频转文字` `you-tube` |
346
+ | [天气 GPT](https://lobechat.com/discover/plugin/WeatherGPT)<br/><sup>By **steven-tey** on **2025-12-13**</sup> | 获取特定位置的当前天气信息。<br/>`天气` |
347
347
 
348
- > 📊 Total plugins: [<kbd>**39**</kbd>](https://lobechat.com/discover/plugins)
348
+ > 📊 Total plugins: [<kbd>**40**</kbd>](https://lobechat.com/discover/plugins)
349
349
 
350
350
  <!-- PLUGIN LIST -->
351
351
 
@@ -667,7 +667,7 @@ API Key 是使用 LobeChat 进行大语言模型会话的必要信息,本节
667
667
 
668
668
  ## 🧩 插件体系
669
669
 
670
- 插件提供了扩展 LobeChat [Function Calling][docs-functionc-call] 能力的方法。可以用于引入新的 Function Calling,甚至是新的消息结果渲染方式。如果你对插件开发感兴趣,请在 Wiki 中查阅我们的 [📘 插件开发指引][docs-plugin-dev] 。
670
+ 插件提供了扩展 LobeChat [Function Calling][docs-function-call] 能力的方法。可以用于引入新的 Function Calling,甚至是新的消息结果渲染方式。如果你对插件开发感兴趣,请在 Wiki 中查阅我们的 [📘 插件开发指引][docs-plugin-dev] 。
671
671
 
672
672
  - [lobe-chat-plugins][lobe-chat-plugins]:插件索引从该仓库的 index.json 中获取插件列表并显示给用户。
673
673
  - [chat-plugin-template][chat-plugin-template]:插件开发模版,你可以通过项目模版快速新建插件项目。
@@ -839,7 +839,7 @@ This project is [LobeHub Community License](./LICENSE) licensed.
839
839
  [docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat-database
840
840
  [docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat-database?color=369eff&labelColor=black&style=flat-square&sort=semver
841
841
  [docs]: https://lobehub.com/zh/docs/usage/start
842
- [docs-dev-guide]: https://github.com/lobehub/lobe-chat/wiki/index
842
+ [docs-dev-guide]: https://lobehub.com/docs/development/start
843
843
  [docs-docker]: https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose
844
844
  [docs-env-var]: https://lobehub.com/docs/self-hosting/environment-variables
845
845
  [docs-feat-agent]: https://lobehub.com/docs/usage/features/agent-market
@@ -858,8 +858,8 @@ This project is [LobeHub Community License](./LICENSE) licensed.
858
858
  [docs-feat-theme]: https://lobehub.com/docs/usage/features/theme
859
859
  [docs-feat-tts]: https://lobehub.com/docs/usage/features/tts
860
860
  [docs-feat-vision]: https://lobehub.com/docs/usage/features/vision
861
- [docs-functionc-call]: https://lobehub.com/zh/blog/openai-function-call
862
- [docs-lighthouse]: https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN
861
+ [docs-function-call]: https://lobehub.com/zh/blog/openai-function-call
862
+ [docs-lighthouse]: https://lobehub.com/docs/development/others/lighthouse
863
863
  [docs-plugin-dev]: https://lobehub.com/docs/usage/plugins/development
864
864
  [docs-self-hosting]: https://lobehub.com/docs/self-hosting/start
865
865
  [docs-upstream-sync]: https://lobehub.com/docs/self-hosting/advanced/upstream-sync
package/changelog/v1.json CHANGED
@@ -1,4 +1,18 @@
1
1
  [
2
+ {
3
+ "children": {},
4
+ "date": "2025-12-21",
5
+ "version": "2.0.0-next.175"
6
+ },
7
+ {
8
+ "children": {
9
+ "improvements": [
10
+ "Refactor database schema."
11
+ ]
12
+ },
13
+ "date": "2025-12-20",
14
+ "version": "2.0.0-next.174"
15
+ },
2
16
  {
3
17
  "children": {
4
18
  "fixes": [
@@ -8,7 +8,7 @@ table agents {
8
8
  avatar text
9
9
  background_color text
10
10
  market_identifier text
11
- plugins jsonb [default: `[]`]
11
+ plugins jsonb
12
12
  client_id text
13
13
  user_id text [not null]
14
14
  chat_config jsonb
@@ -19,6 +19,7 @@ table agents {
19
19
  system_role text
20
20
  tts jsonb
21
21
  virtual boolean [default: false]
22
+ pinned boolean
22
23
  opening_message text
23
24
  opening_questions text[] [default: `[]`]
24
25
  accessed_at "timestamp with time zone" [not null, default: `now()`]
@@ -88,6 +89,7 @@ table ai_models {
88
89
 
89
90
  indexes {
90
91
  (id, provider_id, user_id) [pk]
92
+ user_id [name: 'ai_models_user_id_idx']
91
93
  }
92
94
  }
93
95
 
@@ -111,6 +113,7 @@ table ai_providers {
111
113
 
112
114
  indexes {
113
115
  (id, user_id) [pk]
116
+ user_id [name: 'ai_providers_user_id_idx']
114
117
  }
115
118
  }
116
119
 
@@ -421,6 +424,9 @@ table message_groups {
421
424
  parent_message_id text
422
425
  title varchar(255)
423
426
  description text
427
+ type text
428
+ content text
429
+ editor_data jsonb
424
430
  client_id varchar(255)
425
431
  accessed_at "timestamp with time zone" [not null, default: `now()`]
426
432
  created_at "timestamp with time zone" [not null, default: `now()`]
@@ -429,6 +435,7 @@ table message_groups {
429
435
  indexes {
430
436
  (client_id, user_id) [name: 'message_groups_client_id_user_id_unique', unique]
431
437
  topic_id [name: 'message_groups_topic_id_idx']
438
+ type [name: 'message_groups_type_idx']
432
439
  }
433
440
  }
434
441
 
@@ -447,6 +454,7 @@ table message_plugins {
447
454
 
448
455
  indexes {
449
456
  (client_id, user_id) [name: 'message_plugins_client_id_user_id_unique', unique]
457
+ tool_call_id [name: 'message_plugins_tool_call_id_idx']
450
458
  }
451
459
  }
452
460
 
@@ -507,6 +515,7 @@ table messages {
507
515
  role varchar(255) [not null]
508
516
  content text
509
517
  editor_data jsonb
518
+ summary text
510
519
  reasoning jsonb
511
520
  search jsonb
512
521
  metadata jsonb
@@ -997,6 +1006,9 @@ table threads {
997
1006
  source_message_id text
998
1007
  parent_thread_id text
999
1008
  client_id text
1009
+ agent_id text
1010
+ group_id text
1011
+ metadata jsonb
1000
1012
  user_id text [not null]
1001
1013
  last_active_at "timestamp with time zone" [default: `now()`]
1002
1014
  accessed_at "timestamp with time zone" [not null, default: `now()`]
@@ -1006,6 +1018,8 @@ table threads {
1006
1018
  indexes {
1007
1019
  (client_id, user_id) [name: 'threads_client_id_user_id_unique', unique]
1008
1020
  topic_id [name: 'threads_topic_id_idx']
1021
+ agent_id [name: 'threads_agent_id_idx']
1022
+ group_id [name: 'threads_group_id_idx']
1009
1023
  }
1010
1024
  }
1011
1025
 
@@ -1075,6 +1089,7 @@ table user_settings {
1075
1089
  system_agent jsonb
1076
1090
  default_agent jsonb
1077
1091
  market jsonb
1092
+ memory jsonb
1078
1093
  tool jsonb
1079
1094
  image jsonb
1080
1095
  }
@@ -1089,7 +1104,9 @@ table users {
1089
1104
  first_name text
1090
1105
  last_name text
1091
1106
  full_name text
1107
+ interests "varchar(64)[]"
1092
1108
  is_onboarded boolean [default: false]
1109
+ onboarding jsonb
1093
1110
  clerk_created_at "timestamp with time zone"
1094
1111
  email_verified boolean [not null, default: false]
1095
1112
  email_verified_at "timestamp with time zone"
@@ -1150,7 +1167,6 @@ table user_memories_contexts {
1150
1167
  associated_objects jsonb
1151
1168
  associated_subjects jsonb
1152
1169
  title text
1153
- title_vector vector(1024)
1154
1170
  description text
1155
1171
  description_vector vector(1024)
1156
1172
  type varchar(255)
@@ -1163,7 +1179,6 @@ table user_memories_contexts {
1163
1179
  updated_at "timestamp with time zone" [not null, default: `now()`]
1164
1180
 
1165
1181
  indexes {
1166
- title_vector [name: 'user_memories_contexts_title_vector_index']
1167
1182
  description_vector [name: 'user_memories_contexts_description_vector_index']
1168
1183
  type [name: 'user_memories_contexts_type_index']
1169
1184
  user_id [name: 'user_memories_contexts_user_id_index']
@@ -8,7 +8,7 @@ This TypeScript code snippet defines an object named `pluginSelectors`, which co
8
8
 
9
9
  Here are some key points to note:
10
10
 
11
- - `enabledSchema`: A function that returns an array of `ChatCompletionFunctions` filtered based on the enabled plugin list `enabledPlugins`. It appends the plugin identifier as a prefix to the API names to ensure uniqueness and uses the `uniqBy` function from the Lodash library to remove duplicates.
11
+ - `enabledSchema`: A function that returns an array of `ChatCompletionFunctions` filtered based on the enabled plugin list `enabledPlugins`. It appends the plugin identifier as a prefix to the API names to ensure uniqueness and uses the `uniqBy` function from the es-toolkit library to remove duplicates.
12
12
  - `onlinePluginStore`: Returns the current online plugin list.
13
13
  - `pluginList`: Returns the list of plugins, including custom plugins and standard plugins.
14
14
  - `getPluginMetaById`: Returns the plugin metadata based on the plugin ID.
package/glossary.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "助手": {
3
+ "en-US": "Agent"
4
+ },
5
+ "文稿": {
6
+ "en-US": "Page"
7
+ }
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.173",
3
+ "version": "2.0.0-next.175",
4
4
  "description": "LobeHub - an open-source,comprehensive AI Agent 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",
@@ -60,7 +60,7 @@
60
60
  "e2e:install": "playwright install",
61
61
  "e2e:ui": "playwright test --ui",
62
62
  "i18n": "npm run workflow:i18n && lobe-i18n && prettier -c --write \"locales/**\"",
63
- "lint": "npm run lint:ts && npm run lint:style && npm run typecheck && npm run lint:circular",
63
+ "lint": "npm run lint:ts && npm run lint:style && npm run type-check && npm run lint:circular",
64
64
  "lint:circular": "npm run lint:circular:main && npm run lint:circular:packages",
65
65
  "lint:circular:main": "dpdm src/**/*.ts --no-warning --no-tree --exit-code circular:1 --no-progress -T true --skip-dynamic-imports circular",
66
66
  "lint:circular:packages": "dpdm packages/**/src/**/*.ts --no-warning --no-tree --exit-code circular:1 --no-progress -T true --skip-dynamic-imports circular",
@@ -85,7 +85,7 @@
85
85
  "test:e2e": "pnpm --filter @lobechat/e2e-tests test",
86
86
  "test:e2e:smoke": "pnpm --filter @lobechat/e2e-tests test:smoke",
87
87
  "test:update": "vitest -u",
88
- "typecheck": "tsgo --noEmit",
88
+ "type-check": "tsgo --noEmit",
89
89
  "webhook:ngrok": "ngrok http http://localhost:3011",
90
90
  "workflow:cdn": "tsx ./scripts/cdnWorkflow/index.ts",
91
91
  "workflow:changelog": "tsx ./scripts/changelogWorkflow/index.ts",
@@ -0,0 +1,30 @@
1
+ DROP INDEX IF EXISTS "user_memories_contexts_title_vector_index";--> statement-breakpoint
2
+ ALTER TABLE "agents" ALTER COLUMN "plugins" DROP DEFAULT;--> statement-breakpoint
3
+ ALTER TABLE "agents" ADD COLUMN IF NOT EXISTS "pinned" boolean;--> statement-breakpoint
4
+ ALTER TABLE "message_groups" ADD COLUMN IF NOT EXISTS "type" text;--> statement-breakpoint
5
+ ALTER TABLE "message_groups" ADD COLUMN IF NOT EXISTS "content" text;--> statement-breakpoint
6
+ ALTER TABLE "message_groups" ADD COLUMN IF NOT EXISTS "editor_data" jsonb;--> statement-breakpoint
7
+ ALTER TABLE "messages" ADD COLUMN IF NOT EXISTS "summary" text;--> statement-breakpoint
8
+ ALTER TABLE "threads" ADD COLUMN IF NOT EXISTS "agent_id" text;--> statement-breakpoint
9
+ ALTER TABLE "threads" ADD COLUMN IF NOT EXISTS "group_id" text;--> statement-breakpoint
10
+ ALTER TABLE "threads" ADD COLUMN IF NOT EXISTS "metadata" jsonb;--> statement-breakpoint
11
+ ALTER TABLE "user_settings" ADD COLUMN IF NOT EXISTS "memory" jsonb;--> statement-breakpoint
12
+ ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "interests" varchar(64)[];--> statement-breakpoint
13
+ ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "onboarding" jsonb;--> statement-breakpoint
14
+ DO $$ BEGIN
15
+ IF NOT EXISTS (SELECT 1 FROM pg_constraint WHERE conname = 'threads_agent_id_agents_id_fk') THEN
16
+ ALTER TABLE "threads" ADD CONSTRAINT "threads_agent_id_agents_id_fk" FOREIGN KEY ("agent_id") REFERENCES "public"."agents"("id") ON DELETE cascade ON UPDATE no action;
17
+ END IF;
18
+ END $$;--> statement-breakpoint
19
+ DO $$ BEGIN
20
+ IF NOT EXISTS (SELECT 1 FROM pg_constraint WHERE conname = 'threads_group_id_chat_groups_id_fk') THEN
21
+ ALTER TABLE "threads" ADD CONSTRAINT "threads_group_id_chat_groups_id_fk" FOREIGN KEY ("group_id") REFERENCES "public"."chat_groups"("id") ON DELETE cascade ON UPDATE no action;
22
+ END IF;
23
+ END $$;--> statement-breakpoint
24
+ CREATE INDEX IF NOT EXISTS "ai_models_user_id_idx" ON "ai_models" USING btree ("user_id");--> statement-breakpoint
25
+ CREATE INDEX IF NOT EXISTS "ai_providers_user_id_idx" ON "ai_providers" USING btree ("user_id");--> statement-breakpoint
26
+ CREATE INDEX IF NOT EXISTS "message_groups_type_idx" ON "message_groups" USING btree ("type");--> statement-breakpoint
27
+ CREATE INDEX IF NOT EXISTS "message_plugins_tool_call_id_idx" ON "message_plugins" USING btree ("tool_call_id");--> statement-breakpoint
28
+ CREATE INDEX IF NOT EXISTS "threads_agent_id_idx" ON "threads" USING btree ("agent_id");--> statement-breakpoint
29
+ CREATE INDEX IF NOT EXISTS "threads_group_id_idx" ON "threads" USING btree ("group_id");--> statement-breakpoint
30
+ ALTER TABLE "user_memories_contexts" DROP COLUMN IF EXISTS "title_vector";
@@ -0,0 +1,7 @@
1
+ ALTER TABLE "agents" ADD COLUMN IF NOT EXISTS "session_group_id" text;--> statement-breakpoint
2
+ DO $$ BEGIN
3
+ IF NOT EXISTS (SELECT 1 FROM pg_constraint WHERE conname = 'agents_session_group_id_session_groups_id_fk') THEN
4
+ ALTER TABLE "agents" ADD CONSTRAINT "agents_session_group_id_session_groups_id_fk" FOREIGN KEY ("session_group_id") REFERENCES "public"."session_groups"("id") ON DELETE set null ON UPDATE no action;
5
+ END IF;
6
+ END $$;--> statement-breakpoint
7
+ CREATE INDEX IF NOT EXISTS "agents_session_group_id_idx" ON "agents" USING btree ("session_group_id");