mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 08:26:53 +08:00
refactor(agent): route chat persistence through database worker
This commit is contained in:
@@ -118,6 +118,10 @@ def configure_plugin_system_services():
|
||||
configure_chain_runtime_context_provider,
|
||||
)
|
||||
from app.application.messaging.message import MessageHelper, MessageQueueManager
|
||||
from app.application.messaging.chat import (
|
||||
AgentChatPersistenceService,
|
||||
configure_agent_chat_persistence,
|
||||
)
|
||||
from app.runtime.cache import AsyncFileCache, FileCache
|
||||
from app.runtime.events import EventManager
|
||||
from app.runtime.extensions.module_manager import ModuleManager
|
||||
@@ -255,6 +259,12 @@ def configure_plugin_system_services():
|
||||
workflow=lambda: WorkflowOper(),
|
||||
plugin_data=lambda: PluginDataOper(),
|
||||
)
|
||||
configure_agent_chat_persistence(
|
||||
AgentChatPersistenceService(
|
||||
repository=AgentChatOper,
|
||||
async_executor=database_executor,
|
||||
)
|
||||
)
|
||||
from app.adapters.external.market import (
|
||||
PluginHelper,
|
||||
VERSION_BACKWARD_COMPATIBLE_FLAGS,
|
||||
|
||||
Reference in New Issue
Block a user