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") Accessible.description: qsTr("The top item is the current model")
onActivated: function (index) { onActivated: function (index) {
var newInfo = ModelList.modelInfo(comboBox.valueAt(index)); var newInfo = ModelList.modelInfo(comboBox.valueAt(index));
if (currentModelName() !== "" if (newInfo === currentChat.modelInfo) {
&& newInfo !== currentChat.modelInfo currentChat.reloadModel();
&& chatModel.count !== 0) { } else if (currentModelName() !== "" && chatModel.count !== 0) {
switchModelDialog.index = index; switchModelDialog.index = index;
switchModelDialog.open(); switchModelDialog.open();
} else { } else {