From 002dd9fe1083985225e9a89fb0f6a781528ff0b0 Mon Sep 17 00:00:00 2001 From: Jiwon Kim Date: Fri, 12 Dec 2025 08:39:14 -0800 Subject: [PATCH 1/2] Add EntitySource.label --- chatkit/types.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chatkit/types.py b/chatkit/types.py index 12c062a..4ac786f 100644 --- a/chatkit/types.py +++ b/chatkit/types.py @@ -856,7 +856,12 @@ class EntitySource(SourceBase): type: Literal["entity"] = "entity" id: str icon: IconName | None = None + label: str | None = None + """Optional label shown with the icon in the default entity hover header + when no preview callback is provided. + """ data: dict[str, Any] = Field(default_factory=dict) + """Additional data for the entity source that is passed to client entity callbacks.""" preview: Literal["lazy"] | None = Field( default=None, From 67064fb27da10b1635049adf2d65dd1e2d6a5374 Mon Sep 17 00:00:00 2001 From: Jiwon Kim Date: Fri, 12 Dec 2025 11:13:39 -0800 Subject: [PATCH 2/2] Add interactive attr as well --- chatkit/types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chatkit/types.py b/chatkit/types.py index 4ac786f..c84c3db 100644 --- a/chatkit/types.py +++ b/chatkit/types.py @@ -860,6 +860,8 @@ class EntitySource(SourceBase): """Optional label shown with the icon in the default entity hover header when no preview callback is provided. """ + interactive: bool = False + """Per-entity toggle to wire client callbacks and render this entity as interactive.""" data: dict[str, Any] = Field(default_factory=dict) """Additional data for the entity source that is passed to client entity callbacks."""