refactor: complete runtime configuration migration

This commit is contained in:
jxxghp
2026-08-22 19:07:07 +08:00
parent d131f8d571
commit 1bb6e36e8c
80 changed files with 1432 additions and 581 deletions
+5 -2
View File
@@ -2,6 +2,7 @@ import asyncio
import threading
import time
import unittest
from dataclasses import replace
from types import SimpleNamespace
from unittest.mock import AsyncMock, Mock, patch
@@ -257,12 +258,14 @@ class TestTelegramTypingLifecycle(unittest.TestCase):
def test_async_agent_leaves_processing_status_to_worker(self):
chain = MessageChain.__new__(MessageChain)
chain.runtime_config = replace(
chain.runtime_config,
ai_agent_enable=True,
)
with patch.object(chain, "_record_user_message"), patch.object(
chain, "_mark_message_processing_started"
) as start_status, patch(
"app.chain.message.settings.AI_AGENT_ENABLE", True
), patch(
"app.chain.message.get_running_agent_manager",
) as get_running_manager, patch(
"app.chain.message.asyncio.run_coroutine_threadsafe",