feat: add support for dark icons in provider and tool entities (#22081)
This commit is contained in:
parent
edf5fd28c9
commit
94a13d7d62
6 changed files with 18 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ class ToolProviderApiEntity(BaseModel):
|
|||
name: str # identifier
|
||||
description: I18nObject
|
||||
icon: str | dict
|
||||
icon_dark: Optional[str | dict] = Field(default=None, description="The dark icon of the tool")
|
||||
label: I18nObject # label
|
||||
type: ToolProviderType
|
||||
masked_credentials: Optional[dict] = None
|
||||
|
|
@ -72,6 +73,7 @@ class ToolProviderApiEntity(BaseModel):
|
|||
"plugin_unique_identifier": self.plugin_unique_identifier,
|
||||
"description": self.description.to_dict(),
|
||||
"icon": self.icon,
|
||||
"icon_dark": self.icon_dark,
|
||||
"label": self.label.to_dict(),
|
||||
"type": self.type.value,
|
||||
"team_credentials": self.masked_credentials,
|
||||
|
|
|
|||
|
|
@ -317,6 +317,7 @@ class ToolProviderIdentity(BaseModel):
|
|||
name: str = Field(..., description="The name of the tool")
|
||||
description: I18nObject = Field(..., description="The description of the tool")
|
||||
icon: str = Field(..., description="The icon of the tool")
|
||||
icon_dark: Optional[str] = Field(default=None, description="The dark icon of the tool")
|
||||
label: I18nObject = Field(..., description="The label of the tool")
|
||||
tags: Optional[list[ToolLabelEnum]] = Field(
|
||||
default=[],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue