@@ -25,7 +25,7 @@ import { ArrayExt } from '@lumino/algorithm';
2525import { Message , MessageLoop } from '@lumino/messaging' ;
2626import { Debouncer } from '@lumino/polling' ;
2727import { ISignal , Signal } from '@lumino/signaling' ;
28- import { Panel , Widget } from '@lumino/widgets' ;
28+ import { Widget } from '@lumino/widgets' ;
2929import React , { useEffect , useRef , useState } from 'react' ;
3030
3131import { ChatSelectorPopup } from './chat-selector-popup' ;
@@ -45,26 +45,8 @@ const SIDEPANEL_CLASS = 'jp-chat-sidepanel';
4545const ADD_BUTTON_CLASS = 'jp-chat-add' ;
4646const OPEN_SELECT_CLASS = 'jp-chat-open' ;
4747const SIDEPANEL_WIDGET_CLASS = 'jp-chat-sidepanel-widget' ;
48- // TODO: Drop this workaround class (and related CSS) once we depend on
49- // @jupyterlab /ui-components >= 4.6.0 (refs - jupyterlab/jupyterlab#18824).
5048const TOOLBAR_CLASS = 'jp-chat-sidepanel-widget-toolbar' ;
5149
52- /**
53- * A panel widget with a reactive toolbar.
54- */
55- class ReactivePanelWithToolbar extends Panel {
56- constructor ( ) {
57- super ( ) ;
58- this . _toolbar = new ReactiveToolbar ( { noFocusOnClick : true } ) ;
59- }
60-
61- get toolbar ( ) : ReactiveToolbar {
62- return this . _toolbar ;
63- }
64-
65- private _toolbar : ReactiveToolbar ;
66- }
67-
6850/**
6951 * Generic sidepanel widget including multiple chats and the add chat button.
7052 */
@@ -531,9 +513,9 @@ export namespace MultiChatPanel {
531513/**
532514 * A widget containing the chat and its toolbar.
533515 */
534- class SidePanelWidget extends ReactivePanelWithToolbar {
516+ class SidePanelWidget extends PanelWithToolbar {
535517 constructor ( options : SidePanelWidget . IOptions ) {
536- super ( ) ;
518+ super ( { toolbar : new ReactiveToolbar ( { noFocusOnClick : true } ) } ) ;
537519 this . _chatWidget = options . widget ;
538520 this . _displayName = options . displayName ?? options . widget . model . name ;
539521 const trans = options . trans ;
0 commit comments