chore: simplify llm serial log.

Signed-off-by: Bo <boironic@gmail.com>
This commit is contained in:
Bo
2026-02-18 19:16:00 +08:00
parent 5d92917a0b
commit 3232de772a
4 changed files with 34 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
#include "tools/tool_cron.h"
#include "cron/cron_service.h"
#include "bus/message_bus.h"
#include <string.h>
#include <time.h>
@@ -45,6 +46,14 @@ esp_err_t tool_cron_add_execute(const char *input_json, char *output, size_t out
if (channel) strncpy(job.channel, channel, sizeof(job.channel) - 1);
if (chat_id) strncpy(job.chat_id, chat_id, sizeof(job.chat_id) - 1);
if (strcmp(job.channel, MIMI_CHAN_TELEGRAM) == 0 &&
(job.chat_id[0] == '\0' || strcmp(job.chat_id, "cron") == 0)) {
snprintf(output, output_size,
"Error: cron_add with channel='telegram' requires a valid chat_id");
cJSON_Delete(root);
return ESP_ERR_INVALID_ARG;
}
if (strcmp(schedule_type, "every") == 0) {
job.kind = CRON_KIND_EVERY;
cJSON *interval = cJSON_GetObjectItem(root, "interval_s");