feat: add encrypted

This commit is contained in:
Novice
2025-05-30 09:19:46 +08:00
parent 1c84a27e7e
commit 14aecc147b
10 changed files with 166 additions and 119 deletions

View File

@ -190,6 +190,8 @@ class ToolTransformService:
@staticmethod
def mcp_provider_to_user_provider(db_provider: MCPToolProvider) -> ToolProviderApiEntity:
from services.tools.mcp_tools_mange_service import MCPToolManageService
return ToolProviderApiEntity(
id=db_provider.id,
author=db_provider.user.name if db_provider.user else "Anonymous",
@ -197,7 +199,7 @@ class ToolTransformService:
icon=db_provider.provider_icon,
type=ToolProviderType.MCP,
is_team_authorization=db_provider.authed,
server_url=db_provider.server_url,
server_url=MCPToolManageService.get_masked_mcp_provider_server_url(db_provider.tenant_id, db_provider.id),
tools=ToolTransformService.mcp_tool_to_user_tool(
db_provider, [MCPTool(**tool) for tool in json.loads(db_provider.tools)]
),