From e65073af486bd8be96bfae229aa73eec600178a4 Mon Sep 17 00:00:00 2001 From: Jiwon Kim Date: Mon, 3 Nov 2025 10:42:33 -0800 Subject: [PATCH] Updated CustomSummary, CustomTask, EntitySource icon types to be backwards compatible --- chatkit/types.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/chatkit/types.py b/chatkit/types.py index 728c7ef..52ff532 100644 --- a/chatkit/types.py +++ b/chatkit/types.py @@ -707,7 +707,8 @@ class CustomSummary(BaseModel): """Custom summary for a workflow.""" title: str - icon: IconName | None = None + # IconName is the only supported type but we allow str for backwards compatibility + icon: IconName | str | None = None class DurationSummary(BaseModel): @@ -735,7 +736,8 @@ class CustomTask(BaseTask): type: Literal["custom"] = "custom" title: str | None = None - icon: IconName | None = None + # IconName is the only supported type but we allow str for backwards compatibility + icon: IconName | str | None = None content: str | None = None @@ -811,7 +813,8 @@ class EntitySource(SourceBase): type: Literal["entity"] = "entity" id: str - icon: IconName | None = None + # IconName is the only supported type but we allow str for backwards compatibility + icon: IconName | str | None = None preview: Literal["lazy"] | None = None data: dict[str, Any] = Field(default_factory=dict)