|
|
|
|
@ -75,10 +75,18 @@ class ToolTransformService:
|
|
|
|
|
provider.icon = ToolTransformService.get_plugin_icon_url(
|
|
|
|
|
tenant_id=tenant_id, filename=provider.icon
|
|
|
|
|
)
|
|
|
|
|
if isinstance(provider.icon_dark, str) and provider.icon_dark:
|
|
|
|
|
provider.icon_dark = ToolTransformService.get_plugin_icon_url(
|
|
|
|
|
tenant_id=tenant_id, filename=provider.icon_dark
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
provider.icon = ToolTransformService.get_tool_provider_icon_url(
|
|
|
|
|
provider_type=provider.type.value, provider_name=provider.name, icon=provider.icon
|
|
|
|
|
)
|
|
|
|
|
if provider.icon_dark:
|
|
|
|
|
provider.icon_dark = ToolTransformService.get_tool_provider_icon_url(
|
|
|
|
|
provider_type=provider.type.value, provider_name=provider.name, icon=provider.icon_dark
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def builtin_provider_to_user_provider(
|
|
|
|
|
@ -96,6 +104,7 @@ class ToolTransformService:
|
|
|
|
|
name=provider_controller.entity.identity.name,
|
|
|
|
|
description=provider_controller.entity.identity.description,
|
|
|
|
|
icon=provider_controller.entity.identity.icon,
|
|
|
|
|
icon_dark=provider_controller.entity.identity.icon_dark,
|
|
|
|
|
label=provider_controller.entity.identity.label,
|
|
|
|
|
type=ToolProviderType.BUILT_IN,
|
|
|
|
|
masked_credentials={},
|
|
|
|
|
@ -179,6 +188,7 @@ class ToolTransformService:
|
|
|
|
|
name=provider_controller.entity.identity.name,
|
|
|
|
|
description=provider_controller.entity.identity.description,
|
|
|
|
|
icon=provider_controller.entity.identity.icon,
|
|
|
|
|
icon_dark=provider_controller.entity.identity.icon_dark,
|
|
|
|
|
label=provider_controller.entity.identity.label,
|
|
|
|
|
type=ToolProviderType.WORKFLOW,
|
|
|
|
|
masked_credentials={},
|
|
|
|
|
|