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.

931 B
Raw Blame
"""Avibe (Web UI) markdown formatter.

The Vibe Remote workbench renders agent output as CommonMark + GFM in
the browser, so the formatter uses standard markdown syntax for every
operation. Mirrors ``DiscordFormatter`` — both render through a
CommonMark pipeline.
"""

from .base_formatter import BaseMarkdownFormatter


class AvibeFormatter(BaseMarkdownFormatter):
    """Standard CommonMark + GFM formatter for the Web UI."""

    def format_bold(self, text: str) -> str:
        return f"**{text}**"

    def format_italic(self, text: str) -> str:
        return f"*{text}*"

    def format_strikethrough(self, text: str) -> str:
        return f"~~{text}~~"

    def format_link(self, text: str, url: str) -> str:
        return f"[{text}]({url})"

    def format_code_block(self, code: str, language: str = "") -> str:
        if language:
            return f"```{language}\n{code}\n```"
        return f"```\n{code}\n```"