Merge remote-tracking branch 'origin/v3' into v3

# Conflicts:
#	app/api/endpoints/agent.py
#	app/api/endpoints/anthropic.py
#	app/api/endpoints/openai.py
#	app/chain/__init__.py
#	app/chain/message.py
#	app/chain/site.py
#	app/chain/subscribe.py
#	app/chain/transfer.py
#	app/modules/discord/__init__.py
#	app/modules/qqbot/__init__.py
#	app/modules/slack/__init__.py
#	app/modules/telegram/__init__.py
#	app/modules/wechat/__init__.py
#	app/runtime/extensions/module_manager.py
#	app/runtime/extensions/service_registry.py
#	tests/test_agent_interaction.py
#	tests/test_slash_command_interactions.py
#	tests/test_web_agent_stream.py
This commit is contained in:
jxxghp
2026-08-16 19:44:43 +08:00
232 changed files with 21375 additions and 6683 deletions
+8 -5
View File
@@ -195,12 +195,13 @@ class TestAgentInteraction(unittest.TestCase):
) as message_add, patch.object(
chain, "edit_message", return_value=True
) as edit_message, patch(
"app.chain.message.agent_manager.process_message",
new_callable=AsyncMock,
) as process_message, patch(
"app.chain.message.get_running_agent_manager"
) as get_running_manager, patch(
"app.chain.message.asyncio.run_coroutine_threadsafe",
side_effect=lambda coro, _loop: (coro.close(), Mock())[1],
):
process_message = AsyncMock()
get_running_manager.return_value.process_message = process_message
handled = chain._handle_callback(
callback_data=f"agent_interaction:choice:{request.request_id}:1",
context=InteractionContext(
@@ -267,9 +268,11 @@ class TestAgentInteraction(unittest.TestCase):
try:
for channel in (NotificationChannel.Telegram, NotificationChannel.Feishu):
manager = Mock()
manager.matches_secret_confirmation.return_value = True
with patch(
"app.chain.message.agent_manager.matches_secret_confirmation",
return_value=True,
"app.chain.message.get_running_agent_manager",
return_value=manager,
), patch.object(
chain,
"_handle_ai_message",