Skip to content

Commit beca396

Browse files
committed
Fix the chat widget factory context
1 parent 559244b commit beca396

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/jupyterlab-chat/src/factory.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class ChatWidgetFactory extends ABCWidgetFactory<
7575
* @returns The widget
7676
*/
7777
protected createNewWidget(context: ChatWidgetFactory.IContext): LabChatPanel {
78-
context = { ...context, ...this._chatOptions };
78+
Object.assign(context, this._chatOptions);
7979
if (this._inputToolbarFactory) {
8080
context.inputToolbarRegistry = this._inputToolbarFactory.create();
8181
}
@@ -93,6 +93,7 @@ export class ChatWidgetFactory extends ABCWidgetFactory<
9393
get contentProviderId(): string {
9494
return 'rtc';
9595
}
96+
9697
// Must override both getter and setter from ABCFactory for type compatibility.
9798
set contentProviderId(_value: string | undefined) {}
9899
private _chatOptions: Omit<Chat.IOptions, 'model'>;
@@ -176,8 +177,6 @@ export class LabChatModelFactory
176177
/**
177178
* Create a new instance of LabChatModel.
178179
*
179-
* @param languagePreference Language
180-
* @param modelDB Model database
181180
* @returns The model
182181
*/
183182

0 commit comments

Comments
 (0)