@lobehub/lobehub 2.0.0-next.269 → 2.0.0-next.270
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 +33 -0
- package/changelog/v1.json +5 -0
- package/locales/ar/common.json +3 -1
- package/locales/ar/discover.json +2 -0
- package/locales/ar/onboarding.json +4 -4
- package/locales/bg-BG/discover.json +2 -0
- package/locales/bg-BG/onboarding.json +4 -4
- package/locales/de-DE/discover.json +2 -0
- package/locales/de-DE/onboarding.json +0 -3
- package/locales/en-US/common.json +2 -0
- package/locales/en-US/discover.json +2 -0
- package/locales/en-US/onboarding.json +3 -3
- package/locales/es-ES/discover.json +2 -0
- package/locales/es-ES/onboarding.json +0 -3
- package/locales/fa-IR/discover.json +2 -0
- package/locales/fa-IR/onboarding.json +0 -3
- package/locales/fr-FR/discover.json +2 -0
- package/locales/fr-FR/onboarding.json +0 -3
- package/locales/it-IT/discover.json +2 -0
- package/locales/it-IT/onboarding.json +0 -3
- package/locales/ja-JP/discover.json +2 -0
- package/locales/ja-JP/onboarding.json +0 -3
- package/locales/ko-KR/discover.json +2 -0
- package/locales/ko-KR/onboarding.json +0 -3
- package/locales/nl-NL/discover.json +2 -0
- package/locales/nl-NL/onboarding.json +0 -3
- package/locales/pl-PL/discover.json +2 -0
- package/locales/pl-PL/onboarding.json +0 -3
- package/locales/pt-BR/discover.json +2 -0
- package/locales/pt-BR/onboarding.json +0 -3
- package/locales/ru-RU/discover.json +2 -0
- package/locales/ru-RU/onboarding.json +0 -3
- package/locales/tr-TR/discover.json +2 -0
- package/locales/tr-TR/onboarding.json +0 -3
- package/locales/vi-VN/discover.json +2 -0
- package/locales/vi-VN/onboarding.json +0 -3
- package/locales/zh-CN/common.json +2 -0
- package/locales/zh-CN/discover.json +2 -0
- package/locales/zh-CN/onboarding.json +0 -3
- package/locales/zh-TW/discover.json +2 -0
- package/locales/zh-TW/onboarding.json +0 -3
- package/package.json +1 -1
- package/packages/database/src/repositories/search/index.ts +108 -8
- package/packages/database/src/schemas/agentCronJob.ts +6 -104
- package/packages/types/src/agentCronJob/index.ts +115 -0
- package/packages/types/src/discover/assistants.ts +4 -2
- package/packages/types/src/index.ts +1 -0
- package/src/app/[variants]/(main)/community/(list)/(home)/index.tsx +2 -1
- package/src/app/[variants]/(main)/community/(list)/assistant/features/Category/useCategory.tsx +6 -0
- package/src/app/[variants]/(main)/community/(list)/assistant/index.tsx +2 -2
- package/src/app/[variants]/(main)/community/(list)/features/SortButton/index.tsx +4 -0
- package/src/features/CommandMenu/SearchResults.tsx +27 -0
- package/src/features/CommandMenu/utils/queryParser.ts +1 -0
- package/src/locales/default/common.ts +2 -0
- package/src/locales/default/discover.ts +2 -0
- package/src/locales/default/onboarding.ts +3 -3
- package/src/server/routers/lambda/agentCronJob.ts +10 -10
- package/src/server/routers/lambda/search.ts +13 -3
|
@@ -148,6 +148,8 @@ export default {
|
|
|
148
148
|
'cmdk.search.communityAgent': 'Community Agent',
|
|
149
149
|
'cmdk.search.file': 'File',
|
|
150
150
|
'cmdk.search.files': 'Files',
|
|
151
|
+
'cmdk.search.folder': 'Folder',
|
|
152
|
+
'cmdk.search.folders': 'Folders',
|
|
151
153
|
'cmdk.search.loading': 'Searching...',
|
|
152
154
|
'cmdk.search.market': 'Community',
|
|
153
155
|
'cmdk.search.mcp': 'MCP Server',
|
|
@@ -64,6 +64,7 @@ export default {
|
|
|
64
64
|
'assistants.sorts.knowledgeCount': 'Libraries',
|
|
65
65
|
'assistants.sorts.myown': 'View My Agents',
|
|
66
66
|
'assistants.sorts.pluginCount': 'Skills',
|
|
67
|
+
'assistants.sorts.recommended': 'Recommended',
|
|
67
68
|
'assistants.sorts.title': 'Agent Name',
|
|
68
69
|
'assistants.sorts.tokenUsage': 'Token Usage',
|
|
69
70
|
'assistants.status.archived.reasons.official':
|
|
@@ -94,6 +95,7 @@ export default {
|
|
|
94
95
|
'category.assistant.career': 'Career',
|
|
95
96
|
'category.assistant.copywriting': 'Copywriting',
|
|
96
97
|
'category.assistant.design': 'Design',
|
|
98
|
+
'category.assistant.discover': 'Discover',
|
|
97
99
|
'category.assistant.education': 'Education',
|
|
98
100
|
'category.assistant.emotions': 'Emotions',
|
|
99
101
|
'category.assistant.entertainment': 'Entertainment',
|
|
@@ -12,9 +12,9 @@ export default {
|
|
|
12
12
|
'interests.area.writing': 'Content Creation',
|
|
13
13
|
'interests.hint': 'You can change this anytime in settings',
|
|
14
14
|
'interests.placeholder': 'Enter your interests...',
|
|
15
|
-
'interests.title': "
|
|
16
|
-
'interests.title2': 'This will help me
|
|
17
|
-
'interests.title3': "Take your time, I'll get to know you better
|
|
15
|
+
'interests.title': "What areas you're interested in?",
|
|
16
|
+
'interests.title2': 'This will help me know you better',
|
|
17
|
+
'interests.title3': "Take your time, I'll get to know you better",
|
|
18
18
|
'modeSelection.desc': 'Choose the mode that suits you best',
|
|
19
19
|
'modeSelection.hint': 'You can change this anytime in settings',
|
|
20
20
|
'modeSelection.lite.desc':
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type InsertAgentCronJob,
|
|
3
|
+
InsertAgentCronJobSchema,
|
|
4
|
+
type UpdateAgentCronJob,
|
|
5
|
+
UpdateAgentCronJobSchema,
|
|
6
|
+
} from '@lobechat/types';
|
|
1
7
|
import { TRPCError } from '@trpc/server';
|
|
2
8
|
import { z } from 'zod';
|
|
3
9
|
|
|
4
10
|
import { AgentCronJobModel } from '@/database/models/agentCronJob';
|
|
5
|
-
import {
|
|
6
|
-
type CreateAgentCronJobData,
|
|
7
|
-
type UpdateAgentCronJobData,
|
|
8
|
-
insertAgentCronJobSchema,
|
|
9
|
-
updateAgentCronJobSchema,
|
|
10
|
-
} from '@/database/schemas/agentCronJob';
|
|
11
11
|
import { authedProcedure, router } from '@/libs/trpc/lambda';
|
|
12
12
|
import { serverDatabase } from '@/libs/trpc/lambda/middleware';
|
|
13
13
|
|
|
@@ -31,7 +31,7 @@ const batchUpdateStatusSchema = z.object({
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
// Create input schema for tRPC that omits server-managed fields
|
|
34
|
-
const createAgentCronJobInputSchema =
|
|
34
|
+
const createAgentCronJobInputSchema = InsertAgentCronJobSchema.omit({
|
|
35
35
|
userId: true, // Provided by authentication context
|
|
36
36
|
});
|
|
37
37
|
|
|
@@ -81,7 +81,7 @@ export const agentCronJobRouter = router({
|
|
|
81
81
|
const cronJobModel = new AgentCronJobModel(db, userId);
|
|
82
82
|
// Add userId to the input data since it's provided by authentication context
|
|
83
83
|
const cronJobData = { ...input, userId };
|
|
84
|
-
const cronJob = await cronJobModel.create(cronJobData as
|
|
84
|
+
const cronJob = await cronJobModel.create(cronJobData as InsertAgentCronJob);
|
|
85
85
|
|
|
86
86
|
return {
|
|
87
87
|
data: cronJob,
|
|
@@ -327,7 +327,7 @@ export const agentCronJobRouter = router({
|
|
|
327
327
|
update: agentCronJobProcedure
|
|
328
328
|
.input(
|
|
329
329
|
z.object({
|
|
330
|
-
data:
|
|
330
|
+
data: UpdateAgentCronJobSchema,
|
|
331
331
|
id: z.string(),
|
|
332
332
|
}),
|
|
333
333
|
)
|
|
@@ -337,7 +337,7 @@ export const agentCronJobRouter = router({
|
|
|
337
337
|
|
|
338
338
|
try {
|
|
339
339
|
const cronJobModel = new AgentCronJobModel(db, userId);
|
|
340
|
-
const cronJob = await cronJobModel.update(id, data as
|
|
340
|
+
const cronJob = await cronJobModel.update(id, data as UpdateAgentCronJob);
|
|
341
341
|
|
|
342
342
|
if (!cronJob) {
|
|
343
343
|
throw new TRPCError({
|
|
@@ -45,7 +45,17 @@ export const searchRouter = router({
|
|
|
45
45
|
offset: z.number().optional(),
|
|
46
46
|
query: z.string(),
|
|
47
47
|
type: z
|
|
48
|
-
.enum([
|
|
48
|
+
.enum([
|
|
49
|
+
'agent',
|
|
50
|
+
'topic',
|
|
51
|
+
'file',
|
|
52
|
+
'folder',
|
|
53
|
+
'message',
|
|
54
|
+
'page',
|
|
55
|
+
'mcp',
|
|
56
|
+
'plugin',
|
|
57
|
+
'communityAgent',
|
|
58
|
+
])
|
|
49
59
|
.optional(),
|
|
50
60
|
}),
|
|
51
61
|
)
|
|
@@ -58,8 +68,8 @@ export const searchRouter = router({
|
|
|
58
68
|
// Build search promises based on type filter
|
|
59
69
|
const searchPromises: Promise<any>[] = [];
|
|
60
70
|
|
|
61
|
-
// Database searches (agent, topic, file, message, page)
|
|
62
|
-
if (!type || ['agent', 'topic', 'file', 'message', 'page'].includes(type)) {
|
|
71
|
+
// Database searches (agent, topic, file, folder, message, page)
|
|
72
|
+
if (!type || ['agent', 'topic', 'file', 'folder', 'message', 'page'].includes(type)) {
|
|
63
73
|
searchPromises.push(ctx.searchRepo.search(input));
|
|
64
74
|
}
|
|
65
75
|
|