@lobehub/lobehub 2.0.0-next.376 → 2.0.0-next.378
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 +67 -0
- package/changelog/v1.json +21 -0
- package/docs/development/database-schema.dbml +51 -0
- package/docs/self-hosting/advanced/auth/providers/casdoor.mdx +1 -1
- package/docs/self-hosting/advanced/auth/providers/casdoor.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/auth/providers/logto.mdx +1 -1
- package/docs/self-hosting/advanced/auth/providers/logto.zh-CN.mdx +1 -1
- package/package.json +1 -2
- package/packages/database/migrations/0075_add_user_memory_persona.sql +51 -0
- package/packages/database/migrations/meta/0075_snapshot.json +11957 -0
- package/packages/database/migrations/meta/_journal.json +8 -1
- package/packages/database/src/schemas/userMemories/persona.ts +81 -0
- package/scripts/_shared/checkDeprecatedAuth.js +46 -16
- package/scripts/_shared/checkDeprecatedAuth.test.ts +180 -0
- package/src/app/(backend)/api/webhooks/casdoor/route.ts +1 -2
- package/src/app/(backend)/api/webhooks/logto/route.ts +2 -3
- package/src/app/(backend)/trpc/async/[trpc]/route.ts +1 -2
- package/src/app/(backend)/trpc/mobile/[trpc]/route.ts +1 -2
- package/src/app/[variants]/(main)/agent/profile/features/ProfileEditor/index.tsx +1 -0
- package/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/AgentProfilePopup.tsx +9 -0
- package/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/GroupMember.tsx +27 -2
- package/src/app/[variants]/(main)/home/_layout/Body/Agent/Actions.tsx +1 -1
- package/src/app/[variants]/(main)/home/features/InputArea/SkillInstallBanner.tsx +40 -32
- package/src/app/[variants]/(main)/memory/(home)/index.tsx +1 -1
- package/src/app/[variants]/(main)/memory/contexts/index.tsx +2 -0
- package/src/app/[variants]/(main)/memory/experiences/index.tsx +2 -0
- package/src/app/[variants]/(main)/memory/features/MemoryAnalysis/Action.tsx +13 -2
- package/src/app/[variants]/(main)/memory/features/MemoryAnalysis/AnalysisTrigger.tsx +26 -13
- package/src/app/[variants]/(main)/memory/features/MemoryAnalysis/index.tsx +10 -1
- package/src/app/[variants]/(main)/memory/identities/index.tsx +2 -0
- package/src/app/[variants]/(main)/memory/preferences/index.tsx +2 -0
- package/src/app/[variants]/(main)/resource/library/_layout/Header/LibraryHead.tsx +7 -3
- package/src/app/[variants]/(main)/settings/skill/features/KlavisSkillItem.tsx +30 -30
- package/src/app/[variants]/(main)/settings/skill/features/LobehubSkillItem.tsx +31 -31
- package/src/app/[variants]/(main)/settings/skill/index.tsx +2 -2
- package/src/components/FileParsingStatus/EmbeddingStatus.tsx +3 -16
- package/src/components/FileParsingStatus/index.tsx +2 -15
- package/src/features/ChatInput/ActionBar/Tools/PopoverContent.tsx +1 -3
- package/src/features/ChatInput/ActionBar/Tools/ToolsList.tsx +4 -0
- package/src/features/ChatInput/ActionBar/Tools/index.tsx +1 -10
- package/src/features/ChatInput/ActionBar/Tools/useControls.tsx +41 -16
- package/src/features/ChatInput/ActionBar/components/ActionDropdown.tsx +2 -1
- package/src/features/Conversation/ChatItem/components/Title.tsx +6 -2
- package/src/features/ModelSelect/index.tsx +10 -3
- package/src/features/ProfileEditor/AgentTool.tsx +52 -33
- package/src/features/ProfileEditor/PopoverContent.tsx +28 -61
- package/src/features/SharePopover/index.tsx +3 -3
- package/src/features/SkillStore/CommunityList/Item.tsx +2 -1
- package/src/features/SkillStore/CommunityList/index.tsx +16 -22
- package/src/features/SkillStore/CustomList/Item.tsx +2 -1
- package/src/features/SkillStore/CustomList/index.tsx +11 -31
- package/src/features/SkillStore/LobeHubList/Item.tsx +4 -3
- package/src/features/SkillStore/LobeHubList/index.tsx +2 -18
- package/src/features/SkillStore/Search/index.tsx +1 -1
- package/src/features/SkillStore/index.tsx +6 -3
- package/src/features/SkillStore/style.ts +34 -1
- package/src/libs/next/config/define-config.ts +0 -3
- package/src/server/routers/lambda/agent.ts +1 -2
- package/src/server/services/user/index.ts +1 -2
- package/src/server/services/webhookUser/index.test.ts +290 -0
- package/src/server/services/webhookUser/index.ts +29 -12
- package/src/libs/logger/index.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,73 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.378](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.377...v2.0.0-next.378)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2026-01-25**</sup>
|
|
8
|
+
|
|
9
|
+
#### ♻ Code Refactoring
|
|
10
|
+
|
|
11
|
+
- **misc**: Improve popover trigger styles and component consistency.
|
|
12
|
+
|
|
13
|
+
#### ✨ Features
|
|
14
|
+
|
|
15
|
+
- **database**: Added user memory persona schema.
|
|
16
|
+
|
|
17
|
+
#### 🐛 Bug Fixes
|
|
18
|
+
|
|
19
|
+
- **misc**: Library cannot nav.
|
|
20
|
+
|
|
21
|
+
<br/>
|
|
22
|
+
|
|
23
|
+
<details>
|
|
24
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
25
|
+
|
|
26
|
+
#### Code refactoring
|
|
27
|
+
|
|
28
|
+
- **misc**: Improve popover trigger styles and component consistency, closes [#11832](https://github.com/lobehub/lobe-chat/issues/11832) ([f5c5d52](https://github.com/lobehub/lobe-chat/commit/f5c5d52))
|
|
29
|
+
|
|
30
|
+
#### What's improved
|
|
31
|
+
|
|
32
|
+
- **database**: Added user memory persona schema, closes [#11833](https://github.com/lobehub/lobe-chat/issues/11833) ([14adf99](https://github.com/lobehub/lobe-chat/commit/14adf99))
|
|
33
|
+
|
|
34
|
+
#### What's fixed
|
|
35
|
+
|
|
36
|
+
- **misc**: Library cannot nav, closes [#11828](https://github.com/lobehub/lobe-chat/issues/11828) ([d424a81](https://github.com/lobehub/lobe-chat/commit/d424a81))
|
|
37
|
+
|
|
38
|
+
</details>
|
|
39
|
+
|
|
40
|
+
<div align="right">
|
|
41
|
+
|
|
42
|
+
[](#readme-top)
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
## [Version 2.0.0-next.377](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.376...v2.0.0-next.377)
|
|
47
|
+
|
|
48
|
+
<sup>Released on **2026-01-25**</sup>
|
|
49
|
+
|
|
50
|
+
#### 🐛 Bug Fixes
|
|
51
|
+
|
|
52
|
+
- **misc**: Show fallback title for custom assistant in chat messages, webhook user service compatibility for old nextauth users.
|
|
53
|
+
|
|
54
|
+
<br/>
|
|
55
|
+
|
|
56
|
+
<details>
|
|
57
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
58
|
+
|
|
59
|
+
#### What's fixed
|
|
60
|
+
|
|
61
|
+
- **misc**: Show fallback title for custom assistant in chat messages, closes [#11820](https://github.com/lobehub/lobe-chat/issues/11820) ([0c96b5a](https://github.com/lobehub/lobe-chat/commit/0c96b5a))
|
|
62
|
+
- **misc**: Webhook user service compatibility for old nextauth users, closes [#11826](https://github.com/lobehub/lobe-chat/issues/11826) ([a6bfaab](https://github.com/lobehub/lobe-chat/commit/a6bfaab))
|
|
63
|
+
|
|
64
|
+
</details>
|
|
65
|
+
|
|
66
|
+
<div align="right">
|
|
67
|
+
|
|
68
|
+
[](#readme-top)
|
|
69
|
+
|
|
70
|
+
</div>
|
|
71
|
+
|
|
5
72
|
## [Version 2.0.0-next.376](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.375...v2.0.0-next.376)
|
|
6
73
|
|
|
7
74
|
<sup>Released on **2026-01-25**</sup>
|
package/changelog/v1.json
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"children": {
|
|
4
|
+
"improvements": [
|
|
5
|
+
"Improve popover trigger styles and component consistency."
|
|
6
|
+
],
|
|
7
|
+
"fixes": [
|
|
8
|
+
"Library cannot nav."
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"date": "2026-01-25",
|
|
12
|
+
"version": "2.0.0-next.378"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"children": {
|
|
16
|
+
"fixes": [
|
|
17
|
+
"Show fallback title for custom assistant in chat messages, webhook user service compatibility for old nextauth users."
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"date": "2026-01-25",
|
|
21
|
+
"version": "2.0.0-next.377"
|
|
22
|
+
},
|
|
2
23
|
{
|
|
3
24
|
"children": {
|
|
4
25
|
"improvements": [
|
|
@@ -1471,6 +1471,57 @@ table user_memories_preferences {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
1473
|
|
|
1474
|
+
table user_memory_persona_document_histories {
|
|
1475
|
+
id varchar(255) [pk, not null]
|
|
1476
|
+
user_id text
|
|
1477
|
+
persona_id varchar(255)
|
|
1478
|
+
profile varchar(255) [not null, default: 'default']
|
|
1479
|
+
snapshot_persona text
|
|
1480
|
+
snapshot_tagline text
|
|
1481
|
+
reasoning text
|
|
1482
|
+
diff_persona text
|
|
1483
|
+
diff_tagline text
|
|
1484
|
+
snapshot text
|
|
1485
|
+
summary text
|
|
1486
|
+
edited_by varchar(255) [default: 'agent']
|
|
1487
|
+
memory_ids jsonb
|
|
1488
|
+
source_ids jsonb
|
|
1489
|
+
metadata jsonb
|
|
1490
|
+
previous_version integer
|
|
1491
|
+
next_version integer
|
|
1492
|
+
captured_at "timestamp with time zone" [not null, default: `now()`]
|
|
1493
|
+
accessed_at "timestamp with time zone" [not null, default: `now()`]
|
|
1494
|
+
created_at "timestamp with time zone" [not null, default: `now()`]
|
|
1495
|
+
updated_at "timestamp with time zone" [not null, default: `now()`]
|
|
1496
|
+
|
|
1497
|
+
indexes {
|
|
1498
|
+
persona_id [name: 'user_persona_document_histories_persona_id_index']
|
|
1499
|
+
user_id [name: 'user_persona_document_histories_user_id_index']
|
|
1500
|
+
profile [name: 'user_persona_document_histories_profile_index']
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
table user_memory_persona_documents {
|
|
1505
|
+
id varchar(255) [pk, not null]
|
|
1506
|
+
user_id text
|
|
1507
|
+
profile varchar(255) [not null, default: 'default']
|
|
1508
|
+
tagline text
|
|
1509
|
+
persona text
|
|
1510
|
+
memory_ids jsonb
|
|
1511
|
+
source_ids jsonb
|
|
1512
|
+
metadata jsonb
|
|
1513
|
+
version integer [not null, default: 1]
|
|
1514
|
+
captured_at "timestamp with time zone" [not null, default: `now()`]
|
|
1515
|
+
accessed_at "timestamp with time zone" [not null, default: `now()`]
|
|
1516
|
+
created_at "timestamp with time zone" [not null, default: `now()`]
|
|
1517
|
+
updated_at "timestamp with time zone" [not null, default: `now()`]
|
|
1518
|
+
|
|
1519
|
+
indexes {
|
|
1520
|
+
(user_id, profile) [name: 'user_persona_documents_user_id_profile_unique', unique]
|
|
1521
|
+
user_id [name: 'user_persona_documents_user_id_index']
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1474
1525
|
ref: accounts.user_id > users.id
|
|
1475
1526
|
|
|
1476
1527
|
ref: passkey.userId > users.id
|
|
@@ -56,7 +56,7 @@ tags:
|
|
|
56
56
|
|
|
57
57
|
> Available in Casdoor `>=1.843.0`.
|
|
58
58
|
|
|
59
|
-
Configure Casdoor Webhook to sync user data updates to LobeChat.
|
|
59
|
+
Configure Casdoor [Webhook](https://www.casdoor.org/docs/webhooks/overview#setting-up-a-webhook) to sync user data updates to LobeChat.
|
|
60
60
|
|
|
61
61
|
1. Go to **Admin Tools** -> **Webhooks** and create a Webhook
|
|
62
62
|
2. Fill in the following fields:
|
|
@@ -54,7 +54,7 @@ tags:
|
|
|
54
54
|
|
|
55
55
|
> 在 Casdoor `>=1.843.0` 上可用。
|
|
56
56
|
|
|
57
|
-
配置 Casdoor 的 Webhook 以便在用户信息更新时同步到 LobeChat。
|
|
57
|
+
配置 Casdoor 的 [Webhook](https://www.casdoor.org/docs/webhooks/overview#setting-up-a-webhook) 以便在用户信息更新时同步到 LobeChat。
|
|
58
58
|
|
|
59
59
|
1. 前往 `管理工具` -> `Webhooks`,创建一个 Webhook
|
|
60
60
|
2. 填写以下字段:
|
|
@@ -56,7 +56,7 @@ tags:
|
|
|
56
56
|
|
|
57
57
|
### Configure Webhook (Optional)
|
|
58
58
|
|
|
59
|
-
Configure Logto Webhook to sync user data updates to LobeChat.
|
|
59
|
+
Configure Logto [Webhook](https://docs.logto.io/developers/webhooks/configure-webhooks) to sync user data updates to LobeChat.
|
|
60
60
|
|
|
61
61
|
1. Go to **Webhooks** in Logto Console and create a Webhook
|
|
62
62
|
2. Fill in the following fields:
|
|
@@ -54,7 +54,7 @@ tags:
|
|
|
54
54
|
|
|
55
55
|
### 配置 Webhook(可选)
|
|
56
56
|
|
|
57
|
-
配置 Logto 的 Webhook,以便在用户信息更新时 LobeChat 可以接收到通知并同步数据。
|
|
57
|
+
配置 Logto 的 [Webhook](https://docs.logto.io/developers/webhooks/configure-webhooks),以便在用户信息更新时 LobeChat 可以接收到通知并同步数据。
|
|
58
58
|
|
|
59
59
|
1. 前往 Logto 控制台的 `Webhooks`,创建一个 Webhook
|
|
60
60
|
2. 填写以下字段:
|
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.378",
|
|
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",
|
|
@@ -299,7 +299,6 @@
|
|
|
299
299
|
"pdfjs-dist": "5.4.530",
|
|
300
300
|
"pdfkit": "^0.17.2",
|
|
301
301
|
"pg": "^8.17.2",
|
|
302
|
-
"pino": "^10.3.0",
|
|
303
302
|
"plaiceholder": "^3.0.0",
|
|
304
303
|
"polished": "^4.3.1",
|
|
305
304
|
"posthog-js": "~1.278.0",
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS "user_memory_persona_document_histories" (
|
|
2
|
+
"id" varchar(255) PRIMARY KEY NOT NULL,
|
|
3
|
+
"user_id" text,
|
|
4
|
+
"persona_id" varchar(255),
|
|
5
|
+
"profile" varchar(255) DEFAULT 'default' NOT NULL,
|
|
6
|
+
"snapshot_persona" text,
|
|
7
|
+
"snapshot_tagline" text,
|
|
8
|
+
"reasoning" text,
|
|
9
|
+
"diff_persona" text,
|
|
10
|
+
"diff_tagline" text,
|
|
11
|
+
"snapshot" text,
|
|
12
|
+
"summary" text,
|
|
13
|
+
"edited_by" varchar(255) DEFAULT 'agent',
|
|
14
|
+
"memory_ids" jsonb,
|
|
15
|
+
"source_ids" jsonb,
|
|
16
|
+
"metadata" jsonb,
|
|
17
|
+
"previous_version" integer,
|
|
18
|
+
"next_version" integer,
|
|
19
|
+
"captured_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
20
|
+
"accessed_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
21
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
22
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
23
|
+
);
|
|
24
|
+
--> statement-breakpoint
|
|
25
|
+
CREATE TABLE IF NOT EXISTS "user_memory_persona_documents" (
|
|
26
|
+
"id" varchar(255) PRIMARY KEY NOT NULL,
|
|
27
|
+
"user_id" text,
|
|
28
|
+
"profile" varchar(255) DEFAULT 'default' NOT NULL,
|
|
29
|
+
"tagline" text,
|
|
30
|
+
"persona" text,
|
|
31
|
+
"memory_ids" jsonb,
|
|
32
|
+
"source_ids" jsonb,
|
|
33
|
+
"metadata" jsonb,
|
|
34
|
+
"version" integer DEFAULT 1 NOT NULL,
|
|
35
|
+
"captured_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
36
|
+
"accessed_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
37
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
38
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
39
|
+
);
|
|
40
|
+
--> statement-breakpoint
|
|
41
|
+
ALTER TABLE "user_memory_persona_document_histories" DROP CONSTRAINT IF EXISTS "user_memory_persona_document_histories_user_id_users_id_fk";--> statement-breakpoint
|
|
42
|
+
ALTER TABLE "user_memory_persona_document_histories" ADD CONSTRAINT "user_memory_persona_document_histories_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
43
|
+
ALTER TABLE "user_memory_persona_document_histories" DROP CONSTRAINT IF EXISTS "user_memory_persona_document_histories_persona_id_user_memory_persona_documents_id_fk";--> statement-breakpoint
|
|
44
|
+
ALTER TABLE "user_memory_persona_document_histories" ADD CONSTRAINT "user_memory_persona_document_histories_persona_id_user_memory_persona_documents_id_fk" FOREIGN KEY ("persona_id") REFERENCES "public"."user_memory_persona_documents"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
45
|
+
CREATE INDEX IF NOT EXISTS "user_persona_document_histories_persona_id_index" ON "user_memory_persona_document_histories" USING btree ("persona_id");--> statement-breakpoint
|
|
46
|
+
CREATE INDEX IF NOT EXISTS "user_persona_document_histories_user_id_index" ON "user_memory_persona_document_histories" USING btree ("user_id");--> statement-breakpoint
|
|
47
|
+
CREATE INDEX IF NOT EXISTS "user_persona_document_histories_profile_index" ON "user_memory_persona_document_histories" USING btree ("profile");--> statement-breakpoint
|
|
48
|
+
ALTER TABLE "user_memory_persona_documents" DROP CONSTRAINT IF EXISTS "user_memory_persona_documents_user_id_users_id_fk";--> statement-breakpoint
|
|
49
|
+
ALTER TABLE "user_memory_persona_documents" ADD CONSTRAINT "user_memory_persona_documents_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
50
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "user_persona_documents_user_id_profile_unique" ON "user_memory_persona_documents" USING btree ("user_id","profile");--> statement-breakpoint
|
|
51
|
+
CREATE INDEX IF NOT EXISTS "user_persona_documents_user_id_index" ON "user_memory_persona_documents" USING btree ("user_id");
|