Skip to content

Commit 71966ad

Browse files
authored
Merge pull request #30 from openai/jiwon/use-icon-name-type
Use IconName type for EntitySource, CustomSummary, CustomTask
2 parents 8e2d257 + 78ade7a commit 71966ad

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

chatkit/types.py

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ class CustomSummary(BaseModel):
707707
"""Custom summary for a workflow."""
708708

709709
title: str
710-
icon: str | None = None
710+
icon: IconName | None = None
711711

712712

713713
class DurationSummary(BaseModel):
@@ -735,7 +735,7 @@ class CustomTask(BaseTask):
735735

736736
type: Literal["custom"] = "custom"
737737
title: str | None = None
738-
icon: str | None = None
738+
icon: IconName | None = None
739739
content: str | None = None
740740

741741

@@ -811,7 +811,7 @@ class EntitySource(SourceBase):
811811

812812
type: Literal["entity"] = "entity"
813813
id: str
814-
icon: str | None = None
814+
icon: IconName | None = None
815815
preview: Literal["lazy"] | None = None
816816
data: dict[str, Any] = Field(default_factory=dict)
817817

@@ -831,36 +831,66 @@ class EntitySource(SourceBase):
831831

832832

833833
IconName = Literal[
834+
"agent",
834835
"analytics",
835836
"atom",
837+
"batch",
836838
"bolt",
837839
"book-open",
838840
"book-closed",
841+
"book-clock",
842+
"bug",
839843
"calendar",
840844
"chart",
845+
"check",
846+
"check-circle",
847+
"check-circle-filled",
848+
"chevron-left",
849+
"chevron-right",
841850
"circle-question",
842851
"compass",
852+
"confetti",
843853
"cube",
854+
"desktop",
855+
"document",
856+
"dot",
857+
"dots-horizontal",
858+
"dots-vertical",
859+
"empty-circle",
860+
"external-link",
844861
"globe",
845862
"keys",
846863
"lab",
847864
"images",
865+
"info",
848866
"lifesaver",
849867
"lightbulb",
868+
"mail",
850869
"map-pin",
870+
"maps",
871+
"mobile",
851872
"name",
852873
"notebook",
853874
"notebook-pencil",
854875
"page-blank",
876+
"phone",
877+
"play",
878+
"plus",
855879
"profile",
856880
"profile-card",
881+
"reload",
882+
"star",
883+
"star-filled",
857884
"search",
858885
"sparkle",
859886
"sparkle-double",
860887
"square-code",
861888
"square-image",
862889
"square-text",
863890
"suitcase",
891+
"settings-slider",
892+
"user",
893+
"wreath",
864894
"write",
865895
"write-alt",
866896
"write-alt2",

chatkit/widgets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,10 +1044,12 @@ class LineSeries(BaseModel):
10441044
"agent",
10451045
"analytics",
10461046
"atom",
1047+
"batch",
10471048
"bolt",
10481049
"book-open",
10491050
"book-clock",
10501051
"book-closed",
1052+
"bug",
10511053
"calendar",
10521054
"chart",
10531055
"check",

0 commit comments

Comments
 (0)