This commit is contained in:
Your Name
2026-07-29 09:34:02 +08:00
parent 0ff8943ee2
commit f913a57529
54 changed files with 2453 additions and 378 deletions
+8 -1
View File
@@ -18,8 +18,10 @@ import sys
import time
from typing import Any, Optional
from runtime_paths import application_data_dir
# 保证可导入同目录模块
_ROOT = os.path.dirname(os.path.abspath(__file__))
_ROOT = str(application_data_dir())
if _ROOT not in sys.path:
sys.path.insert(0, _ROOT)
@@ -139,6 +141,11 @@ def update_ai_config(updates: dict[str, Any]) -> dict[str, Any]:
if k not in ai_config.CONFIGURABLE_KEYS:
ignored.append(k)
continue
if k == "AI_AGENT_NAME":
value = str(v or "").strip()
ai_config.set_local_agent_name_override(value)
changed[k] = value
continue
# 轻量类型校正
cur = getattr(ai_config, k)
try: