Some fix in chat panel with reset of chosen model, not sure this fix is correct
This commit is contained in:
parent
b8382c2d4f
commit
63ca8f2a73
|
|
@ -166,6 +166,13 @@ export class ChatPanel {
|
||||||
|
|
||||||
setSelectedModel(model: string): void {
|
setSelectedModel(model: string): void {
|
||||||
this.selectedModel = model;
|
this.selectedModel = model;
|
||||||
|
|
||||||
|
if (this.props.plugin.settings) {
|
||||||
|
this.props.plugin.settings.defaultModel = model;
|
||||||
|
// TODO: Сохранение настройки здесь может привести к зацикливанию
|
||||||
|
// Не обязательно сохранять в файл сразу, но ChatView должен видеть актуальное значение
|
||||||
|
}
|
||||||
|
|
||||||
const modelNameElement = this.container.querySelector('#selected-model-name');
|
const modelNameElement = this.container.querySelector('#selected-model-name');
|
||||||
if (modelNameElement) {
|
if (modelNameElement) {
|
||||||
modelNameElement.textContent = model;
|
modelNameElement.textContent = model;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user