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>
25 lines
559 B
C
25 lines
559 B
C
#pragma once
|
|
|
|
#include "esp_err.h"
|
|
#include <stddef.h>
|
|
|
|
/**
|
|
* Initialize web search tool.
|
|
*/
|
|
esp_err_t tool_web_search_init(void);
|
|
|
|
/**
|
|
* Execute a web search.
|
|
*
|
|
* @param input_json JSON string with "query" field
|
|
* @param output Output buffer for formatted search results
|
|
* @param output_size Size of output buffer
|
|
* @return ESP_OK on success
|
|
*/
|
|
esp_err_t tool_web_search_execute(const char *input_json, char *output, size_t output_size);
|
|
|
|
/**
|
|
* Save Brave Search API key to NVS.
|
|
*/
|
|
esp_err_t tool_web_search_set_key(const char *api_key);
|