@lobehub/lobehub 2.0.0-next.172 â 2.0.0-next.174
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/.cursor/rules/db-migrations.mdc +10 -4
- package/.cursor/rules/drizzle-schema-style-guide.mdc +33 -17
- package/.cursor/rules/hotkey.mdc +161 -0
- package/.cursor/rules/i18n.mdc +2 -5
- package/.cursor/rules/project-introduce.mdc +3 -2
- package/.cursor/rules/project-structure.mdc +33 -37
- package/.cursor/rules/react.mdc +155 -0
- package/.cursor/rules/recent-data-usage.mdc +138 -0
- package/.cursor/rules/rules-index.mdc +1 -1
- package/.cursor/rules/testing-guide/agent-runtime-e2e.mdc +285 -0
- package/.cursor/rules/testing-guide/zustand-store-action-test.mdc +11 -16
- package/.cursor/rules/typescript.mdc +0 -4
- package/.cursor/rules/zustand-action-patterns.mdc +137 -169
- package/.cursor/rules/zustand-slice-organization.mdc +16 -8
- package/.husky/pre-commit +1 -1
- package/.i18nrc.js +3 -1
- package/AGENTS.md +3 -2
- package/CHANGELOG.md +50 -0
- package/CLAUDE.md +10 -3
- package/GEMINI.md +2 -1
- package/README.md +3 -3
- package/README.zh-CN.md +6 -6
- package/changelog/v1.json +18 -0
- package/docs/development/database-schema.dbml +18 -3
- package/docs/development/state-management/state-management-selectors.mdx +1 -1
- package/glossary.json +8 -0
- package/package.json +3 -3
- package/packages/database/migrations/0063_add_columns_for_several_tables.sql +30 -0
- package/packages/database/migrations/meta/0063_snapshot.json +9113 -0
- package/packages/database/migrations/meta/_journal.json +7 -0
- package/packages/database/src/core/migrations.json +29 -0
- package/packages/database/src/schemas/_helpers.ts +5 -1
- package/packages/database/src/schemas/agent.ts +2 -1
- package/packages/database/src/schemas/aiInfra.ts +18 -3
- package/packages/database/src/schemas/message.ts +11 -6
- package/packages/database/src/schemas/topic.ts +17 -2
- package/packages/database/src/schemas/user.ts +5 -2
- package/packages/database/src/schemas/userMemories.ts +9 -8
- package/packages/model-runtime/src/core/contextBuilders/openai.ts +8 -2
- package/packages/model-runtime/src/providers/github/index.test.ts +4 -4
- package/packages/types/src/topic/thread.ts +24 -0
- package/packages/types/src/user/index.ts +1 -0
- package/packages/types/src/user/onboarding.ts +16 -0
- package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/List.tsx +5 -2
- package/src/store/agent/slices/chat/action.ts +3 -3
- package/vitest.config.mts +3 -0
- package/.cursor/rules/group-chat.mdc +0 -35
- 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
|
|
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
|
|
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
|
|
50
|
+
- use `bun run type-check` to check type errors.
|
|
50
51
|
|
|
51
52
|
### i18n
|
|
52
53
|
|
package/README.md
CHANGED
|
@@ -352,7 +352,7 @@ In addition, these plugins are not limited to news aggregation, but can also ext
|
|
|
352
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
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` |
|
|
354
354
|
|
|
355
|
-
> đ Total plugins: [<kbd>**
|
|
355
|
+
> đ Total plugins: [<kbd>**39**</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://
|
|
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://
|
|
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-
|
|
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]
|
|
@@ -345,7 +345,7 @@ LobeChat çćäťśçćçłťçťćŻĺ
ść ¸ĺżĺč˝çéčŚćŠĺąďźĺŽć大ĺ°
|
|
|
345
345
|
| [Git OSS Stats](https://lobechat.com/discover/plugin/gitUserRepoStats)<br/><sup>By **yunwei37** on **2025-12-13**</sup> | ĺ¨ćçćĺĺćĺźćşč˝Żäťśäťĺşĺĺźĺč
ççťčŽĄć°ćŽĺĺĺ˛čްĺ˝ă<br/>`github` `oss` |
|
|
346
346
|
| [Questmate Forms](https://lobechat.com/discover/plugin/questmate)<br/><sup>By **questmate** on **2025-12-13**</sup> | ĺ坺襨ĺăć¸
ĺĺ塼ä˝ćľç¨ďźć䝏称äšä¸şäťťĺĄďźďźďźć¨ĺŻäťĽĺé
ăĺŽććĺ
Źĺźă<br/>`襨ĺ` `ć¸
ĺ` `çäş§ĺ` |
|
|
347
347
|
|
|
348
|
-
> đ Total plugins: [<kbd>**
|
|
348
|
+
> đ Total plugins: [<kbd>**39**</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-
|
|
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://
|
|
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-
|
|
862
|
-
[docs-lighthouse]: https://
|
|
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,22 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"children": {
|
|
4
|
+
"improvements": [
|
|
5
|
+
"Refactor database schema."
|
|
6
|
+
]
|
|
7
|
+
},
|
|
8
|
+
"date": "2025-12-20",
|
|
9
|
+
"version": "2.0.0-next.174"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"children": {
|
|
13
|
+
"fixes": [
|
|
14
|
+
"Request to gpt5 series should not with top_p, temperature when reasoning effort is not none."
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"date": "2025-12-16",
|
|
18
|
+
"version": "2.0.0-next.173"
|
|
19
|
+
},
|
|
2
20
|
{
|
|
3
21
|
"children": {
|
|
4
22
|
"improvements": [
|
|
@@ -8,7 +8,7 @@ table agents {
|
|
|
8
8
|
avatar text
|
|
9
9
|
background_color text
|
|
10
10
|
market_identifier text
|
|
11
|
-
plugins jsonb
|
|
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
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.174",
|
|
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
|
|
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
|
-
"
|
|
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";
|