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.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(i18n): preserve language in setup payload
cyhhao46e934d31e8c
diff --git a/core/controller.py b/core/controller.pyindex 7d4b0acba..244212381 100644--- a/core/controller.py+++ b/core/controller.py@@ -31,6 +31,7 @@ class Controller:def __init__(self, config):"""Initialize controller with configuration"""self.config = config+ self._config_mtime: Optional[float] = None# Session tracking (must be initialized before handlers)self.claude_sessions: Dict[str, Any] = {}@@ -106,11 +107,27 @@ class Controller:logger.info("Injected settings_manager and controller into SlackBot")def _get_lang(self) -> str:+ self._refresh_language_from_config()return getattr(self.config, "language", "en")def _t(self, key: str, **kwargs) -> str:return i18n_t(key, self._get_lang(), **kwargs)+ def _refresh_language_from_config(self) -> None:+ try:+ config_path = paths.get_config_path()+ if not config_path.exists():+ return+ mtime = config_path.stat().st_mtime+ if self._config_mtime != mtime:+ from config.v2_config import V2Config++ v2_config = V2Config.load()+ self.config.language = v2_config.language+ self._config_mtime = mtime+ except Exception as err:+ logger.debug("Failed to reload language from config: %s", err)+def _migrate_language_from_settings(self) -> None:"""Persist legacy per-channel language into global config if missing."""try:diff --git a/modules/im/slack.py b/modules/im/slack.pyindex 35e949782..1bffd8b13 100644--- a/modules/im/slack.py+++ b/modules/im/slack.py@@ -12,8 +12,7 @@ from slack_sdk.errors import SlackApiErrorfrom markdown_to_mrkdwn import SlackMarkdownConverterfrom .base import BaseIMClient, MessageContext, InlineKeyboard, InlineButton, FileAttachment-from config import paths-from config.v2_config import SlackConfig, V2Config+from config.v2_config import SlackConfigfrom .formatters import SlackFormatterfrom vibe.i18n import t as i18n_t@@ -30,7 +29,6 @@ class SlackBot(BaseIMClient):self.config = configself.web_client: Optional[AsyncWebClient] = Noneself.socket_client: Optional[SocketModeClient] = None- self._config_mtime: Optional[float] = None# Initialize Slack formatterself.formatter = SlackFormatter()@@ -68,16 +66,8 @@ class SlackBot(BaseIMClient):"""Get the global language setting from config."""# Read from global config via controllerif self._controller and hasattr(self._controller, "config"):- try:- config_path = paths.get_config_path()- if config_path.exists():- mtime = config_path.stat().st_mtime- if self._config_mtime != mtime:- v2_config = V2Config.load()- self._controller.config.language = v2_config.language- self._config_mtime = mtime- except Exception as err:- logger.debug("Failed to reload language from config: %s", err)+ if hasattr(self._controller, "_get_lang"):+ return self._controller._get_lang()return getattr(self._controller.config, "language", "en")return "en"diff --git a/ui/src/components/Wizard.tsx b/ui/src/components/Wizard.tsxindex 53fd45551..ace9b0df4 100644--- a/ui/src/components/Wizard.tsx+++ b/ui/src/components/Wizard.tsx@@ -65,6 +65,8 @@ const buildConfigPayload = (data: any) => ({update: data.update,// Preserve ack_modeack_mode: data.ack_mode,+ // Preserve language+ language: data.language,});const steps = [diff --git a/ui/src/components/steps/Summary.tsx b/ui/src/components/steps/Summary.tsxindex 1f72232e7..27623ad2a 100644--- a/ui/src/components/steps/Summary.tsx+++ b/ui/src/components/steps/Summary.tsx@@ -247,6 +247,8 @@ const buildConfigPayload = (data: any) => {} : undefined,// Preserve ack_modeack_mode: data.ack_mode,+ // Preserve language+ language: data.language,};};