refactor: simplify cross-session messaging

This commit is contained in:
chengyongru
2026-08-19 01:15:56 +08:00
committed by chengyongru
parent 0e184965e8
commit 251a1ccd40
78 changed files with 1578 additions and 7569 deletions
-15
View File
@@ -15,21 +15,6 @@ 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",