feat(gateway): render terminal tool calls as native bash code blocks on markdown platforms (#41215)
Tool-progress now shows a terminal command in a ```bash fenced block — full command, no surrounding quotes, no label, no 40-char truncation — instead of the noisy `terminal: "cmd…"` line, on every platform that renders markdown code blocks (Telegram, Slack, Matrix, WhatsApp, Feishu, Weixin, Discord). Plain-text platforms keep the compact preview line. Gated on a new `BasePlatformAdapter.supports_code_blocks` capability (default False) rather than a hardcoded platform list, so plugin adapters (Discord lives in plugins/platforms/) opt in by setting the flag. Applies to both all/new and verbose progress modes, with a safe fallback when the command arg is missing or blank.
This commit is contained in:
@@ -573,6 +573,7 @@ class DiscordAdapter(BasePlatformAdapter):
|
||||
# Discord message limits
|
||||
MAX_MESSAGE_LENGTH = 2000
|
||||
_SPLIT_THRESHOLD = 1900 # near the 2000-char split point
|
||||
supports_code_blocks = True # Discord markdown renders fenced code blocks natively
|
||||
|
||||
# Auto-disconnect from voice channel after this many seconds of inactivity
|
||||
VOICE_TIMEOUT = 300
|
||||
|
||||
Reference in New Issue
Block a user