feat: 添加时区设置功能,默认时区改为 CST-8
- 新增 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 文档
This commit is contained in:
@@ -24,7 +24,7 @@ esp_err_t session_mgr_init(void)
|
||||
|
||||
esp_err_t session_append(const char *chat_id, const char *role, const char *content)
|
||||
{
|
||||
char path[64];
|
||||
char path[128];
|
||||
session_path(chat_id, path, sizeof(path));
|
||||
|
||||
FILE *f = fopen(path, "a");
|
||||
@@ -52,7 +52,7 @@ esp_err_t session_append(const char *chat_id, const char *role, const char *cont
|
||||
|
||||
esp_err_t session_get_history_json(const char *chat_id, char *buf, size_t size, int max_msgs)
|
||||
{
|
||||
char path[64];
|
||||
char path[128];
|
||||
session_path(chat_id, path, sizeof(path));
|
||||
|
||||
FILE *f = fopen(path, "r");
|
||||
@@ -127,7 +127,7 @@ esp_err_t session_get_history_json(const char *chat_id, char *buf, size_t size,
|
||||
|
||||
esp_err_t session_clear(const char *chat_id)
|
||||
{
|
||||
char path[64];
|
||||
char path[128];
|
||||
session_path(chat_id, path, sizeof(path));
|
||||
|
||||
if (remove(path) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user