tasks execute immediately

This commit is contained in:
Arjun 2026-03-19 00:04:19 +05:30
parent 91030a5fca
commit d291ceec80
8 changed files with 245 additions and 24 deletions

View file

@ -28,6 +28,7 @@ export const InlineTaskBlockSchema = z.object({
schedule: InlineTaskScheduleSchema.optional(),
'schedule-label': z.string().optional(),
lastRunAt: z.string().optional(),
processing: z.boolean().optional(),
});
export type InlineTaskBlock = z.infer<typeof InlineTaskBlockSchema>;

View file

@ -522,6 +522,22 @@ const ipcSchemas = {
]).nullable(),
}),
},
'inline-task:process': {
req: z.object({
instruction: z.string(),
noteContent: z.string(),
notePath: z.string(),
}),
res: z.object({
schedule: z.union([
z.object({ type: z.literal('cron'), expression: z.string(), startDate: z.string(), endDate: z.string() }),
z.object({ type: z.literal('window'), cron: z.string(), startTime: z.string(), endTime: z.string(), startDate: z.string(), endDate: z.string() }),
z.object({ type: z.literal('once'), runAt: z.string() }),
]).nullable(),
scheduleLabel: z.string().nullable(),
response: z.string().nullable(),
}),
},
// Billing channels
'billing:getInfo': {
req: z.null(),