@@ -83,9 +83,7 @@ export class ChatWidgetFactory extends ABCWidgetFactory<
83
83
this . _rmRegistry = options . rmRegistry ;
84
84
this . _chatCommandRegistry = options . chatCommandRegistry ;
85
85
this . _attachmentOpenerRegistry = options . attachmentOpenerRegistry ;
86
- if ( options . inputToolbarFactory ) {
87
- this . _inputToolbarRegistry = options . inputToolbarFactory . create ( ) ;
88
- }
86
+ this . _inputToolbarFactory = options . inputToolbarFactory ;
89
87
}
90
88
91
89
/**
@@ -99,7 +97,9 @@ export class ChatWidgetFactory extends ABCWidgetFactory<
99
97
context . themeManager = this . _themeManager ;
100
98
context . chatCommandRegistry = this . _chatCommandRegistry ;
101
99
context . attachmentOpenerRegistry = this . _attachmentOpenerRegistry ;
102
- context . inputToolbarRegistry = this . _inputToolbarRegistry ;
100
+ if ( this . _inputToolbarFactory ) {
101
+ context . inputToolbarRegistry = this . _inputToolbarFactory . create ( ) ;
102
+ }
103
103
return new LabChatPanel ( {
104
104
context,
105
105
content : new ChatWidget ( context )
@@ -110,7 +110,7 @@ export class ChatWidgetFactory extends ABCWidgetFactory<
110
110
private _rmRegistry : IRenderMimeRegistry ;
111
111
private _chatCommandRegistry ?: IChatCommandRegistry ;
112
112
private _attachmentOpenerRegistry ?: IAttachmentOpenerRegistry ;
113
- private _inputToolbarRegistry ?: IInputToolbarRegistry ;
113
+ private _inputToolbarFactory ?: IInputToolbarRegistryFactory ;
114
114
}
115
115
116
116
export namespace ChatWidgetFactory {
0 commit comments