77
88from ....utils .dev import ModelScopeDataLayoutComponent , resolve_frontend_dir
99from .header import AntdXSenderHeader
10+ from .switch import AntdXSenderSwitch
1011
1112
1213# as inputs, outputs
@@ -15,6 +16,7 @@ class AntdXSender(ModelScopeDataLayoutComponent):
1516 Ant Design X: https://x.ant.design/components/sender
1617 """
1718 Header = AntdXSenderHeader
19+ Switch = AntdXSenderSwitch
1820
1921 EVENTS = [
2022 EventListener ("change" ,
@@ -51,32 +53,41 @@ class AntdXSender(ModelScopeDataLayoutComponent):
5153 EventListener ("paste_file" ,
5254 callback = lambda block : block ._internal .update (
5355 bind_pasteFile_event = True )),
56+ EventListener ("skill_closable_close" ,
57+ callback = lambda block : block ._internal .update (
58+ bind_skill_closable_close_event = True )),
5459 ]
5560
5661 # supported slots
57- SLOTS = ['actions' , 'header' , 'prefix' , 'footer' ]
62+ SLOTS = [
63+ 'suffix' , 'header' , 'prefix' , 'footer' , 'skill.title' ,
64+ 'skill.toolTip.title'
65+ 'skill.closable.closeIcon'
66+ ]
5867
5968 def __init__ (
6069 self ,
6170 value : str | None = None ,
62- additional_props : dict | None = None ,
6371 * ,
64- auto_size : bool | dict | None = None ,
65- footer : str | None = None ,
66- actions : str | bool | None = None ,
6772 allow_speech : bool | dict | None = None ,
68- class_names : dict | str | None = None ,
73+ class_names : dict | str | None = None ,
6974 components : dict | None = None ,
7075 default_value : str | None = None ,
71- loading : bool | None = None ,
7276 disabled : bool | None = None ,
77+ auto_size : bool | dict | None = None ,
78+ loading : bool | None = None ,
79+ suffix : str | bool | None = None ,
80+ footer : str | None = None ,
7381 header : str | None = None ,
7482 prefix : str | None = None ,
7583 read_only : bool | None = None ,
76- styles : dict | str | None = None ,
84+ styles : dict | str | None = None ,
7785 submit_type : Literal ['enter' , 'shiftEnter' ] | None = None ,
7886 placeholder : str | None = None ,
87+ slot_config : list [dict ] | None = None ,
88+ skill : dict | None = None ,
7989 root_class_name : str | None = None ,
90+ additional_props : dict | None = None ,
8091 as_item : str | None = None ,
8192 _internal : None = None ,
8293 # gradio properties
@@ -108,7 +119,9 @@ def __init__(
108119 self .read_only = read_only
109120 self .loading = loading
110121 self .header = header
111- self .actions = actions
122+ self .suffix = suffix
123+ self .slot_config = slot_config
124+ self .skill = skill
112125 self .placeholder = placeholder
113126 self .root_class_name = root_class_name
114127
0 commit comments