Detect firmware/sdkconfig.defaults.local at configure time and feed it
into ESP-IDF's SDKCONFIG_DEFAULTS list alongside sdkconfig.defaults.
This gives self-hosted and downstream builds a first-class way to pin
per-deployment values (CONFIG_STACKCHAN_SERVER_URL, CONFIG_OTA_URL,
CONFIG_USE_EZDATA, ...) without patching committed defaults and
without needing contributors to remember the
SDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.local"
invocation.
The file is ignored by the repo's .gitignore, so it never leaks
upstream. When it does not exist, behaviour is unchanged.
A status message ("StackChan: detected sdkconfig.defaults.local,
applying overlay") makes the override visible in the idf.py configure
output so it's obvious when a build is using custom defaults.
Expose the StackChan backend base URL as a Kconfig string so it can be
overridden via menuconfig or sdkconfig.defaults.local without patching
source files. This follows the same pattern as the existing
CONFIG_OTA_URL option used by the Xiaozhi Assistant pipeline.
The weak-linked secret_logic::get_server_url() now returns
CONFIG_STACKCHAN_SERVER_URL when defined, and keeps the previous
localhost:3000 stub as a fallback for builds that omit the config.
The default value equals the current production server, so firmware
builds without an explicit override keep talking to the same backend
they do today (no regression).
Intended usage with this option relies on hal_account.cpp and
hal_app_center.cpp going through secret_logic::get_server_url() as well
(see the companion refactor). Until that lands, only hal_ws_avatar.cpp
honours the override.
Align hal_account.cpp and hal_app_center.cpp with hal_ws_avatar.cpp:66,
which already builds the StackChan server URL by composing
secret_logic::get_server_url() with the route path.
Before this change, the four remaining HTTP endpoints were hard-coded to
the production IP (http://47.113.125.164:12800), preventing custom
server-url overrides from taking effect on three of the four services.
Now all four HAL call sites go through the same weak-linked
secret_logic::get_server_url() extension point.
No functional change intended: the default return of get_server_url()
still resolves to the server URL configured at build time via the
secret_logic override (or the stub localhost:3000 when no override is
provided).