Merge branch 'main' into feat/plugin

This commit is contained in:
Yeuoly
2024-07-15 16:03:11 +08:00
589 changed files with 10640 additions and 3672 deletions

View File

@ -429,6 +429,7 @@ class ApiToolManageService:
db_provider=provider,
decrypt_credentials=True
)
user_provider.labels = labels
# add icon
ToolTransformService.repack_provider(user_provider)

View File

@ -3,8 +3,7 @@ import logging
from collections.abc import Generator
from typing import Optional, Union
from flask import current_app
from configs import dify_config
from core.tools.entities.api_entities import UserTool, UserToolProvider
from core.tools.entities.common_entities import I18nObject
from core.tools.entities.tool_bundle import ApiToolBundle
@ -31,7 +30,7 @@ class ToolTransformService:
"""
get tool provider icon url
"""
url_prefix = (current_app.config.get("CONSOLE_API_URL")
url_prefix = (dify_config.CONSOLE_API_URL
+ "/console/api/workspaces/current/tool-provider/")
if provider_type == ToolProviderType.BUILT_IN.value: