Merge pull request #119 from valueonag/feat/demo-system-readieness

hotfix
This commit is contained in:
Patrick Motsch 2026-04-14 08:23:41 +02:00 committed by GitHub
commit a42f3044e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,6 +20,21 @@ logger = logging.getLogger(__name__)
def _registerDataSourceTools(registry: ToolRegistry, services):
"""Auto-extracted from registerCoreTools."""
def _buildResolverDb():
"""Build a DB adapter that ConnectorResolver can use to load UserConnections.
interfaceDbApp has getUserConnectionById; ConnectorResolver expects getUserConnection."""
chatService = services.chat
appIf = getattr(chatService, "interfaceDbApp", None)
if appIf and hasattr(appIf, "getUserConnectionById"):
class _Adapter:
def __init__(self, app):
self._app = app
def getUserConnection(self, connectionId: str):
return self._app.getUserConnectionById(connectionId)
return _Adapter(appIf)
return getattr(chatService, "interfaceDbComponent", None)
# ---- DataSource convenience tools ----
_SOURCE_TYPE_TO_SERVICE = {
"sharepointFolder": "sharepoint",