feat(webui): add lightweight session messaging via mentions

This commit is contained in:
chengyongru
2026-08-19 01:15:56 +08:00
committed by chengyongru
parent 2bdb11eeba
commit 0e184965e8
76 changed files with 8297 additions and 658 deletions
+15
View File
@@ -15,6 +15,21 @@ async def test_message_tool_returns_error_when_no_target_context() -> None:
assert result == "Error: No target channel/chat specified"
@pytest.mark.asyncio
async def test_message_tool_preserves_legacy_positional_channel_arguments() -> None:
sent: list[OutboundMessage] = []
async def send(message: OutboundMessage) -> None:
sent.append(message)
tool = MessageTool(send_callback=send)
await tool.execute("hello", "telegram", "chat-1")
assert [(message.channel, message.chat_id, message.content) for message in sent] == [
("telegram", "chat-1", "hello")
]
@pytest.mark.asyncio
@pytest.mark.parametrize(
"bad",