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): unify language config and slack messages
cyhhaoac543763f427
diff --git a/config/v2_compat.py b/config/v2_compat.pyindex aabaaa959..030b7c5cb 100644--- a/config/v2_compat.py+++ b/config/v2_compat.py@@ -40,6 +40,7 @@ class AppCompatConfig:opencode: Optional[OpenCodeCompatConfig]log_level: strack_mode: str+ language: strdefault_backend: str = "opencode"@@ -74,5 +75,6 @@ def to_app_config(v2: V2Config) -> AppCompatConfig:opencode=opencode,log_level=v2.runtime.log_level,ack_mode=v2.ack_mode,+ language=v2.language,default_backend=v2.agents.default_backend,)diff --git a/config/v2_config.py b/config/v2_config.pyindex f56e66560..e7edb5537 100644--- a/config/v2_config.py+++ b/config/v2_config.py@@ -109,6 +109,7 @@ class V2Config:ui: UiConfig = field(default_factory=UiConfig)update: UpdateConfig = field(default_factory=UpdateConfig)ack_mode: str = "reaction"+ language: str = "en" # Global language setting: "en", "zh", etc.@classmethoddef load(cls, config_path: Optional[Path] = None) -> "V2Config":@@ -193,6 +194,10 @@ class V2Config:if ack_mode not in {"reaction", "message"}:raise ValueError("Config 'ack_mode' must be 'reaction' or 'message'")+ language = payload.get("language", "en")+ if language not in {"en", "zh"}:+ language = "en" # Fallback to English for unsupported languages+return cls(mode=mode,version=payload.get("version", "v2"),@@ -203,6 +208,7 @@ class V2Config:ui=ui,update=update,ack_mode=ack_mode,+ language=language,)def save(self, config_path: Optional[Path] = None) -> None:@@ -226,5 +232,6 @@ class V2Config:"ui": self.ui.__dict__,"update": self.update.__dict__,"ack_mode": self.ack_mode,+ "language": self.language,}path.write_text(json.dumps(payload, indent=2), encoding="utf-8")diff --git a/config/v2_settings.py b/config/v2_settings.pyindex beb767d82..6ca969f11 100644--- a/config/v2_settings.py+++ b/config/v2_settings.py@@ -43,8 +43,6 @@ class ChannelSettings:routing: RoutingSettings = field(default_factory=RoutingSettings)# Per-channel require_mention override: None=use global default, True=require, False=don't requirerequire_mention: Optional[bool] = None- # Per-channel language setting: None=use system default, "en", "zh", etc.- language: Optional[str] = None@dataclass@@ -94,7 +92,6 @@ class SettingsStore:custom_cwd=channel_payload.get("custom_cwd"),routing=routing,require_mention=channel_payload.get("require_mention"),- language=channel_payload.get("language"),)self.settings = SettingsState(channels=channels)@@ -117,7 +114,6 @@ class SettingsStore:"codex_reasoning_effort": settings.routing.codex_reasoning_effort,},"require_mention": settings.require_mention,- "language": settings.language,}self.settings_path.write_text(json.dumps(payload, indent=2), encoding="utf-8")diff --git a/core/controller.py b/core/controller.pyindex 50aa6cde5..cb0156c44 100644--- a/core/controller.py+++ b/core/controller.py@@ -18,6 +18,7 @@ from core.handlers import (MessageHandler,)from core.update_checker import UpdateChecker+from vibe.i18n import t as i18n_tlogger = logging.getLogger(__name__)@@ -99,6 +100,12 @@ class Controller:self.im_client.set_controller(self)logger.info("Injected settings_manager and controller into SlackBot")+ def _get_lang(self) -> str:+ return getattr(self.config, "language", "en")++ def _t(self, key: str, **kwargs) -> str:+ return i18n_t(key, self._get_lang(), **kwargs)+def _init_handlers(self):"""Initialize all handlers with controller reference"""# Initialize session_handler first as other handlers depend on it@@ -594,8 +601,17 @@ class Controller:# Save require_mention settingself.settings_manager.set_require_mention(settings_key, require_mention)- # Save language setting- self.settings_manager.set_language(settings_key, language)+ # Save language setting to global config+ if language is not None and language != self.config.language:+ self.config.language = language+ try:+ from config.v2_config import V2Config++ v2_config = V2Config.load()+ v2_config.language = language+ v2_config.save()+ except Exception as err:+ logger.error(f"Failed to persist language setting: {err}")logger.info(f"Updated settings for {settings_key}: show types = {show_message_types}, "@@ -610,7 +626,7 @@ class Controller:)# Send confirmation- await self.im_client.send_message(context, "✅ Settings updated successfully!")+ await self.im_client.send_message(context, f"✅ {self._t('success.settingsUpdated')}")except Exception as e:logger.error(f"Error updating settings: {e}")@@ -620,7 +636,11 @@ class Controller:channel_id=channel_id if channel_id else user_id,platform_specific={},)- await self.im_client.send_message(context, f"❌ Failed to update settings: {str(e)}")+ await self.im_client.send_message(+ context,+ f"❌ {self._t('error.settingsUpdateFailed', error=str(e))}",+ )+# Working directory change handler (for Slack modal)async def handle_change_cwd_submission(self, user_id: str, new_cwd: str, channel_id: Optional[str] = None):@@ -644,7 +664,10 @@ class Controller:channel_id=channel_id if channel_id else user_id,platform_specific={},)- await self.im_client.send_message(context, f"❌ Failed to change working directory: {str(e)}")+ await self.im_client.send_message(+ context,+ f"❌ {self._t('error.cwdSetFailed', error=str(e))}",+ )async def handle_resume_session_submission(self,@@ -699,11 +722,12 @@ class Controller:self.settings_manager.set_channel_routing(settings_key, routing)agent_label = agent.capitalize()- confirmation = (- f"✅ Resumed {agent_label} session.\n"- f"Session ID: `{session_id}`\n"- f"💬 *Click this message and reply in the thread sidebar* to continue with this session.\n"- f"_(Sending a new message in the channel will start a fresh session.)_"+ confirmation = "\n".join(+ [+ f"✅ {self._t('success.sessionResumed', agent=agent_label, sessionId=session_id)}",+ self._t("success.sessionResumedTip1"),+ self._t("success.sessionResumedTip2"),+ ])confirmation_ts = await self.im_client.send_message(context, confirmation, parse_mode="markdown")@@ -724,7 +748,10 @@ class Controller:thread_id=thread_id or None,platform_specific={},)- await self.im_client.send_message(context, f"❌ Failed to resume session: {str(e)}")+ await self.im_client.send_message(+ context,+ f"❌ {self._t('error.resumeSubmitFailed', error=str(e))}",+ )async def handle_routing_modal_update(self,@@ -957,24 +984,28 @@ class Controller:self.settings_manager.set_channel_routing(settings_key, routing)# Build confirmation message- parts = [f"Backend: **{backend}**"]+ parts = [f"{self._t('routing.label.backend')}: **{backend}**"]if backend == "opencode":if opencode_agent:- parts.append(f"Agent: **{opencode_agent}**")+ parts.append(f"{self._t('routing.label.agent')}: **{opencode_agent}**")if opencode_model:- parts.append(f"Model: **{opencode_model}**")+ parts.append(f"{self._t('routing.label.model')}: **{opencode_model}**")if opencode_reasoning_effort:- parts.append(f"Reasoning Effort: **{opencode_reasoning_effort}**")+ parts.append(+ f"{self._t('routing.label.reasoningEffort')}: **{opencode_reasoning_effort}**"+ )elif backend == "claude":if claude_agent:- parts.append(f"Agent: **{claude_agent}**")+ parts.append(f"{self._t('routing.label.agent')}: **{claude_agent}**")if claude_model:- parts.append(f"Model: **{claude_model}**")+ parts.append(f"{self._t('routing.label.model')}: **{claude_model}**")elif backend == "codex":if codex_model:- parts.append(f"Model: **{codex_model}**")+ parts.append(f"{self._t('routing.label.model')}: **{codex_model}**")if codex_reasoning_effort:- parts.append(f"Reasoning Effort: **{codex_reasoning_effort}**")+ parts.append(+ f"{self._t('routing.label.reasoningEffort')}: **{codex_reasoning_effort}**"+ )# Create context for confirmation messagecontext = MessageContext(@@ -985,7 +1016,7 @@ class Controller:await self.im_client.send_message(context,- f"✅ Agent routing updated!\n" + "\n".join(parts),+ f"✅ {self._t('success.routingUpdated')}\n" + "\n".join(parts),parse_mode="markdown",)@@ -1003,7 +1034,10 @@ class Controller:channel_id=channel_id if channel_id else user_id,platform_specific={},)- await self.im_client.send_message(context, f"❌ Failed to update routing: {str(e)}")+ await self.im_client.send_message(+ context,+ f"❌ {self._t('error.routingUpdateFailed', error=str(e))}",+ )# Main run methoddef run(self):diff --git a/core/handlers/command_handlers.py b/core/handlers/command_handlers.pyindex d285f6bd8..a639b6a07 100644--- a/core/handlers/command_handlers.py+++ b/core/handlers/command_handlers.py@@ -5,6 +5,7 @@ import loggingfrom typing import Optionalfrom modules.agents import AgentRequest, get_agent_display_namefrom modules.im import MessageContext, InlineKeyboard, InlineButton+from vibe.i18n import t as i18n_tlogger = logging.getLogger(__name__)@@ -20,6 +21,14 @@ class CommandHandlers:self.session_manager = controller.session_managerself.settings_manager = controller.settings_manager+ def _get_lang(self) -> str:+ """Get the global language setting from config."""+ return getattr(self.config, "language", "en")++ def _t(self, key: str, **kwargs) -> str:+ """Translate a key using the global language setting."""+ return i18n_t(key, self._get_lang(), **kwargs)+def _get_channel_context(self, context: MessageContext) -> MessageContext:"""Get context for channel messages (no thread)"""# For Slack: send command responses directly to channel, not in thread@@ -51,7 +60,7 @@ class CommandHandlers:channel_info = {"id": context.channel_id,"name": (- "Direct Message"+ self._t("command.start.directMessage")if context.channel_id.startswith("D")else context.channel_id),@@ -69,7 +78,7 @@ class CommandHandlers:# Build welcome message using formatter to handle escaping properlylines = [- formatter.format_bold("Welcome to Vibe Remote!"),+ formatter.format_bold(self._t("command.start.welcome")),"",f"Platform: {formatter.format_text(platform_name)}",f"Agent: {formatter.format_text(agent_display_name)}",@@ -108,34 +117,34 @@ class CommandHandlers:buttons = [# Row 1: Directory management[- InlineButton(text="📁 Current Dir", callback_data="cmd_cwd"),- InlineButton(text="📂 Change Work Dir", callback_data="cmd_change_cwd"),+ InlineButton(text=f"📁 {self._t('button.currentDir')}", callback_data="cmd_cwd"),+ InlineButton(text=f"📂 {self._t('button.changeDir')}", callback_data="cmd_change_cwd"),],# Row 2: Session and Settings[- InlineButton(text="🔄 Clear All Session", callback_data="cmd_clear"),- InlineButton(text="⚙️ Settings", callback_data="cmd_settings"),+ InlineButton(text=f"🔄 {self._t('button.clearSession')}", callback_data="cmd_clear"),+ InlineButton(text=f"⚙️ {self._t('button.settings')}", callback_data="cmd_settings"),],# Row 3: Resume + Agent/Model switching[- InlineButton(text="⏮️ Resume Session", callback_data="cmd_resume"),- InlineButton(text="🤖 Agent Settings", callback_data="cmd_routing"),+ InlineButton(text=f"⏮️ {self._t('button.resumeSession')}", callback_data="cmd_resume"),+ InlineButton(text=f"🤖 {self._t('button.agentSettings')}", callback_data="cmd_routing"),],# Row 4: Help- [InlineButton(text="ℹ️ How it Works", callback_data="info_how_it_works")],+ [InlineButton(text=f"ℹ️ {self._t('button.howItWorks')}", callback_data="info_how_it_works")],]keyboard = InlineKeyboard(buttons=buttons)- welcome_text = f"""🎉 **Welcome to Vibe Remote!**+ welcome_text = f"""🎉 **{self._t("command.start.welcome")}**-👋 Hello **{user_name}**!-🔧 Platform: **{platform_name}**-🤖 Agent: **{agent_display_name}**-📍 Channel: **{channel_info.get('name', 'Unknown')}**+👋 {self._t("command.start.greeting", name=user_name)}+🔧 {self._t("command.start.platform", platform=platform_name)}+🤖 {self._t("command.start.agent", agent=agent_display_name)}+📍 {self._t("command.start.channel", channel=channel_info.get('name', 'Unknown'))}-**Quick Actions:**-Use the buttons below to manage your {agent_display_name} sessions, or simply type any message to start chatting with {agent_display_name}!"""+**{self._t("command.start.quickActions")}**+{self._t("command.start.quickActionsDesc", agent=agent_display_name)}"""# Send command response to channel (not in thread)channel_context = self._get_channel_context(context)@@ -151,16 +160,13 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tycleared = await self.controller.agent_service.clear_sessions(settings_key)if not cleared:- full_response = (- "📋 No active sessions to clear.\n🔄 Session state has been reset."- )+ full_response = f"📋 {self._t('command.clear.noSessions')}"else:details = "\n".join(- f"• {agent} → {count} session(s)" for agent, count in cleared.items()- )- full_response = (- "✅ Cleared active sessions for:\n" f"{details}\n🔄 All sessions reset."+ f"• {self._t('command.clear.sessionItem', agent=agent, count=count)}"+ for agent, count in cleared.items())+ full_response = f"✅ {self._t('command.clear.cleared', details=details)}"channel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context, full_response)@@ -171,7 +177,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tytry:channel_context = self._get_channel_context(context)await self.im_client.send_message(- channel_context, f"❌ Error clearing session: {str(e)}"+ channel_context, f"❌ {self._t('error.clearSession', error=str(e))}")except Exception as send_error:logger.error(@@ -188,16 +194,16 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tyformatter = self.im_client.formatter# Format path properly with code block- path_line = f"📁 Current Working Directory:\n{formatter.format_code_inline(absolute_path)}"+ path_line = f"📁 {self._t('command.cwd.current')}\n{formatter.format_code_inline(absolute_path)}"# Build status linesstatus_lines = []if os.path.exists(absolute_path):- status_lines.append("✅ Directory exists")+ status_lines.append(f"✅ {self._t('command.cwd.exists')}")else:- status_lines.append("⚠️ Directory does not exist")+ status_lines.append(f"⚠️ {self._t('command.cwd.notExists')}")- status_lines.append("💡 This is where Agent will execute commands")+ status_lines.append(f"💡 {self._t('command.cwd.hint')}")# Combine all partsresponse_text = path_line + "\n" + "\n".join(status_lines)@@ -208,7 +214,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tylogger.error(f"Error getting cwd: {e}")channel_context = self._get_channel_context(context)await self.im_client.send_message(- channel_context, f"Error getting working directory: {str(e)}"+ channel_context, f"❌ {self._t('error.cwdGetFailed', error=str(e))}")async def handle_set_cwd(self, context: MessageContext, args: str):@@ -217,7 +223,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tyif not args:channel_context = self._get_channel_context(context)await self.im_client.send_message(- channel_context, "Usage: /set_cwd <path>"+ channel_context, self._t("command.cwd.usage"))return@@ -236,13 +242,13 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tyexcept Exception as e:channel_context = self._get_channel_context(context)await self.im_client.send_message(- channel_context, f"❌ Cannot create directory: {str(e)}"+ channel_context, f"❌ {self._t('error.cwdCreateFailed', error=str(e))}")returnif not os.path.isdir(absolute_path):formatter = self.im_client.formatter- error_text = f"❌ Path exists but is not a directory: {formatter.format_code_inline(absolute_path)}"+ error_text = f"❌ {self._t('error.cwdNotDirectory', path=formatter.format_code_inline(absolute_path))}"channel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context, error_text)return@@ -254,10 +260,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tylogger.info(f"User {context.user_id} changed cwd to: {absolute_path}")formatter = self.im_client.formatter- response_text = (- f"✅ Working directory changed to:\n"- f"{formatter.format_code_inline(absolute_path)}"- )+ response_text = f"✅ {self._t('success.cwdChanged', path=formatter.format_code_inline(absolute_path))}"channel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context, response_text)@@ -265,7 +268,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tylogger.error(f"Error setting cwd: {e}")channel_context = self._get_channel_context(context)await self.im_client.send_message(- channel_context, f"❌ Error setting working directory: {str(e)}"+ channel_context, f"❌ {self._t('error.cwdSetFailed', error=str(e))}")async def handle_change_cwd_modal(self, context: MessageContext):@@ -275,7 +278,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tychannel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context,- "📂 To change working directory, use:\n`/set_cwd <path>`\n\nExample:\n`/set_cwd ~/projects/myapp`",+ f"📂 {self._t('command.cwd.changeInstructions')}",)return@@ -299,14 +302,14 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tychannel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context,- "❌ Failed to open directory change dialog. Please try again.",+ f"❌ {self._t('error.cwdChangeFailed')}",)else:# No trigger_id, show instructionschannel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context,- "📂 Click the 'Change Work Dir' button in the @Vibe Remote /start menu to change working directory.",+ f"📂 {self._t('command.cwd.clickButton')}",)async def handle_resume(self, context: MessageContext):@@ -315,7 +318,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tychannel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context,- "⏮️ Resume is currently available only on Slack. Continue in the same thread to auto-resume.",+ f"⏮️ {self._t('command.resume.slackOnly')}",)return@@ -328,7 +331,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tychannel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context,- "⏮️ Please click the Resume button inside Slack to open the picker.",+ f"⏮️ {self._t('command.resume.clickButton')}",)return@@ -339,7 +342,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tychannel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context,- "ℹ️ No stored sessions found. You can still paste a session ID manually in the resume modal.",+ f"ℹ️ {self._t('command.resume.noStoredSessions')}",)try:@@ -354,7 +357,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tylogger.error(f"Error opening resume modal: {e}")channel_context = self._get_channel_context(context)await self.im_client.send_message(- channel_context, "❌ Failed to open resume dialog. Please try again."+ channel_context, f"❌ {self._t('error.resumeFailed')}")async def handle_stop(self, context: MessageContext, args: str = ""):@@ -381,7 +384,7 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply tyif not handled:channel_context = self._get_channel_context(context)await self.im_client.send_message(- channel_context, "ℹ️ No active session to stop for this channel."+ channel_context, f"ℹ️ {self._t('command.stop.noActiveSession')}")except Exception as e:@@ -389,5 +392,5 @@ Use the buttons below to manage your {agent_display_name} sessions, or simply ty# For errors, still use original context to maintain thread consistencyawait self.im_client.send_message(context, # Use original context- f"❌ Error sending stop command: {str(e)}",+ f"❌ {self._t('error.stopFailed', error=str(e))}",)diff --git a/core/handlers/message_handler.py b/core/handlers/message_handler.pyindex 4b37b3360..64426bb09 100644--- a/core/handlers/message_handler.py+++ b/core/handlers/message_handler.py@@ -6,6 +6,7 @@ from typing import Optional, Listfrom modules.agents import AgentRequestfrom modules.im import MessageContextfrom modules.im.base import FileAttachment+from vibe.i18n import t as i18n_tlogger = logging.getLogger(__name__)@@ -32,6 +33,12 @@ class MessageHandler:"""Get settings key - delegate to controller"""return self.controller._get_settings_key(context)+ def _get_lang(self) -> str:+ return getattr(self.config, "language", "en")++ def _t(self, key: str, **kwargs) -> str:+ return i18n_t(key, self._get_lang(), **kwargs)+def _get_target_context(self, context: MessageContext) -> MessageContext:"""Get target context for sending messages"""# For Slack, use thread for replies if enabled@@ -254,7 +261,10 @@ class MessageHandler:await self.im_client.remove_reaction(context, ack_reaction_message_id, ack_reaction_emoji)except Exception as cleanup_err:logger.debug(f"Failed to clean up reaction on error: {cleanup_err}")- await self.im_client.send_message(context, self.formatter.format_error(f"Error: {str(e)}"))+ await self.im_client.send_message(+ context,+ self.formatter.format_error(self._t("error.processMessageFailed", error=str(e))),+ )async def handle_callback_query(self, context: MessageContext, callback_data: str):"""Route callback queries to appropriate handlers"""@@ -309,9 +319,9 @@ class MessageHandler:# Generic info handlerinfo_type = callback_data.replace("info_", "")info_text = self.formatter.format_info_message(- title=f"Info: {info_type}",+ title=self._t("info.genericTitle", topic=info_type),emoji="ℹ️",- footer="This feature is coming soon!",+ footer=self._t("info.genericFooter"),)await self.im_client.send_message(context, info_text)@@ -351,14 +361,14 @@ class MessageHandler:logger.warning(f"Unknown callback data: {callback_data}")await self.im_client.send_message(context,- self.formatter.format_warning(f"Unknown action: {callback_data}"),+ self.formatter.format_warning(self._t("error.unknownAction", action=callback_data)),)except Exception as e:logger.error(f"Error handling callback query: {e}", exc_info=True)await self.im_client.send_message(context,- self.formatter.format_error(f"Error processing action: {str(e)}"),+ self.formatter.format_error(self._t("error.processActionFailed", error=str(e))),)async def _handle_inline_stop(self, context: MessageContext) -> bool:@@ -384,7 +394,7 @@ class MessageHandler:await self._handle_missing_agent(context, agent_name)return Falseif not handled:- await self.im_client.send_message(context, "ℹ️ No active session to stop.")+ await self.im_client.send_message(context, f"ℹ️ {self._t('command.stop.noActiveSession')}")return handledexcept Exception as e:logger.error(f"Error handling inline stop: {e}", exc_info=True)@@ -394,9 +404,7 @@ class MessageHandler:"""Notify user when a requested agent backend is unavailable."""target = agent_name or self.controller.agent_service.default_agentmsg = (- f"❌ Agent `{target}` is not configured. "- "Make sure the Codex CLI is installed and environment variables are set "- "if this channel is routed to Codex."+ f"❌ {self._t('error.agentNotConfigured', agent=target)}")await self.im_client.send_message(context, msg)@@ -428,7 +436,8 @@ class MessageHandler:def _get_ack_text(self, agent_name: str) -> str:"""Unified acknowledgement text before agent processing."""label = agent_name or self.controller.agent_service.default_agent- return f"📨 {label.capitalize()} received, processing..."+ agent_label = label.capitalize() if label else ""+ return f"📨 {self._t('message.ack', agent=agent_label)}"async def _process_file_attachments(self, context: MessageContext, working_path: str) -> Optional[list]:"""Download and process file attachments from the message.diff --git a/core/handlers/session_handler.py b/core/handlers/session_handler.pyindex 57e67b89e..1d40919a6 100644--- a/core/handlers/session_handler.py+++ b/core/handlers/session_handler.py@@ -5,6 +5,7 @@ import loggingfrom typing import Optional, Dict, Any, Tuplefrom modules.im import MessageContextfrom claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions+from vibe.i18n import t as i18n_tlogger = logging.getLogger(__name__)@@ -27,6 +28,12 @@ class SessionHandler:def _get_settings_key(self, context: MessageContext) -> str:"""Get settings key - delegate to controller"""return self.controller._get_settings_key(context)++ def _get_lang(self) -> str:+ return getattr(self.config, "language", "en")++ def _t(self, key: str, **kwargs) -> str:+ return i18n_t(key, self._get_lang(), **kwargs)def get_base_session_id(self, context: MessageContext) -> str:"""Get base session ID based on platform and context (without path)"""@@ -266,7 +273,7 @@ class SessionHandler:await self.im_client.send_message(context,self.formatter.format_error(- "Session error detected. Session has been reset. Please try your message again."+ self._t("error.sessionReset")))elif "Session is broken" in error_msg or "Connection closed" in error_msg or "Connection lost" in error_msg:@@ -277,7 +284,7 @@ class SessionHandler:await self.im_client.send_message(context,self.formatter.format_error(- "Connection to Claude was lost. Please try your message again."+ self._t("error.sessionConnectionLost")))else:@@ -285,7 +292,7 @@ class SessionHandler:logger.error(f"Error in session {composite_key}: {error}")await self.im_client.send_message(context,- self.formatter.format_error(f"An error occurred: {error_msg}")+ self.formatter.format_error(self._t("error.sessionGeneric", error=error_msg)))def capture_session_id(self, base_session_id: str, claude_session_id: str, settings_key: str):diff --git a/core/handlers/settings_handler.py b/core/handlers/settings_handler.pyindex e2f2d3e8d..1aac97c8c 100644--- a/core/handlers/settings_handler.py+++ b/core/handlers/settings_handler.py@@ -3,6 +3,7 @@import loggingfrom modules.agents import get_agent_display_namefrom modules.im import MessageContext, InlineKeyboard, InlineButton+from vibe.i18n import t as i18n_tlogger = logging.getLogger(__name__)@@ -22,6 +23,12 @@ class SettingsHandler:"""Get settings key - delegate to controller"""return self.controller._get_settings_key(context)+ def _get_lang(self) -> str:+ return getattr(self.config, "language", "en")++ def _t(self, key: str, **kwargs) -> str:+ return i18n_t(key, self._get_lang(), **kwargs)+def _get_agent_display_name(self, context: MessageContext) -> str:"""Return a friendly agent name for the current context."""agent_name = self.controller.resolve_agent_for_context(context)@@ -40,7 +47,7 @@ class SettingsHandler:except Exception as e:logger.error(f"Error showing settings: {e}")- await self.im_client.send_message(context, f"❌ Error showing settings: {str(e)}")+ await self.im_client.send_message(context, f"❌ {self._t('error.showSettings', error=str(e))}")async def _handle_settings_traditional(self, context: MessageContext):"""Handle settings for non-Slack platforms"""@@ -100,8 +107,8 @@ class SettingsHandler:current_require_mention = self.settings_manager.get_require_mention_override(settings_key)global_require_mention = self.config.slack.require_mention- # Get current language override for this channel- current_language = self.settings_manager.get_language_override(settings_key)+ # Get current language from global config+ current_language = self.config.languagetry:await self.im_client.open_settings_modal(@@ -116,16 +123,16 @@ class SettingsHandler:)except Exception as e:logger.error(f"Error opening settings modal: {e}")- await self.im_client.send_message(context, "❌ Failed to open settings. Please try again.")+ await self.im_client.send_message(context, f"❌ {self._t('error.settingsFailed')}")else:# No trigger_id, show button to open modal- buttons = [[InlineButton(text="🛠️ Open Settings", callback_data="open_settings_modal")]]+ buttons = [[InlineButton(text=f"🛠️ {self._t('button.settings')}", callback_data="open_settings_modal")]]keyboard = InlineKeyboard(buttons=buttons)await self.im_client.send_message_with_buttons(context,- f"⚙️ *Personalization Settings*\n\nConfigure how {self._get_agent_display_name(context)} messages appear in your Slack workspace.",+ f"⚙️ *{self._t('settings.personalizationTitle')}*\n\n{self._t('settings.personalizationDesc', agent=self._get_agent_display_name(context))}",keyboard,)@@ -149,7 +156,7 @@ class SettingsHandler:checkbox = "☑️" if is_shown_now else "⬜"display_name = display_names.get(mt, mt)button = InlineButton(- text=f"{checkbox} Show {display_name}",+ text=f"{checkbox} {self._t('settings.showMessageType', name=display_name)}",callback_data=f"toggle_msg_{mt}",)row.append(button)@@ -159,7 +166,7 @@ class SettingsHandler:buttons.append(row)row = []- buttons.append([InlineButton("ℹ️ About Message Types", callback_data="info_msg_types")])+ buttons.append([InlineButton(f"ℹ️ {self._t('button.aboutMessageTypes')}", callback_data="info_msg_types")])keyboard = InlineKeyboard(buttons=buttons)@@ -169,16 +176,19 @@ class SettingsHandler:# Answer callback (for Telegram)display_name = display_names.get(msg_type, msg_type)- action = "shown" if is_shown else "hidden"+ action = self._t("settings.visibilityShown") if is_shown else self._t("settings.visibilityHidden")# Platform-specific callback answering- await self.im_client.send_message(context, f"{display_name} messages are now {action}")+ await self.im_client.send_message(+ context,+ self._t("settings.messageTypeStatus", name=display_name, action=action),+ )except Exception as e:logger.error(f"Error toggling message type {msg_type}: {e}")await self.im_client.send_message(context,- self.formatter.format_error(f"Failed to toggle setting: {str(e)}"),+ self.formatter.format_error(self._t("error.toggleSettingFailed", error=str(e))),)async def handle_info_message_types(self, context: MessageContext):@@ -188,15 +198,15 @@ class SettingsHandler:# Use the new format_info_message method for clean, platform-agnostic formattinginfo_text = formatter.format_info_message(- title="Message Types Info:",+ title=self._t("info.messageTypesTitle"),emoji="📋",items=[- ("System", "System initialization and status messages"),- ("Toolcall", "Agent tool name + params (one line)"),- ("Assistant", "Agent responses and explanations"),- ("Result", "Final execution result (always sent)"),+ (self._t("messageType.system"), self._t("messageType.systemDesc")),+ (self._t("messageType.toolcall"), self._t("messageType.toolcallDesc")),+ (self._t("messageType.assistant"), self._t("messageType.assistantDesc")),+ (self._t("messageType.result"), self._t("messageType.resultDesc")),],- footer="Hidden messages won't be sent to your IM platform.",+ footer=self._t("info.messageTypesFooter"),)# Send as new message@@ -205,7 +215,7 @@ class SettingsHandler:except Exception as e:logger.error(f"Error in info_msg_types handler: {e}", exc_info=True)- await self.im_client.send_message(context, "❌ Error showing message types info")+ await self.im_client.send_message(context, f"❌ {self._t('error.messageTypesInfoFailed')}")async def handle_info_how_it_works(self, context: MessageContext):"""Show information about how the bot works"""@@ -215,16 +225,16 @@ class SettingsHandler:# Use format_info_message for clean, platform-agnostic formattinginfo_text = formatter.format_info_message(- title="How Vibe Remote Works:",+ title=self._t("info.howItWorksTitle"),emoji="📚",items=[- ("Real-time", f"Messages are immediately sent to {agent_label}"),- ("Persistent", "Each chat maintains its own conversation context"),- ("Commands", "Use @Vibe Remote /start for menu, @Vibe Remote /clear to reset session"),- ("Work Dir", "Change working directory with /set_cwd or via menu"),- ("Settings", "Customize message visibility in Settings"),+ (self._t("info.howItWorksRealtimeLabel"), self._t("info.howItWorksRealtimeDesc", agent=agent_label)),+ (self._t("info.howItWorksPersistentLabel"), self._t("info.howItWorksPersistentDesc")),+ (self._t("info.howItWorksCommandsLabel"), self._t("info.howItWorksCommandsDesc")),+ (self._t("info.howItWorksWorkDirLabel"), self._t("info.howItWorksWorkDirDesc")),+ (self._t("info.howItWorksSettingsLabel"), self._t("info.howItWorksSettingsDesc")),],- footer=f"Just type normally to chat with {agent_label}!",+ footer=self._t("info.howItWorksFooter", agent=agent_label),)# Send as new message@@ -233,7 +243,7 @@ class SettingsHandler:except Exception as e:logger.error(f"Error in handle_info_how_it_works: {e}", exc_info=True)- await self.im_client.send_message(context, "❌ Error showing help information")+ await self.im_client.send_message(context, f"❌ {self._t('error.helpInfoFailed')}")async def handle_routing(self, context: MessageContext):"""Handle routing command - show agent/model selection"""@@ -245,12 +255,11 @@ class SettingsHandler:# For other platforms, show a simple messageawait self.im_client.send_message(context,- "🤖 Agent switching is currently only available in Slack. "- "Use Slack Agent Settings to configure routing.",+ self._t("routing.slackOnly"),)except Exception as e:logger.error(f"Error showing routing settings: {e}", exc_info=True)- await self.im_client.send_message(context, f"❌ Error showing routing settings: {str(e)}")+ await self.im_client.send_message(context, f"❌ {self._t('error.routingFailed', error=str(e))}")async def _handle_routing_slack(self, context: MessageContext):"""Handle routing for Slack using modal dialog"""@@ -261,7 +270,7 @@ class SettingsHandler:buttons = [[InlineButton(- text="🤖 Open Agent Settings",+ text=f"🤖 {self._t('button.agentSettings')}",callback_data="open_routing_modal",)]@@ -269,7 +278,7 @@ class SettingsHandler:keyboard = InlineKeyboard(buttons=buttons)await self.im_client.send_message_with_buttons(context,- "🤖 *Agent & Model Settings*\n\nConfigure which backend to use for this channel.",+ f"🤖 *{self._t('routing.introTitle')}*\n\n{self._t('routing.introDesc')}",keyboard,)return@@ -353,4 +362,4 @@ class SettingsHandler:)except Exception as e:logger.error(f"Error opening routing modal: {e}", exc_info=True)- await self.im_client.send_message(context, "❌ Failed to open settings. Please try again.")+ await self.im_client.send_message(context, f"❌ {self._t('error.routingModalFailed')}")diff --git a/modules/im/slack.py b/modules/im/slack.pyindex bccbc1a3c..2ed1a783e 100644--- a/modules/im/slack.py+++ b/modules/im/slack.py@@ -63,9 +63,10 @@ class SlackBot(BaseIMClient):self._controller = controllerdef _get_lang(self, channel_id: Optional[str] = None) -> str:- """Get the language for a channel from settings."""- if channel_id and self.settings_manager:- return self.settings_manager.get_language(channel_id, default="en")+ """Get the global language setting from config."""+ # Read from global config via controller+ if self._controller and hasattr(self._controller, "config"):+ return getattr(self._controller.config, "language", "en")return "en"def _t(self, key: str, channel_id: Optional[str] = None, **kwargs) -> str:@@ -1701,7 +1702,7 @@ class SlackBot(BaseIMClient):"type": "section","text": {"type": "mrkdwn",- "text": "Select a saved session or paste a session ID to resume work in this thread.",+ "text": self._t("modal.resume.description"),},},]@@ -1712,12 +1713,12 @@ class SlackBot(BaseIMClient):"type": "input","block_id": "session_block","optional": True,- "label": {"type": "plain_text", "text": "Pick an existing session", "emoji": True},+ "label": {"type": "plain_text", "text": self._t("modal.resume.pickExisting"), "emoji": True},"element": {"type": "static_select","action_id": "session_select","option_groups": session_option_groups,- "placeholder": {"type": "plain_text", "text": "Select a session", "emoji": True},+ "placeholder": {"type": "plain_text", "text": self._t("modal.resume.selectSession"), "emoji": True},},})@@ -1728,7 +1729,7 @@ class SlackBot(BaseIMClient):"elements": [{"type": "mrkdwn",- "text": "_Showing the first 100 saved sessions. Paste a session ID below for others._",+ "text": f"_{self._t('modal.resume.showingFirst100')}_",}],}@@ -1740,7 +1741,7 @@ class SlackBot(BaseIMClient):"elements": [{"type": "mrkdwn",- "text": "_No stored sessions found. Paste a session ID below to resume._",+ "text": f"_{self._t('modal.resume.noSessionsFound')}_",}],}@@ -1751,11 +1752,11 @@ class SlackBot(BaseIMClient):"type": "input","block_id": "manual_block","optional": True,- "label": {"type": "plain_text", "text": "Or paste a session ID", "emoji": True},+ "label": {"type": "plain_text", "text": self._t("modal.resume.pasteId"), "emoji": True},"element": {"type": "plain_text_input","action_id": "manual_input",- "placeholder": {"type": "plain_text", "text": "e.g., ses_12345", "emoji": True},+ "placeholder": {"type": "plain_text", "text": self._t("modal.resume.pasteIdPlaceholder"), "emoji": True},"dispatch_action_config": {"trigger_actions_on": ["on_character_entered"],},@@ -1780,9 +1781,9 @@ class SlackBot(BaseIMClient):"type": "modal","callback_id": "resume_session_modal","private_metadata": json.dumps(metadata),- "title": {"type": "plain_text", "text": "Resume Session", "emoji": True},- "submit": {"type": "plain_text", "text": "Resume", "emoji": True},- "close": {"type": "plain_text", "text": "Cancel", "emoji": True},+ "title": {"type": "plain_text", "text": self._t("modal.resume.title"), "emoji": True},+ "submit": {"type": "plain_text", "text": self._t("common.resume"), "emoji": True},+ "close": {"type": "plain_text", "text": self._t("common.cancel"), "emoji": True},"blocks": blocks,}@@ -1836,12 +1837,12 @@ class SlackBot(BaseIMClient):{"type": "input","block_id": "agent_block",- "label": {"type": "plain_text", "text": "Agent backend", "emoji": True},+ "label": {"type": "plain_text", "text": self._t("modal.resume.agentBackend"), "emoji": True},"element": {"type": "static_select","action_id": "agent_select","options": agent_options,- "placeholder": {"type": "plain_text", "text": "Select agent backend", "emoji": True},+ "placeholder": {"type": "plain_text", "text": self._t("modal.resume.selectAgentBackend"), "emoji": True},},})@@ -1850,9 +1851,9 @@ class SlackBot(BaseIMClient):"type": "modal","callback_id": "resume_session_modal","private_metadata": metadata_raw,- "title": {"type": "plain_text", "text": "Resume Session", "emoji": True},- "submit": {"type": "plain_text", "text": "Resume", "emoji": True},- "close": {"type": "plain_text", "text": "Cancel", "emoji": True},+ "title": {"type": "plain_text", "text": self._t("modal.resume.title"), "emoji": True},+ "submit": {"type": "plain_text", "text": self._t("common.resume"), "emoji": True},+ "close": {"type": "plain_text", "text": self._t("common.cancel"), "emoji": True},"blocks": new_blocks,}@@ -1945,7 +1946,7 @@ class SlackBot(BaseIMClient):backend_select = {"type": "static_select","action_id": "backend_select",- "placeholder": {"type": "plain_text", "text": "Select backend"},+ "placeholder": {"type": "plain_text", "text": self._t("modal.routing.selectBackend")},"options": backend_options,"initial_option": initial_backend,}@@ -1956,7 +1957,7 @@ class SlackBot(BaseIMClient):"type": "section","text": {"type": "mrkdwn",- "text": f"*Current Backend:* {backend_display_names.get(current_backend, current_backend)}",+ "text": f"*{self._t('modal.routing.currentBackend')}* {backend_display_names.get(current_backend, current_backend)}",},},{"type": "divider"},@@ -1965,7 +1966,7 @@ class SlackBot(BaseIMClient):"block_id": "backend_block","dispatch_action": True,"element": backend_select,- "label": {"type": "plain_text", "text": "Backend"},+ "label": {"type": "plain_text", "text": self._t("modal.routing.backend")},},]@@ -1996,7 +1997,7 @@ class SlackBot(BaseIMClient):)# Build agent options- agent_options = [{"text": {"type": "plain_text", "text": "(Default)"}, "value": "__default__"}]+ agent_options = [{"text": {"type": "plain_text", "text": self._t("common.default")}, "value": "__default__"}]for agent in opencode_agents:agent_name = agent.get("name", "")if agent_name:@@ -2018,15 +2019,15 @@ class SlackBot(BaseIMClient):agent_select = {"type": "static_select","action_id": "opencode_agent_select",- "placeholder": {"type": "plain_text", "text": "Select OpenCode agent"},+ "placeholder": {"type": "plain_text", "text": self._t("modal.routing.selectOpencodeAgent")},"options": agent_options,"initial_option": initial_agent,}# Build model options- default_label = "(Default)"+ default_label = self._t("common.default")if default_model_str:- default_label = f"(Default) - {default_model_str}"+ default_label = f"{self._t('common.default')} - {default_model_str}"model_options = [{"text": {"type": "plain_text", "text": default_label}, "value": "__default__"}]# Add models from providers@@ -2123,7 +2124,7 @@ class SlackBot(BaseIMClient):model_select = {"type": "static_select","action_id": "opencode_model_select",- "placeholder": {"type": "plain_text", "text": "Select model"},+ "placeholder": {"type": "plain_text", "text": self._t("modal.routing.selectModel")},"options": model_options,"initial_option": initial_model,}@@ -2168,19 +2169,19 @@ class SlackBot(BaseIMClient):break# Build options from variants or use fallback- reasoning_effort_options = [{"text": {"type": "plain_text", "text": "(Default)"}, "value": "__default__"}]+ reasoning_effort_options = [{"text": {"type": "plain_text", "text": self._t("common.default")}, "value": "__default__"}]if model_variants:# Use model-specific variants with stable orderingvariant_order = ["none", "minimal", "low", "medium", "high", "xhigh", "max"]variant_display_names = {- "none": "None",- "minimal": "Minimal",- "low": "Low",- "medium": "Medium",- "high": "High",- "xhigh": "Extra High",- "max": "Max",+ "none": self._t("reasoning.none"),+ "minimal": self._t("reasoning.minimal"),+ "low": self._t("reasoning.low"),+ "medium": self._t("reasoning.medium"),+ "high": self._t("reasoning.high"),+ "xhigh": self._t("reasoning.xhigh"),+ "max": self._t("reasoning.max"),}# Sort variants by predefined order, unknown variants go to end alphabeticallysorted_variants = sorted(@@ -2202,9 +2203,9 @@ class SlackBot(BaseIMClient):# Fallback to common optionsreasoning_effort_options.extend([- {"text": {"type": "plain_text", "text": "Low"}, "value": "low"},- {"text": {"type": "plain_text", "text": "Medium"}, "value": "medium"},- {"text": {"type": "plain_text", "text": "High"}, "value": "high"},+ {"text": {"type": "plain_text", "text": self._t("reasoning.low")}, "value": "low"},+ {"text": {"type": "plain_text", "text": self._t("reasoning.medium")}, "value": "medium"},+ {"text": {"type": "plain_text", "text": self._t("reasoning.high")}, "value": "high"},])@@ -2219,7 +2220,7 @@ class SlackBot(BaseIMClient):reasoning_select = {"type": "static_select","action_id": reasoning_action_id,- "placeholder": {"type": "plain_text", "text": "Select reasoning effort"},+ "placeholder": {"type": "plain_text", "text": self._t("modal.routing.selectReasoningEffort")},"options": reasoning_effort_options,"initial_option": initial_reasoning,}@@ -2232,7 +2233,7 @@ class SlackBot(BaseIMClient):"type": "section","text": {"type": "mrkdwn",- "text": "*OpenCode Settings*",+ "text": f"*{self._t('modal.routing.opencodeSettings')}*",},},{@@ -2241,7 +2242,7 @@ class SlackBot(BaseIMClient):"optional": True,"dispatch_action": True,"element": agent_select,- "label": {"type": "plain_text", "text": "OpenCode Agent"},+ "label": {"type": "plain_text", "text": self._t("modal.routing.opencodeAgent")},},{"type": "input",@@ -2249,14 +2250,14 @@ class SlackBot(BaseIMClient):"optional": True,"dispatch_action": True,"element": model_select,- "label": {"type": "plain_text", "text": "Model"},+ "label": {"type": "plain_text", "text": self._t("modal.routing.model")},},{"type": "input","block_id": "opencode_reasoning_block","optional": True,"element": reasoning_select,- "label": {"type": "plain_text", "text": "Reasoning Effort (Thinking Mode)"},+ "label": {"type": "plain_text", "text": self._t("modal.routing.reasoningEffort")},},])@@ -2278,7 +2279,7 @@ class SlackBot(BaseIMClient):current_cl_model = selected_claude_model# Build agent options- cl_agent_options = [{"text": {"type": "plain_text", "text": "(Default)"}, "value": "__default__"}]+ cl_agent_options = [{"text": {"type": "plain_text", "text": self._t("common.default")}, "value": "__default__"}]for agent in claude_agents:agent_id = agent.get("id", "")agent_name = agent.get("name", agent_id)@@ -2301,13 +2302,13 @@ class SlackBot(BaseIMClient):cl_agent_select = {"type": "static_select","action_id": "claude_agent_select",- "placeholder": {"type": "plain_text", "text": "Select Claude agent"},+ "placeholder": {"type": "plain_text", "text": self._t("modal.routing.selectClaudeAgent")},"options": cl_agent_options,"initial_option": initial_cl_agent,}# Build model options- cl_model_options = [{"text": {"type": "plain_text", "text": "(Default)"}, "value": "__default__"}]+ cl_model_options = [{"text": {"type": "plain_text", "text": self._t("common.default")}, "value": "__default__"}]for model in claude_models:if model:cl_model_options.append(@@ -2341,7 +2342,7 @@ class SlackBot(BaseIMClient):cl_model_select = {"type": "static_select","action_id": "claude_model_select",- "placeholder": {"type": "plain_text", "text": "Select model"},+ "placeholder": {"type": "plain_text", "text": self._t("modal.routing.selectModel")},"options": cl_model_options,"initial_option": initial_cl_model,}@@ -2354,7 +2355,7 @@ class SlackBot(BaseIMClient):"type": "section","text": {"type": "mrkdwn",- "text": "*Claude Settings*",+ "text": f"*{self._t('modal.routing.claudeSettings')}*",},},{@@ -2362,14 +2363,14 @@ class SlackBot(BaseIMClient):"block_id": "claude_agent_block","optional": True,"element": cl_agent_select,- "label": {"type": "plain_text", "text": "Claude Agent"},+ "label": {"type": "plain_text", "text": self._t("modal.routing.claudeAgent")},},{"type": "input","block_id": "claude_model_block","optional": True,"element": cl_model_select,- "label": {"type": "plain_text", "text": "Model"},+ "label": {"type": "plain_text", "text": self._t("modal.routing.model")},},])@@ -2390,7 +2391,7 @@ class SlackBot(BaseIMClient):current_cx_reasoning = selected_codex_reasoning# Build model options- cx_model_options = [{"text": {"type": "plain_text", "text": "(Default)"}, "value": "__default__"}]+ cx_model_options = [{"text": {"type": "plain_text", "text": self._t("common.default")}, "value": "__default__"}]for model in codex_models:if model:cx_model_options.append(@@ -2424,17 +2425,17 @@ class SlackBot(BaseIMClient):cx_model_select = {"type": "static_select","action_id": "codex_model_select",- "placeholder": {"type": "plain_text", "text": "Select model"},+ "placeholder": {"type": "plain_text", "text": self._t("modal.routing.selectModel")},"options": cx_model_options,"initial_option": initial_cx_model,}# Build reasoning effort optionscx_reasoning_options = [- {"text": {"type": "plain_text", "text": "(Default)"}, "value": "__default__"},- {"text": {"type": "plain_text", "text": "Low"}, "value": "low"},- {"text": {"type": "plain_text", "text": "Medium"}, "value": "medium"},- {"text": {"type": "plain_text", "text": "High"}, "value": "high"},+ {"text": {"type": "plain_text", "text": self._t("common.default")}, "value": "__default__"},+ {"text": {"type": "plain_text", "text": self._t("reasoning.low")}, "value": "low"},+ {"text": {"type": "plain_text", "text": self._t("reasoning.medium")}, "value": "medium"},+ {"text": {"type": "plain_text", "text": self._t("reasoning.high")}, "value": "high"},]# Find initial reasoning@@ -2448,7 +2449,7 @@ class SlackBot(BaseIMClient):cx_reasoning_select = {"type": "static_select","action_id": "codex_reasoning_select",- "placeholder": {"type": "plain_text", "text": "Select reasoning effort"},+ "placeholder": {"type": "plain_text", "text": self._t("modal.routing.selectReasoningEffort")},"options": cx_reasoning_options,"initial_option": initial_cx_reasoning,}@@ -2461,7 +2462,7 @@ class SlackBot(BaseIMClient):"type": "section","text": {"type": "mrkdwn",- "text": "*Codex Settings*",+ "text": f"*{self._t('modal.routing.codexSettings')}*",},},{@@ -2469,14 +2470,14 @@ class SlackBot(BaseIMClient):"block_id": "codex_model_block","optional": True,"element": cx_model_select,- "label": {"type": "plain_text", "text": "Model"},+ "label": {"type": "plain_text", "text": self._t("modal.routing.model")},},{"type": "input","block_id": "codex_reasoning_block","optional": True,"element": cx_reasoning_select,- "label": {"type": "plain_text", "text": "Reasoning Effort"},+ "label": {"type": "plain_text", "text": self._t("modal.routing.codexReasoningEffort")},},])@@ -2488,7 +2489,7 @@ class SlackBot(BaseIMClient):"elements": [{"type": "mrkdwn",- "text": "_💡 Select (Default) to use the backend's configured defaults._",+ "text": f"_💡 {self._t('modal.routing.tip')}_",}],}@@ -2498,9 +2499,9 @@ class SlackBot(BaseIMClient):"type": "modal","callback_id": "routing_modal","private_metadata": channel_id,- "title": {"type": "plain_text", "text": "Agent Settings"},- "submit": {"type": "plain_text", "text": "Save"},- "close": {"type": "plain_text", "text": "Cancel"},+ "title": {"type": "plain_text", "text": self._t("modal.routing.title")},+ "submit": {"type": "plain_text", "text": self._t("common.save")},+ "close": {"type": "plain_text", "text": self._t("common.cancel")},"blocks": blocks,}@@ -2568,7 +2569,7 @@ class SlackBot(BaseIMClient):"options": option_items,"placeholder": {"type": "plain_text",- "text": "Select one or more",+ "text": self._t("common.selectOneOrMore"),"emoji": True,},}@@ -2579,7 +2580,7 @@ class SlackBot(BaseIMClient):"options": option_items,"placeholder": {"type": "plain_text",- "text": "Select one",+ "text": self._t("common.selectOne"),"emoji": True,},}@@ -2605,9 +2606,9 @@ class SlackBot(BaseIMClient):"type": "modal","callback_id": "opencode_question_modal","private_metadata": private_metadata,- "title": {"type": "plain_text", "text": "OpenCode", "emoji": True},- "submit": {"type": "plain_text", "text": "Submit", "emoji": True},- "close": {"type": "plain_text", "text": "Cancel", "emoji": True},+ "title": {"type": "plain_text", "text": self._t("modal.question.opencode"), "emoji": True},+ "submit": {"type": "plain_text", "text": self._t("common.submit"), "emoji": True},+ "close": {"type": "plain_text", "text": self._t("common.cancel"), "emoji": True},"blocks": blocks,}@@ -2707,7 +2708,7 @@ class SlackBot(BaseIMClient):"options": option_items,"placeholder": {"type": "plain_text",- "text": "Select one or more",+ "text": self._t("common.selectOneOrMore"),"emoji": True,},}@@ -2718,7 +2719,7 @@ class SlackBot(BaseIMClient):"options": option_items,"placeholder": {"type": "plain_text",- "text": "Select one",+ "text": self._t("common.selectOne"),"emoji": True,},}@@ -2742,15 +2743,15 @@ class SlackBot(BaseIMClient):# Use callback_prefix to generate callback_idcallback_id = f"{callback_prefix}_modal"- title = "Claude Code" if callback_prefix.startswith("claude") else "OpenCode"+ title = self._t("modal.question.claudeCode") if callback_prefix.startswith("claude") else self._t("modal.question.opencode")view = {"type": "modal","callback_id": callback_id,"private_metadata": private_metadata,"title": {"type": "plain_text", "text": title, "emoji": True},- "submit": {"type": "plain_text", "text": "Submit", "emoji": True},- "close": {"type": "plain_text", "text": "Cancel", "emoji": True},+ "submit": {"type": "plain_text", "text": self._t("common.submit"), "emoji": True},+ "close": {"type": "plain_text", "text": self._t("common.cancel"), "emoji": True},"blocks": blocks,}diff --git a/modules/settings_manager.py b/modules/settings_manager.pyindex 3dcefb8fd..248384a51 100644--- a/modules/settings_manager.py+++ b/modules/settings_manager.py@@ -582,51 +582,6 @@ class SettingsManager:return channel_settings.require_mentionreturn None- # ---------------------------------------------- # Per-channel language management- # ---------------------------------------------- def get_language(self, channel_id: Union[int, str], default: str = "en") -> str:- """Get effective language for a channel.-- Args:- channel_id: The channel to check- default: The default language to use if not set-- Returns:- Language code (e.g., "en", "zh").- Uses per-channel setting if set, otherwise falls back to default.- """- self._reload_if_changed()- key = str(channel_id)- channel_settings = self.store.settings.channels.get(key)-- if channel_settings is not None and channel_settings.language is not None:- return channel_settings.language-- return default-- def set_language(self, channel_id: Union[int, str], language: Optional[str]) -> None:- """Set per-channel language.-- Args:- channel_id: The channel to configure- language: Language code (e.g., "en", "zh") or None to use default- """- key = str(channel_id)- channel_settings = self.store.get_channel(key)- channel_settings.language = language- self.store.update_channel(key, channel_settings)- logger.info(f"Updated language for channel {key}: {language}")-- def get_language_override(self, channel_id: Union[int, str]) -> Optional[str]:- """Get the raw per-channel language override (may be None)."""- self._reload_if_changed()- key = str(channel_id)- channel_settings = self.store.settings.channels.get(key)- if channel_settings is not None:- return channel_settings.language- return None-# ---------------------------------------------# Active polls management (for poll restoration on restart)# ---------------------------------------------diff --git a/ui/src/components/LanguageSwitcher.tsx b/ui/src/components/LanguageSwitcher.tsxindex cdc5ba09e..f1cee731d 100644--- a/ui/src/components/LanguageSwitcher.tsx+++ b/ui/src/components/LanguageSwitcher.tsx@@ -1,6 +1,7 @@-import React from 'react';+import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';import { Languages } from 'lucide-react';+import { useApi } from '../context/ApiContext';const languages = [{ code: 'en', label: 'English' },@@ -9,11 +10,42 @@ const languages = [export const LanguageSwitcher: React.FC = () => {const { i18n } = useTranslation();+ const { getConfig, saveConfig } = useApi();+ const [config, setConfig] = useState<any>(null);++ // Load config and sync language on mount+ useEffect(() => {+ const loadConfig = async () => {+ try {+ const cfg = await getConfig();+ setConfig(cfg);+ // Sync i18n with config language+ if (cfg.language && cfg.language !== i18n.language) {+ i18n.changeLanguage(cfg.language);+ }+ } catch {+ // Ignore errors on config load+ }+ };+ loadConfig();+ }, []);const currentLang = languages.find((l) => l.code === i18n.language) || languages[0];- const handleChange = (e: React.ChangeEvent<HTMLSelectElement>) => {- i18n.changeLanguage(e.target.value);+ const handleChange = async (e: React.ChangeEvent<HTMLSelectElement>) => {+ const newLang = e.target.value;+ i18n.changeLanguage(newLang);++ // Save to config+ if (config) {+ try {+ const updatedConfig = { ...config, language: newLang };+ await saveConfig(updatedConfig);+ setConfig(updatedConfig);+ } catch {+ // Ignore save errors - language change already applied locally+ }+ }};return (diff --git a/vibe/api.py b/vibe/api.pyindex 8c1a954bb..20a326bf2 100644--- a/vibe/api.py+++ b/vibe/api.py@@ -58,6 +58,7 @@ def config_to_payload(config: V2Config) -> dict:"ui": config.ui.__dict__,"update": config.update.__dict__,"ack_mode": config.ack_mode,+ "language": config.language,}return payloaddiff --git a/vibe/i18n/en.json b/vibe/i18n/en.jsonindex a952fade9..cb5262cab 100644--- a/vibe/i18n/en.json+++ b/vibe/i18n/en.json@@ -21,14 +21,58 @@"cwdSetFailed": "Error setting working directory: {error}","cwdCreateFailed": "Cannot create directory: {error}","cwdNotDirectory": "Path exists but is not a directory: `{path}`",- "cwdGetFailed": "Error getting working directory: {error}"+ "cwdGetFailed": "Error getting working directory: {error}",+ "showSettings": "Error showing settings: {error}",+ "toggleSettingFailed": "Failed to toggle setting: {error}",+ "messageTypesInfoFailed": "Error showing message types info",+ "helpInfoFailed": "Error showing help information",+ "routingFailed": "Error showing routing settings: {error}",+ "routingModalFailed": "Failed to open agent settings. Please try again.",+ "settingsUpdateFailed": "Failed to update settings: {error}",+ "resumeSubmitFailed": "Failed to resume session: {error}",+ "routingUpdateFailed": "Failed to update routing: {error}",+ "unknownAction": "Unknown action: {action}",+ "processActionFailed": "Error processing action: {error}",+ "agentNotConfigured": "Agent `{agent}` is not configured. Make sure the Codex CLI is installed and environment variables are set if this channel is routed to Codex.",+ "processMessageFailed": "Error: {error}",+ "sessionReset": "Session error detected. Session has been reset. Please try your message again.",+ "sessionConnectionLost": "Connection to Claude was lost. Please try your message again.",+ "sessionGeneric": "An error occurred: {error}"},"success": {"settingsUpdated": "Settings updated successfully!","cwdChanged": "Working directory changed to:\n`{path}`","sessionResumed": "Resumed {agent} session.\nSession ID: `{sessionId}`",+ "sessionResumedTip1": "💬 *Click this message and reply in the thread sidebar* to continue with this session.",+ "sessionResumedTip2": "_(Sending a new message in the channel will start a fresh session.)_","routingUpdated": "Agent routing updated!"},+ "settings": {+ "personalizationTitle": "Personalization Settings",+ "personalizationDesc": "Configure how {agent} messages appear in your Slack workspace.",+ "showMessageType": "Show {name}",+ "visibilityShown": "shown",+ "visibilityHidden": "hidden",+ "messageTypeStatus": "{name} messages are now {action}"+ },+ "info": {+ "messageTypesTitle": "Message Types Info:",+ "messageTypesFooter": "Hidden messages won't be sent to your IM platform.",+ "howItWorksTitle": "How Vibe Remote Works:",+ "howItWorksRealtimeLabel": "Real-time",+ "howItWorksRealtimeDesc": "Messages are immediately sent to {agent}",+ "howItWorksPersistentLabel": "Persistent",+ "howItWorksPersistentDesc": "Each chat maintains its own conversation context",+ "howItWorksCommandsLabel": "Commands",+ "howItWorksCommandsDesc": "Use @Vibe Remote /start for menu, @Vibe Remote /clear to reset session",+ "howItWorksWorkDirLabel": "Work Dir",+ "howItWorksWorkDirDesc": "Change working directory with /set_cwd or via menu",+ "howItWorksSettingsLabel": "Settings",+ "howItWorksSettingsDesc": "Customize message visibility in Settings",+ "howItWorksFooter": "Just type normally to chat with {agent}!",+ "genericTitle": "Info: {topic}",+ "genericFooter": "This feature is coming soon!"+ },"modal": {"settings": {"title": "Settings",@@ -132,15 +176,32 @@"settings": "Settings","resumeSession": "Resume Session","agentSettings": "Agent Settings",- "howItWorks": "How it Works"+ "howItWorks": "How it Works",+ "aboutMessageTypes": "About Message Types"},"messageType": {"system": "System","assistant": "Assistant","toolcall": "Toolcall",+ "result": "Result","systemDesc": "System initialization and status messages","assistantDesc": "Agent responses and explanations",- "toolcallDesc": "Agent tool name + params (one line)"+ "toolcallDesc": "Agent tool name + params (one line)",+ "resultDesc": "Final execution result (always sent)"+ },+ "routing": {+ "slackOnly": "🤖 Agent switching is currently only available in Slack. Use Slack Agent Settings to configure routing.",+ "introTitle": "Agent & Model Settings",+ "introDesc": "Configure which backend to use for this channel.",+ "label": {+ "backend": "Backend",+ "agent": "Agent",+ "model": "Model",+ "reasoningEffort": "Reasoning Effort"+ }+ },+ "message": {+ "ack": "{agent} received, processing..."},"backend": {"claude": "ClaudeCode",diff --git a/vibe/i18n/zh.json b/vibe/i18n/zh.jsonindex e2821d91e..a46554c82 100644--- a/vibe/i18n/zh.json+++ b/vibe/i18n/zh.json@@ -1,90 +1,134 @@{"common": {- "save": "\u4fdd\u5b58",- "cancel": "\u53d6\u6d88",- "submit": "\u63d0\u4ea4",- "change": "\u66f4\u6539",- "resume": "\u6062\u590d",- "default": "(\u9ed8\u8ba4)",- "selectOne": "\u9009\u62e9\u4e00\u4e2a",- "selectOneOrMore": "\u9009\u62e9\u4e00\u4e2a\u6216\u591a\u4e2a",- "processing": "\u6b63\u5728\u5904\u7406 `/{command}`..."+ "save": "保存",+ "cancel": "取消",+ "submit": "提交",+ "change": "更改",+ "resume": "恢复",+ "default": "(默认)",+ "selectOne": "选择一个",+ "selectOneOrMore": "选择一个或多个",+ "processing": "正在处理 `/{command}`..."},"error": {- "channelNotEnabled": "\u6b64\u9891\u9053\u672a\u542f\u7528\u3002\u8bf7\u524d\u5f80\u63a7\u5236\u9762\u677f\u542f\u7528\u5b83\u3002",- "unknownCommand": "\u672a\u77e5\u547d\u4ee4\uff1a`/{command}`\n\n\u8bf7\u4f7f\u7528 `@Vibe Remote /start` \u8bbf\u95ee\u6240\u6709\u673a\u5668\u4eba\u529f\u80fd\u3002",- "clearSession": "\u6e05\u9664\u4f1a\u8bdd\u65f6\u51fa\u9519\uff1a{error}",- "settingsFailed": "\u65e0\u6cd5\u6253\u5f00\u8bbe\u7f6e\u3002\u8bf7\u91cd\u8bd5\u3002",- "cwdChangeFailed": "\u65e0\u6cd5\u6253\u5f00\u76ee\u5f55\u66f4\u6539\u5bf9\u8bdd\u6846\u3002\u8bf7\u91cd\u8bd5\u3002",- "resumeFailed": "\u65e0\u6cd5\u6253\u5f00\u6062\u590d\u5bf9\u8bdd\u6846\u3002\u8bf7\u91cd\u8bd5\u3002",- "stopFailed": "\u53d1\u9001\u505c\u6b62\u547d\u4ee4\u65f6\u51fa\u9519\uff1a{error}",- "cwdSetFailed": "\u8bbe\u7f6e\u5de5\u4f5c\u76ee\u5f55\u65f6\u51fa\u9519\uff1a{error}",- "cwdCreateFailed": "\u65e0\u6cd5\u521b\u5efa\u76ee\u5f55\uff1a{error}",- "cwdNotDirectory": "\u8def\u5f84\u5b58\u5728\u4f46\u4e0d\u662f\u76ee\u5f55\uff1a`{path}`",- "cwdGetFailed": "\u83b7\u53d6\u5de5\u4f5c\u76ee\u5f55\u65f6\u51fa\u9519\uff1a{error}"+ "channelNotEnabled": "此频道未启用。请前往控制面板启用它。",+ "unknownCommand": "未知命令:`/{command}`\n\n请使用 `@Vibe Remote /start` 访问所有机器人功能。",+ "clearSession": "清除会话时出错:{error}",+ "settingsFailed": "无法打开设置。请重试。",+ "cwdChangeFailed": "无法打开目录更改对话框。请重试。",+ "resumeFailed": "无法打开恢复对话框。请重试。",+ "stopFailed": "发送停止命令时出错:{error}",+ "cwdSetFailed": "设置工作目录时出错:{error}",+ "cwdCreateFailed": "无法创建目录:{error}",+ "cwdNotDirectory": "路径存在但不是目录:`{path}`",+ "cwdGetFailed": "获取工作目录时出错:{error}",+ "showSettings": "显示设置时出错:{error}",+ "toggleSettingFailed": "切换设置失败:{error}",+ "messageTypesInfoFailed": "显示消息类型说明时出错",+ "helpInfoFailed": "显示帮助信息时出错",+ "routingFailed": "显示路由设置时出错:{error}",+ "routingModalFailed": "无法打开 Agent 设置。请重试。",+ "settingsUpdateFailed": "更新设置失败:{error}",+ "resumeSubmitFailed": "恢复会话失败:{error}",+ "routingUpdateFailed": "更新路由失败:{error}",+ "unknownAction": "未知操作:{action}",+ "processActionFailed": "处理操作时出错:{error}",+ "agentNotConfigured": "Agent `{agent}` 未配置。若此频道路由到 Codex,请确保已安装 Codex CLI 并设置环境变量。",+ "processMessageFailed": "出错:{error}",+ "sessionReset": "检测到会话错误。会话已重置,请重试。",+ "sessionConnectionLost": "与 Claude 的连接已断开,请重试。",+ "sessionGeneric": "发生错误:{error}"},"success": {- "settingsUpdated": "\u8bbe\u7f6e\u66f4\u65b0\u6210\u529f\uff01",- "cwdChanged": "\u5de5\u4f5c\u76ee\u5f55\u5df2\u66f4\u6539\u4e3a\uff1a\n`{path}`",- "sessionResumed": "\u5df2\u6062\u590d {agent} \u4f1a\u8bdd\u3002\n\u4f1a\u8bddID\uff1a`{sessionId}`",- "routingUpdated": "Agent \u8def\u7531\u5df2\u66f4\u65b0\uff01"+ "settingsUpdated": "设置更新成功!",+ "cwdChanged": "工作目录已更改为:\n`{path}`",+ "sessionResumed": "已恢复 {agent} 会话。\n会话ID:`{sessionId}`",+ "sessionResumedTip1": "💬 *点击此消息并在右侧线程中回复* 以继续该会话。",+ "sessionResumedTip2": "_(在频道中发送新消息将开始新的会话。)_",+ "routingUpdated": "Agent 路由已更新!"+ },+ "settings": {+ "personalizationTitle": "个性化设置",+ "personalizationDesc": "配置 {agent} 的消息在你的 Slack 工作区中的展示方式。",+ "showMessageType": "显示 {name}",+ "visibilityShown": "显示",+ "visibilityHidden": "隐藏",+ "messageTypeStatus": "{name} 消息已设为 {action}"+ },+ "info": {+ "messageTypesTitle": "消息类型说明:",+ "messageTypesFooter": "隐藏的消息类型不会发送到你的 IM 平台。",+ "howItWorksTitle": "Vibe Remote 如何工作:",+ "howItWorksRealtimeLabel": "实时",+ "howItWorksRealtimeDesc": "消息会立即发送给 {agent}",+ "howItWorksPersistentLabel": "持续上下文",+ "howItWorksPersistentDesc": "每个聊天保持独立的上下文",+ "howItWorksCommandsLabel": "命令",+ "howItWorksCommandsDesc": "使用 @Vibe Remote /start 打开菜单,@Vibe Remote /clear 重置会话",+ "howItWorksWorkDirLabel": "工作目录",+ "howItWorksWorkDirDesc": "使用 /set_cwd 或菜单修改工作目录",+ "howItWorksSettingsLabel": "设置",+ "howItWorksSettingsDesc": "在设置中自定义消息可见性",+ "howItWorksFooter": "直接输入消息即可与 {agent} 对话!",+ "genericTitle": "信息:{topic}",+ "genericFooter": "该功能即将上线!"},"modal": {"settings": {- "title": "\u8bbe\u7f6e",- "channelBehavior": "\u9891\u9053\u884c\u4e3a",- "requireMention": "\u9700\u8981 @\u63d0\u53ca\u624d\u54cd\u5e94",- "requireMentionHint": "\u542f\u7528\u540e\uff0c\u673a\u5668\u4eba\u4ec5\u5728\u88ab @\u63d0\u53ca\u65f6\u624d\u5728\u9891\u9053\u4e2d\u54cd\u5e94\uff08\u79c1\u4fe1\u59cb\u7ec8\u6709\u6548\uff09\u3002",- "messageVisibility": "\u6d88\u606f\u53ef\u89c1\u6027",- "messageVisibilityDesc": "\u9009\u62e9\u8981\u4ece Agent \u8f93\u51fa\u4e2d*\u663e\u793a*\u7684\u6d88\u606f\u7c7b\u578b\u3002\u672a\u9009\u4e2d\u7684\u7c7b\u578b\u5c06\u4e0d\u4f1a\u5728\u60a8\u7684 Slack \u5de5\u4f5c\u533a\u4e2d\u663e\u793a\u3002",- "showMessageTypes": "\u663e\u793a\u8fd9\u4e9b\u6d88\u606f\u7c7b\u578b\uff1a",- "showMessageTypesPlaceholder": "\u9009\u62e9\u8981\u663e\u793a\u7684\u6d88\u606f\u7c7b\u578b",- "tip": "\u60a8\u53ef\u4ee5\u968f\u65f6\u663e\u793a/\u9690\u85cf\u6d88\u606f\u7c7b\u578b\u3002\u66f4\u6539\u4f1a\u7acb\u5373\u5e94\u7528\u4e8e\u65b0\u6d88\u606f\u3002",- "selectMentionBehavior": "\u9009\u62e9 @\u63d0\u53ca\u884c\u4e3a",- "optionDefault": "(\u9ed8\u8ba4) - {status}",- "optionRequireMention": "\u9700\u8981 @\u63d0\u53ca",- "optionDontRequireMention": "\u4e0d\u9700\u8981 @\u63d0\u53ca",- "language": "\u8bed\u8a00 / Language",- "languageHint": "\u66f4\u6539 Slack \u4e2d\u673a\u5668\u4eba\u6d88\u606f\u7684\u8bed\u8a00\u3002"+ "title": "设置",+ "channelBehavior": "频道行为",+ "requireMention": "需要 @提及才响应",+ "requireMentionHint": "启用后,机器人仅在被 @提及时才在频道中响应(私信始终有效)。",+ "messageVisibility": "消息可见性",+ "messageVisibilityDesc": "选择要从 Agent 输出中*显示*的消息类型。未选中的类型将不会在您的 Slack 工作区中显示。",+ "showMessageTypes": "显示这些消息类型:",+ "showMessageTypesPlaceholder": "选择要显示的消息类型",+ "tip": "您可以随时显示/隐藏消息类型。更改会立即应用于新消息。",+ "selectMentionBehavior": "选择 @提及行为",+ "optionDefault": "(默认) - {status}",+ "optionRequireMention": "需要 @提及",+ "optionDontRequireMention": "不需要 @提及",+ "language": "语言 / Language",+ "languageHint": "更改 Slack 中机器人消息的语言。"},"cwd": {- "title": "\u66f4\u6539\u5de5\u4f5c\u76ee\u5f55",- "current": "\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff1a",- "new": "\u65b0\u5de5\u4f5c\u76ee\u5f55\uff1a",- "placeholder": "\u8f93\u5165\u65b0\u7684\u76ee\u5f55\u8def\u5f84",- "hint": "\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\uff08\u4f8b\u5982 /home/user/project\uff09\u6216 ~ \u8868\u793a\u4e3b\u76ee\u5f55",- "tip": "\u5982\u679c\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u5c06\u4f1a\u81ea\u52a8\u521b\u5efa\u3002"+ "title": "更改工作目录",+ "current": "当前工作目录:",+ "new": "新工作目录:",+ "placeholder": "输入新的目录路径",+ "hint": "使用绝对路径(例如 /home/user/project)或 ~ 表示主目录",+ "tip": "如果目录不存在,将会自动创建。"},"resume": {- "title": "\u6062\u590d\u4f1a\u8bdd",- "description": "\u9009\u62e9\u4e00\u4e2a\u5df2\u4fdd\u5b58\u7684\u4f1a\u8bdd\u6216\u7c98\u8d34\u4f1a\u8bdd ID \u4ee5\u5728\u6b64\u7ebf\u7a0b\u4e2d\u7ee7\u7eed\u5de5\u4f5c\u3002",- "pickExisting": "\u9009\u62e9\u4e00\u4e2a\u5df2\u6709\u4f1a\u8bdd",- "selectSession": "\u9009\u62e9\u4e00\u4e2a\u4f1a\u8bdd",- "pasteId": "\u6216\u7c98\u8d34\u4f1a\u8bdd ID",- "pasteIdPlaceholder": "\u4f8b\u5982 ses_12345",- "agentBackend": "Agent \u540e\u7aef",- "selectAgentBackend": "\u9009\u62e9 Agent \u540e\u7aef",- "showingFirst100": "\u663e\u793a\u524d 100 \u4e2a\u5df2\u4fdd\u5b58\u7684\u4f1a\u8bdd\u3002\u5982\u9700\u5176\u4ed6\u4f1a\u8bdd\uff0c\u8bf7\u5728\u4e0b\u65b9\u7c98\u8d34\u4f1a\u8bdd ID\u3002",- "noSessionsFound": "\u672a\u627e\u5230\u5df2\u5b58\u50a8\u7684\u4f1a\u8bdd\u3002\u8bf7\u5728\u4e0b\u65b9\u7c98\u8d34\u4f1a\u8bdd ID \u4ee5\u6062\u590d\u3002"+ "title": "恢复会话",+ "description": "选择一个已保存的会话或粘贴会话 ID 以在此线程中继续工作。",+ "pickExisting": "选择一个已有会话",+ "selectSession": "选择一个会话",+ "pasteId": "或粘贴会话 ID",+ "pasteIdPlaceholder": "例如 ses_12345",+ "agentBackend": "Agent 后端",+ "selectAgentBackend": "选择 Agent 后端",+ "showingFirst100": "显示前 100 个已保存的会话。如需其他会话,请在下方粘贴会话 ID。",+ "noSessionsFound": "未找到已存储的会话。请在下方粘贴会话 ID 以恢复。"},"routing": {- "title": "Agent \u8bbe\u7f6e",- "currentBackend": "\u5f53\u524d\u540e\u7aef\uff1a",- "backend": "\u540e\u7aef",- "selectBackend": "\u9009\u62e9\u540e\u7aef",- "opencodeSettings": "OpenCode \u8bbe\u7f6e",+ "title": "Agent 设置",+ "currentBackend": "当前后端:",+ "backend": "后端",+ "selectBackend": "选择后端",+ "opencodeSettings": "OpenCode 设置","opencodeAgent": "OpenCode Agent",- "selectOpencodeAgent": "\u9009\u62e9 OpenCode Agent",- "model": "\u6a21\u578b",- "selectModel": "\u9009\u62e9\u6a21\u578b",- "reasoningEffort": "\u63a8\u7406\u5f3a\u5ea6\uff08\u601d\u8003\u6a21\u5f0f\uff09",- "selectReasoningEffort": "\u9009\u62e9\u63a8\u7406\u5f3a\u5ea6",- "claudeSettings": "Claude \u8bbe\u7f6e",+ "selectOpencodeAgent": "选择 OpenCode Agent",+ "model": "模型",+ "selectModel": "选择模型",+ "reasoningEffort": "推理强度(思考模式)",+ "selectReasoningEffort": "选择推理强度",+ "claudeSettings": "Claude 设置","claudeAgent": "Claude Agent",- "selectClaudeAgent": "\u9009\u62e9 Claude Agent",- "codexSettings": "Codex \u8bbe\u7f6e",- "codexReasoningEffort": "\u63a8\u7406\u5f3a\u5ea6",- "tip": "\u9009\u62e9\u201c(\u9ed8\u8ba4)\u201d\u4ee5\u4f7f\u7528\u540e\u7aef\u7684\u914d\u7f6e\u9ed8\u8ba4\u503c\u3002"+ "selectClaudeAgent": "选择 Claude Agent",+ "codexSettings": "Codex 设置",+ "codexReasoningEffort": "推理强度",+ "tip": "选择“(默认)”以使用后端的配置默认值。"},"question": {"opencode": "OpenCode",@@ -93,54 +137,71 @@},"command": {"start": {- "welcome": "\u6b22\u8fce\u4f7f\u7528 Vibe Remote\uff01",- "greeting": "\u4f60\u597d {name}\uff01",- "platform": "\u5e73\u53f0\uff1a{platform}",- "agent": "Agent\uff1a{agent}",- "channel": "\u9891\u9053\uff1a{channel}",- "quickActions": "\u5feb\u6377\u64cd\u4f5c\uff1a",- "quickActionsDesc": "\u4f7f\u7528\u4e0b\u65b9\u6309\u94ae\u7ba1\u7406\u60a8\u7684 {agent} \u4f1a\u8bdd\uff0c\u6216\u76f4\u63a5\u8f93\u5165\u4efb\u4f55\u6d88\u606f\u5f00\u59cb\u4e0e {agent} \u804a\u5929\uff01",- "directMessage": "\u79c1\u4fe1"+ "welcome": "欢迎使用 Vibe Remote!",+ "greeting": "你好 {name}!",+ "platform": "平台:{platform}",+ "agent": "Agent:{agent}",+ "channel": "频道:{channel}",+ "quickActions": "快捷操作:",+ "quickActionsDesc": "使用下方按钮管理您的 {agent} 会话,或直接输入任何消息开始与 {agent} 聊天!",+ "directMessage": "私信"},"clear": {- "noSessions": "\u6ca1\u6709\u8981\u6e05\u9664\u7684\u6d3b\u52a8\u4f1a\u8bdd\u3002\n\u4f1a\u8bdd\u72b6\u6001\u5df2\u91cd\u7f6e\u3002",- "cleared": "\u5df2\u6e05\u9664\u7684\u6d3b\u52a8\u4f1a\u8bdd\uff1a\n{details}\n\u6240\u6709\u4f1a\u8bdd\u5df2\u91cd\u7f6e\u3002",- "sessionItem": "{agent} \u2192 {count} \u4e2a\u4f1a\u8bdd"+ "noSessions": "没有要清除的活动会话。\n会话状态已重置。",+ "cleared": "已清除的活动会话:\n{details}\n所有会话已重置。",+ "sessionItem": "{agent} → {count} 个会话"},"cwd": {- "current": "\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff1a",- "exists": "\u76ee\u5f55\u5b58\u5728",- "notExists": "\u76ee\u5f55\u4e0d\u5b58\u5728",- "hint": "\u8fd9\u662f Agent \u6267\u884c\u547d\u4ee4\u7684\u4f4d\u7f6e",- "usage": "\u7528\u6cd5\uff1a/set_cwd <\u8def\u5f84>",- "changeInstructions": "\u8981\u66f4\u6539\u5de5\u4f5c\u76ee\u5f55\uff0c\u8bf7\u4f7f\u7528\uff1a\n`/set_cwd <\u8def\u5f84>`\n\n\u793a\u4f8b\uff1a\n`/set_cwd ~/projects/myapp`",- "clickButton": "\u8bf7\u70b9\u51fb @Vibe Remote /start \u83dc\u5355\u4e2d\u7684\u201c\u66f4\u6539\u5de5\u4f5c\u76ee\u5f55\u201d\u6309\u94ae\u6765\u66f4\u6539\u5de5\u4f5c\u76ee\u5f55\u3002"+ "current": "当前工作目录:",+ "exists": "目录存在",+ "notExists": "目录不存在",+ "hint": "这是 Agent 执行命令的位置",+ "usage": "用法:/set_cwd <路径>",+ "changeInstructions": "要更改工作目录,请使用:\n`/set_cwd <路径>`\n\n示例:\n`/set_cwd ~/projects/myapp`",+ "clickButton": "请点击 @Vibe Remote /start 菜单中的“更改工作目录”按钮来更改工作目录。"},"resume": {- "slackOnly": "\u6062\u590d\u529f\u80fd\u76ee\u524d\u4ec5\u5728 Slack \u4e0a\u53ef\u7528\u3002\u5728\u540c\u4e00\u7ebf\u7a0b\u4e2d\u7ee7\u7eed\u53ef\u81ea\u52a8\u6062\u590d\u3002",- "clickButton": "\u8bf7\u5728 Slack \u4e2d\u70b9\u51fb\u201c\u6062\u590d\u201d\u6309\u94ae\u6253\u5f00\u9009\u62e9\u5668\u3002",- "noStoredSessions": "\u672a\u627e\u5230\u5df2\u5b58\u50a8\u7684\u4f1a\u8bdd\u3002\u60a8\u4ecd\u53ef\u4ee5\u5728\u6062\u590d\u5bf9\u8bdd\u6846\u4e2d\u624b\u52a8\u7c98\u8d34\u4f1a\u8bdd ID\u3002"+ "slackOnly": "恢复功能目前仅在 Slack 上可用。在同一线程中继续可自动恢复。",+ "clickButton": "请在 Slack 中点击“恢复”按钮打开选择器。",+ "noStoredSessions": "未找到已存储的会话。您仍可以在恢复对话框中手动粘贴会话 ID。"},"stop": {- "noActiveSession": "\u6b64\u9891\u9053\u6ca1\u6709\u8981\u505c\u6b62\u7684\u6d3b\u52a8\u4f1a\u8bdd\u3002"+ "noActiveSession": "此频道没有要停止的活动会话。"}},"button": {- "currentDir": "\u5f53\u524d\u76ee\u5f55",- "changeDir": "\u66f4\u6539\u5de5\u4f5c\u76ee\u5f55",- "clearSession": "\u6e05\u9664\u6240\u6709\u4f1a\u8bdd",- "settings": "\u8bbe\u7f6e",- "resumeSession": "\u6062\u590d\u4f1a\u8bdd",- "agentSettings": "Agent \u8bbe\u7f6e",- "howItWorks": "\u5982\u4f55\u5de5\u4f5c"+ "currentDir": "当前目录",+ "changeDir": "更改工作目录",+ "clearSession": "清除所有会话",+ "settings": "设置",+ "resumeSession": "恢复会话",+ "agentSettings": "Agent 设置",+ "howItWorks": "如何工作",+ "aboutMessageTypes": "关于消息类型"},"messageType": {- "system": "\u7cfb\u7edf",- "assistant": "\u52a9\u624b",- "toolcall": "\u5de5\u5177\u8c03\u7528",- "systemDesc": "\u7cfb\u7edf\u521d\u59cb\u5316\u548c\u72b6\u6001\u6d88\u606f",- "assistantDesc": "Agent \u7684\u56de\u590d\u548c\u89e3\u91ca",- "toolcallDesc": "Agent \u5de5\u5177\u540d\u79f0 + \u53c2\u6570\uff08\u5355\u884c\uff09"+ "system": "系统",+ "assistant": "助手",+ "toolcall": "工具调用",+ "result": "结果",+ "systemDesc": "系统初始化和状态消息",+ "assistantDesc": "Agent 的回复和解释",+ "toolcallDesc": "Agent 工具名称 + 参数(单行)",+ "resultDesc": "最终执行结果(始终发送)"+ },+ "routing": {+ "slackOnly": "🤖 Agent 切换目前仅在 Slack 可用。请使用 Slack Agent 设置进行配置。",+ "introTitle": "Agent 与模型设置",+ "introDesc": "配置该频道使用的后端。",+ "label": {+ "backend": "后端",+ "agent": "Agent",+ "model": "模型",+ "reasoningEffort": "推理强度"+ }+ },+ "message": {+ "ack": "{agent} 已收到,正在处理..."},"backend": {"claude": "ClaudeCode",@@ -148,17 +209,17 @@"opencode": "OpenCode"},"reasoning": {- "none": "\u65e0",- "minimal": "\u6700\u5c0f",- "low": "\u4f4e",- "medium": "\u4e2d",- "high": "\u9ad8",- "xhigh": "\u8d85\u9ad8",- "max": "\u6700\u5927"+ "none": "无",+ "minimal": "最小",+ "low": "低",+ "medium": "中",+ "high": "高",+ "xhigh": "超高",+ "max": "最大"},"language": {- "systemDefault": "(\u7cfb\u7edf\u9ed8\u8ba4)",+ "systemDefault": "(系统默认)","en": "English",- "zh": "\u4e2d\u6587"+ "zh": "中文"}}