- Add "Cron" tab to navigation bar with Time04Icon - Add /crons route with CronsPage component - Add cron IPC handlers (list, toggle, remove) in electron/ipc/cron.ts - Expose cron API in preload.ts for renderer process - Add useCronJobs hook for fetching and managing jobs - Add CronJobList component with status badges, toggle switches, delete buttons, relative time display, and empty state Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
/**
|
|
* IPC handlers index - register all handlers from main process.
|
|
*/
|
|
export { registerAgentIpcHandlers, cleanupAgent } from './agent.js'
|
|
export { registerSkillsIpcHandlers } from './skills.js'
|
|
export { registerHubIpcHandlers, cleanupHub, initializeHub, setupDeviceConfirmation } from './hub.js'
|
|
export { registerProfileIpcHandlers } from './profile.js'
|
|
export { registerProviderIpcHandlers } from './provider.js'
|
|
export { registerCronIpcHandlers } from './cron.js'
|
|
|
|
import { registerAgentIpcHandlers, cleanupAgent } from './agent.js'
|
|
import { registerSkillsIpcHandlers } from './skills.js'
|
|
import { registerHubIpcHandlers, cleanupHub, initializeHub } from './hub.js'
|
|
import { registerProfileIpcHandlers } from './profile.js'
|
|
import { registerProviderIpcHandlers } from './provider.js'
|
|
import { registerCronIpcHandlers } from './cron.js'
|
|
|
|
/**
|
|
* Register all IPC handlers.
|
|
* Call this in main.ts after app is ready.
|
|
*/
|
|
export function registerAllIpcHandlers(): void {
|
|
registerHubIpcHandlers()
|
|
registerAgentIpcHandlers()
|
|
registerSkillsIpcHandlers()
|
|
registerProfileIpcHandlers()
|
|
registerProviderIpcHandlers()
|
|
registerCronIpcHandlers()
|
|
}
|
|
|
|
/**
|
|
* Initialize Hub and create default agent.
|
|
* Call this after IPC handlers are registered.
|
|
*/
|
|
export async function initializeApp(): Promise<void> {
|
|
console.log('[Desktop] Initializing app...')
|
|
await initializeHub()
|
|
console.log('[Desktop] App initialized')
|
|
}
|
|
|
|
/**
|
|
* Cleanup all resources.
|
|
* Call this before app quits.
|
|
*/
|
|
export function cleanupAll(): void {
|
|
cleanupHub()
|
|
cleanupAgent()
|
|
}
|