feat: add cron scheduled task service with tool_use integration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "ui/config_screen.h"
|
||||
#include "imu/imu_manager.h"
|
||||
#include "rgb/rgb.h"
|
||||
#include "cron/cron_service.h"
|
||||
|
||||
static const char *TAG = "mimi";
|
||||
|
||||
@@ -77,6 +78,8 @@ static void outbound_dispatch_task(void *arg)
|
||||
telegram_send_message(msg.chat_id, msg.content);
|
||||
} else if (strcmp(msg.channel, MIMI_CHAN_WEBSOCKET) == 0) {
|
||||
ws_server_send(msg.chat_id, msg.content);
|
||||
} else if (strcmp(msg.channel, MIMI_CHAN_SYSTEM) == 0) {
|
||||
ESP_LOGI(TAG, "System message [%s]: %.128s", msg.chat_id, msg.content);
|
||||
} else {
|
||||
ESP_LOGW(TAG, "Unknown channel: %s", msg.channel);
|
||||
}
|
||||
@@ -124,6 +127,7 @@ void app_main(void)
|
||||
ESP_ERROR_CHECK(telegram_bot_init());
|
||||
ESP_ERROR_CHECK(llm_proxy_init());
|
||||
ESP_ERROR_CHECK(tool_registry_init());
|
||||
ESP_ERROR_CHECK(cron_service_init());
|
||||
ESP_ERROR_CHECK(agent_loop_init());
|
||||
|
||||
/* Start Serial CLI first (works without WiFi) */
|
||||
@@ -141,6 +145,7 @@ void app_main(void)
|
||||
/* Start network-dependent services */
|
||||
ESP_ERROR_CHECK(telegram_bot_start());
|
||||
ESP_ERROR_CHECK(agent_loop_start());
|
||||
cron_service_start();
|
||||
ESP_ERROR_CHECK(ws_server_start());
|
||||
|
||||
/* Outbound dispatch task */
|
||||
|
||||
Reference in New Issue
Block a user