This commit is contained in:
Peng Lyu 2024-06-18 11:10:17 -07:00 committed by Peng Lyu
parent f0edc07570
commit 03476c3864

View file

@ -471,6 +471,10 @@ export class NotebookChatController extends Disposable implements INotebookEdito
this._sessionCtor = createCancelablePromise<void>(async token => {
await this._startSession(token);
assertType(this._model.value);
const model = this._model.value;
this._widget?.inlineChatWidget.setChatModel(model);
if (fakeParentEditor.hasModel()) {
if (this._widget) {
@ -548,9 +552,6 @@ export class NotebookChatController extends Disposable implements INotebookEdito
assertType(this._model.value);
assertType(this._strategy);
const model = this._model.value;
this._widget.inlineChatWidget.setChatModel(model);
const lastInput = this._widget.inlineChatWidget.value;
this._historyUpdate(lastInput);