@lobehub/lobehub 2.0.0-next.244 → 2.0.0-next.246
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/.github/workflows/bundle-analyzer.yml +2 -2
- package/CHANGELOG.md +58 -0
- package/apps/desktop/build/Icon-beta.Assets.car +0 -0
- package/changelog/v1.json +18 -0
- package/docs/development/database-schema.dbml +34 -1
- package/package.json +2 -2
- package/packages/database/migrations/0067_add_agent_cron_tables.sql +54 -0
- package/packages/database/migrations/meta/0067_snapshot.json +10238 -0
- package/packages/database/migrations/meta/_journal.json +8 -1
- package/packages/database/src/models/__tests__/topics/topic.create.test.ts +4 -0
- package/packages/database/src/models/agentCronJob.ts +286 -0
- package/packages/database/src/schemas/agentCronJob.ts +138 -0
- package/packages/database/src/schemas/index.ts +1 -0
- package/packages/database/src/schemas/topic.ts +2 -0
- package/packages/database/src/utils/idGenerator.ts +1 -0
- package/src/app/[variants]/(main)/chat/_layout/Sidebar/Header/Agent/SwitchPanel.tsx +1 -0
- package/src/app/[variants]/(main)/chat/features/Conversation/Header/HeaderActions/index.tsx +1 -1
- package/src/features/ChatInput/ActionBar/Knowledge/useControls.tsx +1 -1
- package/src/features/ChatInput/ActionBar/Tools/PopoverContent.tsx +92 -0
- package/src/features/ChatInput/ActionBar/Tools/ToolItem.tsx +2 -1
- package/src/features/ChatInput/ActionBar/Tools/ToolsList.tsx +107 -0
- package/src/features/ChatInput/ActionBar/Tools/index.tsx +17 -74
- package/src/features/ChatInput/ActionBar/Tools/useControls.tsx +2 -20
- package/src/features/ChatInput/ActionBar/Upload/ServerMode.tsx +1 -1
- package/src/features/ChatInput/ActionBar/components/ActionPopover.tsx +1 -0
- package/src/features/ChatInput/ActionBar/components/CheckboxWithLoading.tsx +60 -0
- package/src/features/ModelSwitchPanel/index.tsx +1 -0
- package/src/features/ChatInput/ActionBar/components/CheckbokWithLoading.tsx +0 -53
|
@@ -55,9 +55,9 @@ jobs:
|
|
|
55
55
|
run: echo "secret=$(openssl rand -base64 32)" >> $GITHUB_OUTPUT
|
|
56
56
|
|
|
57
57
|
- name: Build with bundle analyzer
|
|
58
|
-
run:
|
|
58
|
+
run: npm run build:analyze || true
|
|
59
59
|
env:
|
|
60
|
-
NODE_OPTIONS: --max-old-space-size=
|
|
60
|
+
NODE_OPTIONS: --max-old-space-size=81920
|
|
61
61
|
KEY_VAULTS_SECRET: ${{ secrets.KEY_VAULTS_SECRET || steps.generate-secret.outputs.secret }}
|
|
62
62
|
|
|
63
63
|
- name: Prepare analyzer reports
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.246](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.245...v2.0.0-next.246)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2026-01-09**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Generate `agent_cron_jobs` in agents.
|
|
12
|
+
|
|
13
|
+
#### 💄 Styles
|
|
14
|
+
|
|
15
|
+
- **desktop**: Update macOS beta icon assets.
|
|
16
|
+
|
|
17
|
+
<br/>
|
|
18
|
+
|
|
19
|
+
<details>
|
|
20
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
21
|
+
|
|
22
|
+
#### What's improved
|
|
23
|
+
|
|
24
|
+
- **misc**: Generate `agent_cron_jobs` in agents, closes [#11349](https://github.com/lobehub/lobe-chat/issues/11349) ([eefb6cb](https://github.com/lobehub/lobe-chat/commit/eefb6cb))
|
|
25
|
+
|
|
26
|
+
#### Styles
|
|
27
|
+
|
|
28
|
+
- **desktop**: Update macOS beta icon assets, closes [#11368](https://github.com/lobehub/lobe-chat/issues/11368) ([3623e58](https://github.com/lobehub/lobe-chat/commit/3623e58))
|
|
29
|
+
|
|
30
|
+
</details>
|
|
31
|
+
|
|
32
|
+
<div align="right">
|
|
33
|
+
|
|
34
|
+
[](#readme-top)
|
|
35
|
+
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
## [Version 2.0.0-next.245](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.244...v2.0.0-next.245)
|
|
39
|
+
|
|
40
|
+
<sup>Released on **2026-01-09**</sup>
|
|
41
|
+
|
|
42
|
+
#### ♻ Code Refactoring
|
|
43
|
+
|
|
44
|
+
- **misc**: Improve Tools popover component structure and fix UI consistency.
|
|
45
|
+
|
|
46
|
+
<br/>
|
|
47
|
+
|
|
48
|
+
<details>
|
|
49
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
50
|
+
|
|
51
|
+
#### Code refactoring
|
|
52
|
+
|
|
53
|
+
- **misc**: Improve Tools popover component structure and fix UI consistency, closes [#11356](https://github.com/lobehub/lobe-chat/issues/11356) ([f46837a](https://github.com/lobehub/lobe-chat/commit/f46837a))
|
|
54
|
+
|
|
55
|
+
</details>
|
|
56
|
+
|
|
57
|
+
<div align="right">
|
|
58
|
+
|
|
59
|
+
[](#readme-top)
|
|
60
|
+
|
|
61
|
+
</div>
|
|
62
|
+
|
|
5
63
|
## [Version 2.0.0-next.244](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.243...v2.0.0-next.244)
|
|
6
64
|
|
|
7
65
|
<sup>Released on **2026-01-08**</sup>
|
|
Binary file
|
package/changelog/v1.json
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"children": {
|
|
4
|
+
"features": [
|
|
5
|
+
"Generate agent_cron_jobs in agents."
|
|
6
|
+
]
|
|
7
|
+
},
|
|
8
|
+
"date": "2026-01-09",
|
|
9
|
+
"version": "2.0.0-next.246"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"children": {
|
|
13
|
+
"improvements": [
|
|
14
|
+
"Improve Tools popover component structure and fix UI consistency."
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"date": "2026-01-09",
|
|
18
|
+
"version": "2.0.0-next.245"
|
|
19
|
+
},
|
|
2
20
|
{
|
|
3
21
|
"children": {},
|
|
4
22
|
"date": "2026-01-08",
|
|
@@ -67,6 +67,37 @@ table agents_knowledge_bases {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
table agent_cron_jobs {
|
|
71
|
+
id text [pk, not null]
|
|
72
|
+
agent_id text [not null]
|
|
73
|
+
group_id text
|
|
74
|
+
user_id text [not null]
|
|
75
|
+
name text
|
|
76
|
+
description text
|
|
77
|
+
enabled boolean [default: true]
|
|
78
|
+
cron_pattern text [not null]
|
|
79
|
+
timezone text [default: 'UTC']
|
|
80
|
+
content text [not null]
|
|
81
|
+
edit_data jsonb
|
|
82
|
+
max_executions integer
|
|
83
|
+
remaining_executions integer
|
|
84
|
+
execution_conditions jsonb
|
|
85
|
+
last_executed_at timestamp
|
|
86
|
+
total_executions integer [default: 0]
|
|
87
|
+
accessed_at "timestamp with time zone" [not null, default: `now()`]
|
|
88
|
+
created_at "timestamp with time zone" [not null, default: `now()`]
|
|
89
|
+
updated_at "timestamp with time zone" [not null, default: `now()`]
|
|
90
|
+
|
|
91
|
+
indexes {
|
|
92
|
+
agent_id [name: 'agent_cron_jobs_agent_id_idx']
|
|
93
|
+
group_id [name: 'agent_cron_jobs_group_id_idx']
|
|
94
|
+
user_id [name: 'agent_cron_jobs_user_id_idx']
|
|
95
|
+
enabled [name: 'agent_cron_jobs_enabled_idx']
|
|
96
|
+
remaining_executions [name: 'agent_cron_jobs_remaining_executions_idx']
|
|
97
|
+
last_executed_at [name: 'agent_cron_jobs_last_executed_at_idx']
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
70
101
|
table ai_models {
|
|
71
102
|
id varchar(150) [not null]
|
|
72
103
|
display_name varchar(200)
|
|
@@ -269,7 +300,6 @@ table chat_groups_agents {
|
|
|
269
300
|
|
|
270
301
|
table documents {
|
|
271
302
|
id varchar(255) [pk, not null]
|
|
272
|
-
slug varchar(255)
|
|
273
303
|
title text
|
|
274
304
|
description text
|
|
275
305
|
content text
|
|
@@ -287,6 +317,7 @@ table documents {
|
|
|
287
317
|
user_id text [not null]
|
|
288
318
|
client_id text
|
|
289
319
|
editor_data jsonb
|
|
320
|
+
slug varchar(255)
|
|
290
321
|
accessed_at "timestamp with time zone" [not null, default: `now()`]
|
|
291
322
|
created_at "timestamp with time zone" [not null, default: `now()`]
|
|
292
323
|
updated_at "timestamp with time zone" [not null, default: `now()`]
|
|
@@ -1071,6 +1102,8 @@ table topics {
|
|
|
1071
1102
|
client_id text
|
|
1072
1103
|
history_summary text
|
|
1073
1104
|
metadata jsonb
|
|
1105
|
+
trigger text
|
|
1106
|
+
mode text
|
|
1074
1107
|
accessed_at "timestamp with time zone" [not null, default: `now()`]
|
|
1075
1108
|
created_at "timestamp with time zone" [not null, default: `now()`]
|
|
1076
1109
|
updated_at "timestamp with time zone" [not null, default: `now()`]
|
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.246",
|
|
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",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"postbuild": "npm run build-sitemap && npm run build-migrate-db",
|
|
38
38
|
"build-migrate-db": "bun run db:migrate",
|
|
39
39
|
"build-sitemap": "tsx ./scripts/buildSitemapIndex/index.ts",
|
|
40
|
-
"build:analyze": "NODE_OPTIONS=--max-old-space-size=
|
|
40
|
+
"build:analyze": "NODE_OPTIONS=--max-old-space-size=81920 ANALYZE=true next build --webpack",
|
|
41
41
|
"build:docker": "npm run prebuild && NODE_OPTIONS=--max-old-space-size=8192 DOCKER=true next build --webpack && npm run build-sitemap",
|
|
42
42
|
"build:electron": "cross-env NODE_OPTIONS=--max-old-space-size=8192 NEXT_PUBLIC_IS_DESKTOP_APP=1 tsx scripts/electronWorkflow/buildNextApp.mts",
|
|
43
43
|
"build:vercel": "npm run prebuild && cross-env NODE_OPTIONS=--max-old-space-size=6144 next build --webpack && npm run postbuild",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS "agent_cron_jobs" (
|
|
2
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
3
|
+
"agent_id" text NOT NULL,
|
|
4
|
+
"group_id" text,
|
|
5
|
+
"user_id" text NOT NULL,
|
|
6
|
+
"name" text,
|
|
7
|
+
"description" text,
|
|
8
|
+
"enabled" boolean DEFAULT true,
|
|
9
|
+
"cron_pattern" text NOT NULL,
|
|
10
|
+
"timezone" text DEFAULT 'UTC',
|
|
11
|
+
"content" text NOT NULL,
|
|
12
|
+
"edit_data" jsonb,
|
|
13
|
+
"max_executions" integer,
|
|
14
|
+
"remaining_executions" integer,
|
|
15
|
+
"execution_conditions" jsonb,
|
|
16
|
+
"last_executed_at" timestamp,
|
|
17
|
+
"total_executions" integer DEFAULT 0,
|
|
18
|
+
"accessed_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
19
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
20
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
21
|
+
);
|
|
22
|
+
--> statement-breakpoint
|
|
23
|
+
ALTER TABLE "topics" ADD COLUMN IF NOT EXISTS "trigger" text;--> statement-breakpoint
|
|
24
|
+
ALTER TABLE "topics" ADD COLUMN IF NOT EXISTS "mode" text;--> statement-breakpoint
|
|
25
|
+
DO $$ BEGIN
|
|
26
|
+
IF NOT EXISTS (
|
|
27
|
+
SELECT 1 FROM pg_constraint
|
|
28
|
+
WHERE conname = 'agent_cron_jobs_agent_id_agents_id_fk'
|
|
29
|
+
) THEN
|
|
30
|
+
ALTER TABLE "agent_cron_jobs" ADD CONSTRAINT "agent_cron_jobs_agent_id_agents_id_fk" FOREIGN KEY ("agent_id") REFERENCES "public"."agents"("id") ON DELETE cascade ON UPDATE no action;
|
|
31
|
+
END IF;
|
|
32
|
+
END $$;--> statement-breakpoint
|
|
33
|
+
DO $$ BEGIN
|
|
34
|
+
IF NOT EXISTS (
|
|
35
|
+
SELECT 1 FROM pg_constraint
|
|
36
|
+
WHERE conname = 'agent_cron_jobs_group_id_chat_groups_id_fk'
|
|
37
|
+
) THEN
|
|
38
|
+
ALTER TABLE "agent_cron_jobs" ADD CONSTRAINT "agent_cron_jobs_group_id_chat_groups_id_fk" FOREIGN KEY ("group_id") REFERENCES "public"."chat_groups"("id") ON DELETE cascade ON UPDATE no action;
|
|
39
|
+
END IF;
|
|
40
|
+
END $$;--> statement-breakpoint
|
|
41
|
+
DO $$ BEGIN
|
|
42
|
+
IF NOT EXISTS (
|
|
43
|
+
SELECT 1 FROM pg_constraint
|
|
44
|
+
WHERE conname = 'agent_cron_jobs_user_id_users_id_fk'
|
|
45
|
+
) THEN
|
|
46
|
+
ALTER TABLE "agent_cron_jobs" ADD CONSTRAINT "agent_cron_jobs_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
|
|
47
|
+
END IF;
|
|
48
|
+
END $$;--> statement-breakpoint
|
|
49
|
+
CREATE INDEX IF NOT EXISTS "agent_cron_jobs_agent_id_idx" ON "agent_cron_jobs" USING btree ("agent_id");--> statement-breakpoint
|
|
50
|
+
CREATE INDEX IF NOT EXISTS "agent_cron_jobs_group_id_idx" ON "agent_cron_jobs" USING btree ("group_id");--> statement-breakpoint
|
|
51
|
+
CREATE INDEX IF NOT EXISTS "agent_cron_jobs_user_id_idx" ON "agent_cron_jobs" USING btree ("user_id");--> statement-breakpoint
|
|
52
|
+
CREATE INDEX IF NOT EXISTS "agent_cron_jobs_enabled_idx" ON "agent_cron_jobs" USING btree ("enabled");--> statement-breakpoint
|
|
53
|
+
CREATE INDEX IF NOT EXISTS "agent_cron_jobs_remaining_executions_idx" ON "agent_cron_jobs" USING btree ("remaining_executions");--> statement-breakpoint
|
|
54
|
+
CREATE INDEX IF NOT EXISTS "agent_cron_jobs_last_executed_at_idx" ON "agent_cron_jobs" USING btree ("last_executed_at");
|