Commit Graph

30 Commits

Author SHA1 Message Date
fa41de0ae8 Merge branch 'feature/module-config' into main (resolved conflicts)
Some checks failed
Build / idf-build (push) Has been cancelled
2026-04-03 20:17:40 +08:00
6983a1f1ba feat: 添加编译时模块开关配置
通过 sdkconfig.defaults 选择性启用/禁用模块,减少固件体积:

新增模块开关:
- CONFIG_MIMI_CHAN_TELEGRAM (默认 n)
- CONFIG_MIMI_CHAN_FEISHU (默认 y)
- CONFIG_MIMI_TOOL_WEB_SEARCH (默认 y)
- CONFIG_MIMI_TOOL_GPIO (默认 n)
- CONFIG_MIMI_WS_SERVER (默认 y)
- CONFIG_MIMI_WIFI_ONBOARD (默认 y)
- CONFIG_MIMI_OTA (默认 n)

技术实现:
- CMakeLists.txt 条件编译源文件
- 头文件使用 static inline stub
- CLI 命令和工具注册也支持条件编译

消除 Telegram 未配置时的 5 秒轮询警告日志
2026-04-03 20:15:26 +08:00
9815ab8df0 feat: 实现时间同步、NVS稳定性修复和ESP-IDF v6.0兼容性改进 2026-04-01 18:58:20 +08:00
7dc4122778 feat: 添加时区设置功能,默认时区改为 CST-8
Some checks failed
Build / idf-build (push) Has been cancelled
Build & Release / build (push) Has been cancelled
- 新增 set_timezone LLM 工具,支持通过对话设置时区
- 新增 set_timezone / timezone_show CLI 命令
- 默认时区从 PST 改为 CST-8(中国标准时间 UTC+8)
- 支持 POSIX 格式和 18 个城市名映射(Asia/Shanghai 等)
- 时区通过 NVS 持久化存储(system_config namespace)
- config_show 中显示当前时区配置
- 更新 changelog.md 和 taolun.md 文档
2026-04-01 00:50:41 +08:00
eedc6757d8 使用中文提交内容
Some checks failed
Build / idf-build (push) Has been cancelled
适配ESP-IDF v6.0编译 补充项目相关文档

* 修复16处头文件缺失、flash配置错误、WiFi断开原因码兼容问题
* 新增ESP-IDF v6.0迁移适配文档
* 更新变更日志,补充v1.0.0功能清单及v1.1.0版本规划
* 整理讨论记录,新增v6.0适配及国内大模型接入内容
2026-03-31 21:34:59 +08:00
49d3a131b7 feat: 增加国内大模型厂商支持(硅基流动、火山方舟)
Some checks failed
Build / idf-build (push) Has been cancelled
- 创建通用提供商架构(llm_provider.h/c)
- 支持四个提供商:Anthropic、OpenAI、SiliconFlow、Volcengine
- 添加提供商特定的API密钥和Base URL配置
- 扩展CLI命令:set_siliconflow_key/url、set_volcengine_key/url
- 更新mimi_secrets.h.example配置模板
- 更新README.md文档说明
- 每个提供商支持独立的NVS存储配置
2026-03-31 19:37:15 +08:00
Asklv
c0ea5f22fb feat: align portal NVS keys 2026-03-08 23:04:24 +08:00
Asklv
1ed434e5c2 fix(cli): run web_search in dedicated task to avoid REPL stack overflow
Signed-off-by: Asklv <boironic@gmail.com>
2026-03-03 01:39:12 +08:00
Asklv
443cb97f59 feat(search): add CLI web_search command and Tavily bearer auth
Signed-off-by: Asklv <boironic@gmail.com>
2026-03-03 01:20:01 +08:00
Asklv
c4c66dda9e feat(cli): add set_tavily_key command and config visibility
Signed-off-by: Asklv <boironic@gmail.com>
2026-02-18 19:16:00 +08:00
Asklv
a9fd606672 feat: add feishu_send cli command
Signed-off-by: Asklv <boironic@gmail.com>
2026-03-03 21:16:00 +08:00
Asklv
0072906d9f feat: wire feishu into app and cli
Signed-off-by: Asklv <boironic@gmail.com>
2026-03-03 10:16:00 +08:00
Bin Meng
22886cf0f2 chore: avoid hardcoding file paths via MIMI_SPIFFS_BASE
Use MIMI_SPIFFS_BASE to centralize file path definitions, making the
base path configurable instead of hardcoded.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2026-02-26 11:37:34 +08:00
Bo
04c80c9c7e hotfix(proxy): fix CLI/api mismatch and add proxy type defaults
Signed-off-by: Bo <boironic@gmail.com>
2026-02-24 19:16:00 +08:00
Bo
08e59f8216 fix: select console repl backend by enabled sdkconfig
Signed-off-by: Bo <boironic@gmail.com>
2026-02-20 00:08:05 +08:00
Bo
f0a2741e0c fix: restore non-display psram usage and clean stale qrcode log
Signed-off-by: Bo <boironic@gmail.com>
2026-02-20 00:08:05 +08:00
Bo
0c256d7653 refactor: replace psram allocations with standard heap
Signed-off-by: Bo <boironic@gmail.com>
2026-02-20 00:08:05 +08:00
crispyberry
8a5133d477 chore: rename wifi_set command to set_wifi for consistency
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:00:18 +08:00
crispyberry
10c9a5ed5c fix: prevent device hang when no USB host connected
Switch primary console from USB Serial/JTAG to UART so log output
doesn't block when the device is powered by a wall charger. USB
Serial/JTAG remains available as secondary console for debugging.

Closes #60

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:16:55 +08:00
Bo
cba7444b26 fix: fix telegram sent error in cron task.
Signed-off-by: Bo <boironic@gmail.com>
2026-02-18 17:16:00 +08:00
Bo
4ce0735c9a feat: add skill verification CLI commands and preflash SPIFFS image 2026-02-17 01:26:18 +08:00
Bo
c120a6fe45 fix cron/heartbeat e2e stability and build issues 2026-02-16 23:00:00 +08:00
crispyberry
ebff0ccb04 feat: add heartbeat service for periodic task checking
Adds a heartbeat timer that reads /spiffs/config/HEARTBEAT.md every 30
minutes and sends a prompt to the agent if actionable tasks are found.
Skips empty lines, headers, and completed checkboxes. Includes a
heartbeat_trigger CLI command for manual testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 01:23:13 +08:00
Bo
e79e4e4932 feat: add wifi scaner in uart.
Signed-off-by: Bo <boironic@gmail.com>
2026-02-10 15:57:14 +08:00
crispyberry
da43c27003 feat: restore NVS runtime config with CLI commands (NVS > build-time priority)
Bring back two-layer configuration: build-time defaults from mimi_secrets.h
with runtime NVS overrides via serial CLI. NVS values take highest priority
so a pre-flashed board can be reconfigured anywhere with just a USB cable.

Restored CLI commands: wifi_set, set_tg_token, set_api_key, set_model,
set_proxy, clear_proxy, set_search_key. Added new commands: config_show
(displays all config with sensitive fields masked), config_reset (clears
all NVS overrides), and help (lists all commands).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:42:10 +08:00
crispyberry
82f93b617b refactor: remove NVS/CLI config, use mimi_secrets.h as sole configuration method
All configuration is now done exclusively through mimi_secrets.h at build time.
Removed NVS read/write logic, CLI config commands (wifi_set, set_tg_token,
set_api_key, set_model, set_proxy, clear_proxy, set_search_key), and setter
functions from all modules. CLI retains debug/maintenance commands only.
Updated all documentation to reflect the change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 23:04:24 +08:00
crispyberry
0e1da79b74 feat: add ReAct agent loop and build-time config (mimi_secrets.h)
Rewrite agent_loop.c with ReAct tool use loop: LLM call → tool
execution → repeat until end_turn (max 10 iterations). Add tool
guidance to system prompt. Add set_search_key CLI command.

Add mimi_secrets.h for build-time credentials with highest priority
over NVS/CLI values. All modules (wifi, telegram, llm, proxy,
web_search) check build-time secrets first, fall back to NVS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 00:37:43 +08:00
crispyberry
37d645474a fix: heap-allocate memory_read buffer to prevent stack overflow
CLI task stack is 4KB; the 4096-byte stack buffer in cmd_memory_read
was overflowing and corrupting the heap. Use malloc instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 23:04:09 +08:00
crispyberry
3822928e6d feat: add HTTP CONNECT proxy support for Telegram and Claude API
Enable ESP32-S3 to reach api.telegram.org and api.anthropic.com through
an HTTP CONNECT proxy (e.g. Clash Verge), required in regions where
these services are blocked.

- New proxy module (http_proxy.c/h): CONNECT tunnel + TLS via esp_tls
  with pre-connected socket injection (esp_tls_set_conn_sockfd)
- Telegram and LLM modules split into direct/proxy paths
- CLI commands: set_proxy <host> <port>, clear_proxy
- Proxy config persisted in NVS
- Fix TLS buffer: MBEDTLS_SSL_IN_CONTENT_LEN 4096 → 16384
- Increase task stacks for TLS overhead (poll 12KB, agent 12KB, outbound 8KB)
- Default model changed to claude-opus-4-6
- Capture raw error body for non-200 API responses

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 22:40:28 +08:00
crispyberry
44790d016b feat: add serial CLI with 12 configuration commands
esp_console REPL over USB-JTAG: wifi_set, set_tg_token,
set_api_key, set_model, memory_read/write, session_list/clear,
heap_info, restart.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 18:55:54 +08:00