Merge branch 'fix/chore-fix' into dev/plugin-deploy

This commit is contained in:
Novice Lee
2025-01-09 16:55:58 +08:00
49 changed files with 157 additions and 133 deletions

View File

@ -1,6 +1,6 @@
import json
import logging
from typing import Optional, Union
from typing import Optional, Union, cast
from yarl import URL
@ -44,7 +44,7 @@ class ToolTransformService:
elif provider_type in {ToolProviderType.API.value, ToolProviderType.WORKFLOW.value}:
try:
if isinstance(icon, str):
return json.loads(icon)
return cast(dict, json.loads(icon))
return icon
except Exception:
return {"background": "#252525", "content": "\ud83d\ude01"}