88 * Originally adapted from jupyterlab-chat's ChatPanel
99 */
1010
11- import { InputDialog , IThemeManager } from '@jupyterlab/apputils' ;
12- import { IRenderMimeRegistry } from '@jupyterlab/rendermime' ;
11+ import { InputDialog } from '@jupyterlab/apputils' ;
1312import {
1413 addIcon ,
1514 closeIcon ,
@@ -34,11 +33,6 @@ import {
3433} from '../components' ;
3534import { chatIcon , readIcon } from '../icons' ;
3635import { IChatModel } from '../model' ;
37- import {
38- IAttachmentOpenerRegistry ,
39- IChatCommandRegistry ,
40- IMessageFooterRegistry
41- } from '../registers' ;
4236
4337const SIDEPANEL_CLASS = 'jp-chat-sidepanel' ;
4438const ADD_BUTTON_CLASS = 'jp-chat-add' ;
@@ -58,13 +52,8 @@ export class MultiChatPanel extends SidePanel {
5852
5953 this . addClass ( SIDEPANEL_CLASS ) ;
6054
61- this . _rmRegistry = options . rmRegistry ;
62- this . _themeManager = options . themeManager ;
63- this . _chatCommandRegistry = options . chatCommandRegistry ;
64- this . _attachmentOpenerRegistry = options . attachmentOpenerRegistry ;
55+ this . _chatOptions = options ;
6556 this . _inputToolbarFactory = options . inputToolbarFactory ;
66- this . _messageFooterRegistry = options . messageFooterRegistry ;
67- this . _welcomeMessage = options . welcomeMessage ;
6857
6958 this . _getChatNames = options . getChatNames ;
7059 this . _createModel = options . createModel ;
@@ -149,13 +138,8 @@ export class MultiChatPanel extends SidePanel {
149138 // Create a new widget.
150139 const widget = new ChatWidget ( {
151140 model,
152- rmRegistry : this . _rmRegistry ,
153- themeManager : this . _themeManager ,
154- chatCommandRegistry : this . _chatCommandRegistry ,
155- attachmentOpenerRegistry : this . _attachmentOpenerRegistry ,
141+ ...this . _chatOptions ,
156142 inputToolbarRegistry,
157- messageFooterRegistry : this . _messageFooterRegistry ,
158- welcomeMessage : this . _welcomeMessage ,
159143 area : 'sidebar'
160144 } ) ;
161145
@@ -267,13 +251,8 @@ export class MultiChatPanel extends SidePanel {
267251 this
268252 ) ;
269253 private _sectionAdded = new Signal < MultiChatPanel , ChatSection > ( this ) ;
270- private _rmRegistry : IRenderMimeRegistry ;
271- private _themeManager ?: IThemeManager | null ;
272- private _chatCommandRegistry ?: IChatCommandRegistry ;
273- private _attachmentOpenerRegistry ?: IAttachmentOpenerRegistry ;
254+ private _chatOptions : Omit < Chat . IOptions , 'model' | 'inputToolbarRegistry' > ;
274255 private _inputToolbarFactory ?: IInputToolbarRegistryFactory ;
275- private _messageFooterRegistry ?: IMessageFooterRegistry ;
276- private _welcomeMessage ?: string ;
277256 private _updateChatListDebouncer : Debouncer ;
278257
279258 private _createModel ?: (
0 commit comments