chore: remove dead code and fix unsafe patterns

- Remove unused context_build_messages() (superseded by direct cJSON in agent_loop)
- Remove unused llm_chat() and its helper extract_text_* functions (superseded by llm_chat_tools)
- Remove ota_manager.c from build (never called)
- Remove config_screen.c stub from build (no-op module)
- Remove unused PWR_KEY_State, Button_GPIO_Get_Level; drop config_screen dependency from button_driver
- Fix incorrect type cast in tool_get_time.c (char[64] cast to char**)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
crispyberry
2026-02-21 17:11:15 +08:00
parent 0b9e66aa4a
commit c06f706ffd
7 changed files with 23 additions and 241 deletions

View File

@@ -12,14 +12,3 @@
*/
esp_err_t context_build_system_prompt(char *buf, size_t size);
/**
* Build the complete messages JSON array for LLM call.
* Combines session history + current user message.
*
* @param history_json JSON array from session_get_history_json()
* @param user_message Current user message text
* @param buf Output buffer
* @param size Buffer size
*/
esp_err_t context_build_messages(const char *history_json, const char *user_message,
char *buf, size_t size);