Fix model swap (#299621)

This commit is contained in:
Logan Ramos
2026-03-05 18:25:42 -05:00
committed by GitHub
parent b24b147db4
commit 8d20dd5210

View File

@@ -1946,11 +1946,9 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
if (e.currentSessionResource && newSessionType !== this._currentSessionType) {
this._currentSessionType = newSessionType;
this.initSelectedModel();
this.checkModelInSessionPool();
}
// Validate that the current model belongs to the new session's pool
this.checkModelInSessionPool();
// For contributed sessions with history, pre-select the model
// from the last request so the user resumes with the same model.
this.preselectModelFromSessionHistory();