Don't erase context when reloading model by selection.

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
Adam Treat 2024-02-20 12:05:13 -05:00 committed by AT
parent fbf5e5e732
commit ad34c2bdd4

View File

@ -443,9 +443,9 @@ Window {
Accessible.description: qsTr("The top item is the current model")
onActivated: function (index) {
var newInfo = ModelList.modelInfo(comboBox.valueAt(index));
if (currentModelName() !== ""
&& newInfo !== currentChat.modelInfo
&& chatModel.count !== 0) {
if (newInfo === currentChat.modelInfo) {
currentChat.reloadModel();
} else if (currentModelName() !== "" && chatModel.count !== 0) {
switchModelDialog.index = index;
switchModelDialog.open();
} else {