@@ -12,8 +12,10 @@ import {
1212 IAttachment ,
1313 IAttachmentOpenerRegistry ,
1414 IChatCommandRegistry ,
15+ IMessageFooterRegistry ,
1516 ISelectionWatcher ,
1617 InputToolbarRegistry ,
18+ MessageFooterRegistry ,
1719 SelectionWatcher ,
1820 chatIcon ,
1921 readIcon
@@ -115,6 +117,7 @@ const docFactories: JupyterFrontEndPlugin<IChatFactory> = {
115117 IDefaultFileBrowser ,
116118 IInputToolbarRegistryFactory ,
117119 ILayoutRestorer ,
120+ IMessageFooterRegistry ,
118121 ISelectionWatcherToken ,
119122 ISettingRegistry ,
120123 IThemeManager ,
@@ -132,6 +135,7 @@ const docFactories: JupyterFrontEndPlugin<IChatFactory> = {
132135 filebrowser : IDefaultFileBrowser | null ,
133136 inputToolbarFactory : IInputToolbarRegistryFactory ,
134137 restorer : ILayoutRestorer | null ,
138+ messageFooterRegistry : IMessageFooterRegistry ,
135139 selectionWatcher : ISelectionWatcher | null ,
136140 settingRegistry : ISettingRegistry | null ,
137141 themeManager : IThemeManager | null ,
@@ -301,7 +305,8 @@ const docFactories: JupyterFrontEndPlugin<IChatFactory> = {
301305 translator,
302306 chatCommandRegistry,
303307 attachmentOpenerRegistry,
304- inputToolbarFactory
308+ inputToolbarFactory,
309+ messageFooterRegistry
305310 } ) ;
306311
307312 // Add the widget to the tracker when it's created
@@ -665,6 +670,7 @@ const chatPanel: JupyterFrontEndPlugin<ChatPanel> = {
665670 IChatCommandRegistry ,
666671 IInputToolbarRegistryFactory ,
667672 ILayoutRestorer ,
673+ IMessageFooterRegistry ,
668674 IThemeManager
669675 ] ,
670676 activate : (
@@ -676,6 +682,7 @@ const chatPanel: JupyterFrontEndPlugin<ChatPanel> = {
676682 chatCommandRegistry : IChatCommandRegistry ,
677683 inputToolbarFactory : IInputToolbarRegistryFactory ,
678684 restorer : ILayoutRestorer | null ,
685+ messageFooterRegistry : IMessageFooterRegistry ,
679686 themeManager : IThemeManager | null
680687 ) : ChatPanel => {
681688 const { commands } = app ;
@@ -693,7 +700,8 @@ const chatPanel: JupyterFrontEndPlugin<ChatPanel> = {
693700 defaultDirectory,
694701 chatCommandRegistry,
695702 attachmentOpenerRegistry,
696- inputToolbarFactory
703+ inputToolbarFactory,
704+ messageFooterRegistry
697705 } ) ;
698706 chatPanel . id = 'JupyterlabChat:sidepanel' ;
699707 chatPanel . title . icon = chatIcon ;
@@ -818,13 +826,27 @@ const inputToolbarFactory: JupyterFrontEndPlugin<IInputToolbarRegistryFactory> =
818826 }
819827 } ;
820828
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+
821842export default [
822843 activeCellManager ,
823844 attachmentOpeners ,
824845 chatCommands ,
825846 chatCommandRegistryPlugin ,
826847 chatPanel ,
827848 docFactories ,
849+ footerRegistry ,
828850 inputToolbarFactory ,
829851 selectionWatcher ,
830852 emojiCommandsPlugin ,
0 commit comments