Skip to content

Commit cd43148

Browse files
committed
Fix the chat widget factory context
1 parent c4e1c7f commit cd43148

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/jupyterlab-chat/src/factory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export class ChatWidgetFactory extends ABCWidgetFactory<
7575
* @returns The widget
7676
*/
7777
protected createNewWidget(context: ChatWidgetFactory.IContext): LabChatPanel {
78-
context = { ...context, area: 'main', ...this._chatOptions };
78+
Object.assign(context, this._chatOptions);
79+
context.area = 'main';
7980
if (this._inputToolbarFactory) {
8081
context.inputToolbarRegistry = this._inputToolbarFactory.create();
8182
}
@@ -93,6 +94,7 @@ export class ChatWidgetFactory extends ABCWidgetFactory<
9394
get contentProviderId(): string {
9495
return 'rtc';
9596
}
97+
9698
// Must override both getter and setter from ABCFactory for type compatibility.
9799
set contentProviderId(_value: string | undefined) {}
98100
private _chatOptions: Omit<Chat.IOptions, 'model'>;
@@ -176,8 +178,6 @@ export class LabChatModelFactory
176178
/**
177179
* Create a new instance of LabChatModel.
178180
*
179-
* @param languagePreference Language
180-
* @param modelDB Model database
181181
* @returns The model
182182
*/
183183

0 commit comments

Comments
 (0)