Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

♻️ (settings_manager.py): remove legacy int key migration logic to simplify code and maintain a single source of truth

cyhhaob42a58720af1
diff --git a/modules/settings_manager.py b/modules/settings_manager.py
index 0cf54916a..13d22ae2a 100644
--- a/modules/settings_manager.py
+++ b/modules/settings_manager.py
@@ -92,17 +92,6 @@ class SettingsManager:
"""Get settings for a specific user"""
normalized_id = self._normalize_user_id(user_id)
- # Migrate any legacy int key to string key to keep single source of truth
- try:
- int_form = int(normalized_id)
- if int_form in self.settings: # legacy in-memory int key
- if normalized_id not in self.settings:
- self.settings[normalized_id] = self.settings[int_form]
- del self.settings[int_form]
- self._save_settings()
- except Exception:
- pass
-
# Return existing or create new
if normalized_id not in self.settings:
self.settings[normalized_id] = UserSettings()
@@ -113,17 +102,6 @@ class SettingsManager:
"""Update settings for a specific user"""
normalized_id = self._normalize_user_id(user_id)
- # Remove legacy int key if exists
- try:
- int_form = int(normalized_id)
- if (
- int_form in self.settings
- and self.settings.get(normalized_id) is not self.settings[int_form]
- ):
- del self.settings[int_form]
- except Exception:
- pass
-
self.settings[normalized_id] = settings
self._save_settings()