Some fix in chat panel with reset of chosen model, not sure this fix is correct

This commit is contained in:
dimitrievgs 2026-05-16 19:24:53 +03:00
parent b8382c2d4f
commit 63ca8f2a73

View File

@ -166,6 +166,13 @@ export class ChatPanel {
setSelectedModel(model: string): void {
this.selectedModel = model;
if (this.props.plugin.settings) {
this.props.plugin.settings.defaultModel = model;
// TODO: Сохранение настройки здесь может привести к зацикливанию
// Не обязательно сохранять в файл сразу, но ChatView должен видеть актуальное значение
}
const modelNameElement = this.container.querySelector('#selected-model-name');
if (modelNameElement) {
modelNameElement.textContent = model;