diff --git a/apps/shinkai-desktop/src/components/cron-task/component/cron-task.tsx b/apps/shinkai-desktop/src/components/cron-task/component/cron-task.tsx index 80b58ffb0..40df0372c 100644 --- a/apps/shinkai-desktop/src/components/cron-task/component/cron-task.tsx +++ b/apps/shinkai-desktop/src/components/cron-task/component/cron-task.tsx @@ -6,6 +6,7 @@ import { useCreateRecurringTask } from '@shinkai_network/shinkai-node-state/v2/m import { useUpdateRecurringTask } from '@shinkai_network/shinkai-node-state/v2/mutations/updateRecurringTask/useUpdateRecurringTask'; import { useGetTools } from '@shinkai_network/shinkai-node-state/v2/queries/getToolsList/useGetToolsList'; import { + Badge, Button, DropdownMenu, DropdownMenuContent, @@ -270,7 +271,6 @@ function CronTask({ mode, initialValues }: CronTaskProps) { )} /> - )} /> - )} +
+ {[ + { + label: 'every 5 min', + cron: '*/5 * * * *', + }, + { + label: 'every 5 hours', + cron: '0 */5 * * *', + }, + { + label: 'every monday at 8am', + cron: '0 8 * * 1', + }, + { + label: 'every january 1st at 12am', + cron: '0 0 1 1 *', + }, + { + label: 'every 1st of the month at 12pm', + cron: '0 12 1 * *', + }, + ].map((item) => ( + { + form.setValue('cronExpression', item.cron); + }} + variant="outline" + > + {item.label} + + ))} +
diff --git a/apps/shinkai-desktop/src/pages/add-ai.tsx b/apps/shinkai-desktop/src/pages/add-ai.tsx index 6ed7bccd3..80b0e40a9 100644 --- a/apps/shinkai-desktop/src/pages/add-ai.tsx +++ b/apps/shinkai-desktop/src/pages/add-ai.tsx @@ -466,22 +466,24 @@ const AddAIPage = () => { isLoading={isPending} size="sm" type="submit" - variant="outline" + variant={currentModel === Models.Ollama ? 'default' : 'outline'} > {t('llmProviders.add')} - + {currentModel !== Models.Ollama && ( + + )}
)} diff --git a/apps/shinkai-desktop/src/pages/task-logs.tsx b/apps/shinkai-desktop/src/pages/task-logs.tsx index 41cb914bf..b1349dbf4 100644 --- a/apps/shinkai-desktop/src/pages/task-logs.tsx +++ b/apps/shinkai-desktop/src/pages/task-logs.tsx @@ -1,6 +1,7 @@ import { DialogClose } from '@radix-ui/react-dialog'; import { DotsVerticalIcon } from '@radix-ui/react-icons'; import { useTranslation } from '@shinkai_network/shinkai-i18n'; +import { buildInboxIdFromJobId } from '@shinkai_network/shinkai-message-ts/utils/inbox_name_handler'; import { useRemoveRecurringTask } from '@shinkai_network/shinkai-node-state/v2/mutations/removeRecurringTask/useRemoveRecurringTask'; import { useGetRecurringTask } from '@shinkai_network/shinkai-node-state/v2/queries/getRecurringTask/useGetRecurringTask'; import { useGetRecurringTaskLogs } from '@shinkai_network/shinkai-node-state/v2/queries/getRecurringTaskLogs/useGetRecurringTaskLogs'; @@ -38,7 +39,7 @@ import { XCircle, } from 'lucide-react'; import React from 'react'; -import { useNavigate, useParams } from 'react-router-dom'; +import { Link, useNavigate, useParams } from 'react-router-dom'; import { toast } from 'sonner'; import { useAuth } from '../store/auth'; @@ -70,7 +71,11 @@ export const TaskLogs = () => { }); return ( - + {isGetRecurringTaskPending && (

...

@@ -144,14 +149,15 @@ export const TaskLogs = () => { )} {isSuccess && logs.length > 0 && (
-
+
Execution Time Status + Chat Message
{logs.map((log) => (
@@ -168,6 +174,13 @@ export const TaskLogs = () => { {log.success ? 'Success' : 'Failed'}
+ + + Go to chat +
{log.error_message || '-'}
diff --git a/libs/shinkai-message-ts/src/api/recurring-tasks/types.ts b/libs/shinkai-message-ts/src/api/recurring-tasks/types.ts index 1c9a2b1cc..3d8053d0b 100644 --- a/libs/shinkai-message-ts/src/api/recurring-tasks/types.ts +++ b/libs/shinkai-message-ts/src/api/recurring-tasks/types.ts @@ -78,4 +78,5 @@ export type GetRecurringTaskLogsResponse = { execution_time: string; success: boolean; error_message: string; + job_id: string; }[]; diff --git a/libs/shinkai-node-state/src/v2/mutations/createRecurringTask/index.ts b/libs/shinkai-node-state/src/v2/mutations/createRecurringTask/index.ts index 56105b5bd..2c9d474f6 100644 --- a/libs/shinkai-node-state/src/v2/mutations/createRecurringTask/index.ts +++ b/libs/shinkai-node-state/src/v2/mutations/createRecurringTask/index.ts @@ -28,7 +28,7 @@ export const createRecurringTask = async ({ network_folders: [], }, associated_ui: null, - is_hidden: false, + is_hidden: true, }, }); @@ -39,7 +39,7 @@ export const createRecurringTask = async ({ config: chatConfig, job_creation_info: { associated_ui: null, - is_hidden: false, + is_hidden: true, scope: { vector_fs_folders: [], vector_fs_items: [],