@@ -12,8 +12,10 @@ import {
12
12
IAttachment ,
13
13
IAttachmentOpenerRegistry ,
14
14
IChatCommandRegistry ,
15
+ IMessageFooterRegistry ,
15
16
ISelectionWatcher ,
16
17
InputToolbarRegistry ,
18
+ MessageFooterRegistry ,
17
19
SelectionWatcher ,
18
20
chatIcon ,
19
21
readIcon
@@ -115,6 +117,7 @@ const docFactories: JupyterFrontEndPlugin<IChatFactory> = {
115
117
IDefaultFileBrowser ,
116
118
IInputToolbarRegistryFactory ,
117
119
ILayoutRestorer ,
120
+ IMessageFooterRegistry ,
118
121
ISelectionWatcherToken ,
119
122
ISettingRegistry ,
120
123
IThemeManager ,
@@ -132,6 +135,7 @@ const docFactories: JupyterFrontEndPlugin<IChatFactory> = {
132
135
filebrowser : IDefaultFileBrowser | null ,
133
136
inputToolbarFactory : IInputToolbarRegistryFactory ,
134
137
restorer : ILayoutRestorer | null ,
138
+ messageFooterRegistry : IMessageFooterRegistry ,
135
139
selectionWatcher : ISelectionWatcher | null ,
136
140
settingRegistry : ISettingRegistry | null ,
137
141
themeManager : IThemeManager | null ,
@@ -301,7 +305,8 @@ const docFactories: JupyterFrontEndPlugin<IChatFactory> = {
301
305
translator,
302
306
chatCommandRegistry,
303
307
attachmentOpenerRegistry,
304
- inputToolbarFactory
308
+ inputToolbarFactory,
309
+ messageFooterRegistry
305
310
} ) ;
306
311
307
312
// Add the widget to the tracker when it's created
@@ -665,6 +670,7 @@ const chatPanel: JupyterFrontEndPlugin<ChatPanel> = {
665
670
IChatCommandRegistry ,
666
671
IInputToolbarRegistryFactory ,
667
672
ILayoutRestorer ,
673
+ IMessageFooterRegistry ,
668
674
IThemeManager
669
675
] ,
670
676
activate : (
@@ -676,6 +682,7 @@ const chatPanel: JupyterFrontEndPlugin<ChatPanel> = {
676
682
chatCommandRegistry : IChatCommandRegistry ,
677
683
inputToolbarFactory : IInputToolbarRegistryFactory ,
678
684
restorer : ILayoutRestorer | null ,
685
+ messageFooterRegistry : IMessageFooterRegistry ,
679
686
themeManager : IThemeManager | null
680
687
) : ChatPanel => {
681
688
const { commands } = app ;
@@ -693,7 +700,8 @@ const chatPanel: JupyterFrontEndPlugin<ChatPanel> = {
693
700
defaultDirectory,
694
701
chatCommandRegistry,
695
702
attachmentOpenerRegistry,
696
- inputToolbarFactory
703
+ inputToolbarFactory,
704
+ messageFooterRegistry
697
705
} ) ;
698
706
chatPanel . id = 'JupyterlabChat:sidepanel' ;
699
707
chatPanel . title . icon = chatIcon ;
@@ -818,13 +826,27 @@ const inputToolbarFactory: JupyterFrontEndPlugin<IInputToolbarRegistryFactory> =
818
826
}
819
827
} ;
820
828
829
+ /**
830
+ * Extension providing the message footer registry.
831
+ */
832
+ const footerRegistry : JupyterFrontEndPlugin < IMessageFooterRegistry > = {
833
+ id : 'jupyterlab-chat/footerRegistry' ,
834
+ description : 'The footer registry plugin.' ,
835
+ autoStart : true ,
836
+ provides : IMessageFooterRegistry ,
837
+ activate : ( app : JupyterFrontEnd ) : IMessageFooterRegistry => {
838
+ return new MessageFooterRegistry ( ) ;
839
+ }
840
+ } ;
841
+
821
842
export default [
822
843
activeCellManager ,
823
844
attachmentOpeners ,
824
845
chatCommands ,
825
846
chatCommandRegistryPlugin ,
826
847
chatPanel ,
827
848
docFactories ,
849
+ footerRegistry ,
828
850
inputToolbarFactory ,
829
851
selectionWatcher ,
830
852
emojiCommandsPlugin ,
0 commit comments