This commit is contained in:
2026-01-23 15:02:19 -08:00
parent 523d9f839c
commit 797b5fee40
3 changed files with 58 additions and 42 deletions

View File

@@ -368,8 +368,8 @@ def save_config(
from SYS.database import db, save_config_value
with db.transaction():
# We want to clear and re-save or just update?
# For simplicity, we'll iterate and update.
# Replace the table contents so removed entries disappear from the DB.
db.execute("DELETE FROM config")
for key, value in config.items():
if key in ('store', 'provider', 'tool'):
if isinstance(value, dict):
@@ -393,6 +393,7 @@ def save_config(
log(f"Failed to save config to database: {e}")
cache_key = _make_cache_key(config_dir, filename, config_path)
clear_config_cache()
_CONFIG_CACHE[cache_key] = config