Skip to content

build: unify config to top-level claw_config.h#6

Merged
zevorn merged 1 commit intomainfrom
build/unify-config-to-toplevel
Mar 14, 2026
Merged

build: unify config to top-level claw_config.h#6
zevorn merged 1 commit intomainfrom
build/unify-config-to-toplevel

Conversation

@zevorn
Copy link
Copy Markdown
Owner

@zevorn zevorn commented Mar 14, 2026

Move include/claw/claw_config.h to project root as the single source of truth for all rt-claw business configuration (AI, Feishu, tuning).

Configuration is now managed exclusively by Meson + environment variables. The build system generates claw_config_generated.h via configure_file() with resolved values from:

  1. Meson option (-Dai_api_key=...) — highest priority
  2. Environment var (RTCLAW_AI_API_KEY) — fallback
  3. claw_config.h #ifndef defaults — lowest priority

Changes:

  • Remove AI Engine menu (key/url/model/max_tokens/context_size/ memory_max_msgs) from ESP32-C3 and ESP32-S3 Kconfig
  • Remove Feishu APP_ID/APP_SECRET from Kconfig (keep FEISHU_ENABLE)
  • Remove AI/Feishu entries from sdkconfig.defaults files
  • Remove env_override.h generation from gen-esp32*-cross.py
  • Add claw_config_generated.h.in Meson template
  • Add integer meson options: ai_max_tokens, ai_context_size, ai_memory_max_msgs
  • Update all 12 source files: include path claw/claw_config.h ->
    claw_config.h

No migration needed — direct replacement.

Move include/claw/claw_config.h to project root as the single source
of truth for all rt-claw business configuration (AI, Feishu, tuning).

Configuration is now managed exclusively by Meson + environment
variables.  The build system generates claw_config_generated.h via
configure_file() with resolved values from:

  1. Meson option (-Dai_api_key=...)     — highest priority
  2. Environment var (RTCLAW_AI_API_KEY)  — fallback
  3. claw_config.h #ifndef defaults       — lowest priority

Changes:
- Remove AI Engine menu (key/url/model/max_tokens/context_size/
  memory_max_msgs) from ESP32-C3 and ESP32-S3 Kconfig
- Remove Feishu APP_ID/APP_SECRET from Kconfig (keep FEISHU_ENABLE)
- Remove AI/Feishu entries from sdkconfig.defaults files
- Remove env_override.h generation from gen-esp32*-cross.py
- Add claw_config_generated.h.in Meson template
- Add integer meson options: ai_max_tokens, ai_context_size,
  ai_memory_max_msgs
- Update all 12 source files: include path claw/claw_config.h ->
  claw_config.h

No migration needed — direct replacement.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
@zevorn zevorn force-pushed the build/unify-config-to-toplevel branch from 8b2b4ba to 8fcb614 Compare March 14, 2026 18:22
@zevorn zevorn merged commit 2a534f9 into main Mar 14, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant