feat(mcp): add slash command listing
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import asyncio
|
||||
from pathlib import Path
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import AsyncMock
|
||||
|
||||
@@ -206,6 +204,13 @@ def test_is_allowed_rejects_invalid_legacy_telegram_sender_shapes() -> None:
|
||||
assert channel.is_allowed("not-a-number|alice") is False
|
||||
|
||||
|
||||
def test_build_bot_commands_includes_mcp() -> None:
|
||||
commands = TelegramChannel._build_bot_commands("en")
|
||||
descriptions = {command.command: command.description for command in commands}
|
||||
|
||||
assert descriptions["mcp"] == "List MCP servers and tools"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_send_progress_keeps_message_in_topic() -> None:
|
||||
config = TelegramConfig(enabled=True, token="123:abc", allow_from=["*"])
|
||||
|
||||
Reference in New Issue
Block a user