🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🐛 fix(lh): fix cron create parameter mapping for cronPattern and content (#14113)
LiJian600f10fcea5d
diff --git a/apps/cli/src/commands/cron.test.ts b/apps/cli/src/commands/cron.test.tsindex cbf0142ac62..7b80b25292f 100644--- a/apps/cli/src/commands/cron.test.ts+++ b/apps/cli/src/commands/cron.test.ts@@ -111,7 +111,7 @@ describe('cron command', () => {]);expect(mockTrpcClient.agentCronJob.create.mutate).toHaveBeenCalledWith(- expect.objectContaining({ agentId: 'a1', name: 'My Job', schedule: '* * * * *' }),+ expect.objectContaining({ agentId: 'a1', cronPattern: '* * * * *', name: 'My Job' }),);});});diff --git a/apps/cli/src/commands/cron.ts b/apps/cli/src/commands/cron.tsindex a242a505f1e..c9675de638c 100644--- a/apps/cli/src/commands/cron.ts+++ b/apps/cli/src/commands/cron.ts@@ -125,10 +125,10 @@ export function registerCronCommand(program: Command) {const input: Record<string, any> = {agentId: options.agentId,- schedule: options.schedule,+ cronPattern: options.schedule,};if (options.name) input.name = options.name;- if (options.prompt) input.prompt = options.prompt;+ if (options.prompt) input.content = options.prompt;if (options.maxExecutions) input.maxExecutions = Number.parseInt(options.maxExecutions, 10);const result = await client.agentCronJob.create.mutate(input as any);@@ -168,8 +168,8 @@ export function registerCronCommand(program: Command) {) => {const data: Record<string, any> = {};if (options.name) data.name = options.name;- if (options.schedule) data.schedule = options.schedule;- if (options.prompt) data.prompt = options.prompt;+ if (options.schedule) data.cronPattern = options.schedule;+ if (options.prompt) data.content = options.prompt;if (options.maxExecutions) data.maxExecutions = Number.parseInt(options.maxExecutions, 10);if (options.enable) data.enabled = true;if (options.disable) data.enabled = false;