/* * SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD * * SPDX-License-Identifier: MIT */ #include "app_ai_agent.h" #include #include #include #include #include #include #include using namespace mooncake; using namespace smooth_ui_toolkit::lvgl_cpp; AppAiAgent::AppAiAgent() { // Configure App name setAppInfo().name = "AI.AGENT"; // Configure App icon static auto icon = assets::get_image("icon_ai_agent.bin"); setAppInfo().icon = (void*)&icon; // Configure App theme color static uint32_t theme_color = 0x33CC99; setAppInfo().userData = (void*)&theme_color; } // Called when the App is installed void AppAiAgent::onCreate() { mclog::tagInfo(getAppInfo().name, "on create"); } // Called when the App is opened // You can construct UI, initialize operations, etc. here void AppAiAgent::onOpen() { mclog::tagInfo(getAppInfo().name, "on open"); // Request to start Xiaozhi service // All apps will be uninstall in next mooncake update GetHAL().requestXiaozhiStart(); } // Called repeatedly while the App is running void AppAiAgent::onRunning() { } // Called when the App is closed // You can destroy UI, release resources, etc. here void AppAiAgent::onClose() { mclog::tagInfo(getAppInfo().name, "on close"); }