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 markdown
yh c24e6d45fc340
diff --git a/modules/agents/base.py b/modules/agents/base.pyindex 8d6ca8d1b..ac204bd51 100644--- a/modules/agents/base.py+++ b/modules/agents/base.py@@ -21,6 +21,7 @@ class AgentRequest:settings_key: strack_message_id: Optional[str] = Nonelast_agent_message: Optional[str] = None+ last_agent_message_parse_mode: Optional[str] = None@dataclassdiff --git a/modules/agents/codex_agent.py b/modules/agents/codex_agent.pyindex bc60af007..0fc1d4c1f 100644--- a/modules/agents/codex_agent.py+++ b/modules/agents/codex_agent.py@@ -6,6 +6,8 @@ import signalfrom asyncio.subprocess import Processfrom typing import Dict, Optional, Tuple+from markdown_to_mrkdwn import SlackMarkdownConverter+from modules.agents.base import AgentRequest, BaseAgentlogger = logging.getLogger(__name__)@@ -23,6 +25,11 @@ class CodexAgent(BaseAgent):self.base_process_index: Dict[str, str] = {}self.composite_to_base: Dict[str, str] = {}self._initialized_sessions: set[str] = set()+ self._slack_markdown_converter = (+ SlackMarkdownConverter()+ if getattr(self.controller.config, "platform", None) == "slack"+ else None+ )async def handle_message(self, request: AgentRequest) -> None:existing = self.base_process_index.get(request.base_session_id)@@ -246,7 +253,10 @@ class CodexAgent(BaseAgent):await self.controller.emit_agent_message(request.context, "assistant", text, parse_mode="markdown")- request.last_agent_message = text+ (+ request.last_agent_message,+ request.last_agent_message_parse_mode,+ ) = self._prepare_last_message_payload(text)elif item_type == "command_execution":command = details.get("command")output = details.get("aggregated_output", "")@@ -285,17 +295,22 @@ class CodexAgent(BaseAgent):request.context, "notify", f"⚠️ Codex turn failed: {error}")request.last_agent_message = None+ request.last_agent_message_parse_mode = Nonereturnif event_type == "turn.completed":if request.last_agent_message:+ parse_mode = request.last_agent_message_parse_mode+ if parse_mode is None and not self._slack_markdown_converter:+ parse_mode = "markdown"await self.controller.emit_agent_message(request.context,"result",request.last_agent_message,- parse_mode="markdown",+ parse_mode=parse_mode,)request.last_agent_message = None+ request.last_agent_message_parse_mode = Nonereturnasync def _delete_ack(self, request: AgentRequest):@@ -309,3 +324,11 @@ class CodexAgent(BaseAgent):logger.debug(f"Could not delete ack message: {err}")finally:request.ack_message_id = None++ def _prepare_last_message_payload(+ self, text: str+ ) -> Tuple[str, Optional[str]]:+ """Prepare cached assistant text for reuse in result messages."""+ if self._slack_markdown_converter:+ return self._slack_markdown_converter.convert(text), None+ return text, "markdown"diff --git a/modules/settings_manager.py b/modules/settings_manager.pyindex c7855501f..ab5c31a4c 100644--- a/modules/settings_manager.py+++ b/modules/settings_manager.py@@ -38,6 +38,10 @@ class UserSettings:class SettingsManager:"""Manages user personalization settings with JSON persistence"""+ MESSAGE_TYPE_ALIASES = {+ "response": "user",+ }+def __init__(self, settings_file: str = "user_settings.json"):self.settings_file = Path(settings_file)self.settings: Dict[Union[int, str], UserSettings] = {}@@ -150,6 +154,7 @@ class SettingsManager:self, user_id: Union[int, str], message_type: str) -> bool:"""Toggle a message type in hidden list, returns new state"""+ message_type = self._canonicalize_message_type(message_type)settings = self.get_user_settings(user_id)if message_type in settings.hidden_message_types:@@ -177,6 +182,7 @@ class SettingsManager:self, user_id: Union[int, str], message_type: str) -> bool:"""Check if a message type is hidden for user"""+ message_type = self._canonicalize_message_type(message_type)settings = self.get_user_settings(user_id)return message_type in settings.hidden_message_types@@ -239,6 +245,10 @@ class SettingsManager:return agent_map[base_session_id].get(working_path)return None+ def _canonicalize_message_type(self, message_type: str) -> str:+ """Normalize message type to canonical form to support aliases."""+ return self.MESSAGE_TYPE_ALIASES.get(message_type, message_type)+def clear_agent_session_mapping(self,user_id: Union[int, str],