forked from Shinonome/dots-hyprland
fix extragptmodels config option
This commit is contained in:
@@ -239,6 +239,10 @@ let configOptions = {
|
|||||||
let optionsOkay = true;
|
let optionsOkay = true;
|
||||||
function overrideConfigRecursive(userOverrides, configOptions = {}, check = true) {
|
function overrideConfigRecursive(userOverrides, configOptions = {}, check = true) {
|
||||||
for (const [key, value] of Object.entries(userOverrides)) {
|
for (const [key, value] of Object.entries(userOverrides)) {
|
||||||
|
if (!check) {
|
||||||
|
configOptions[key] = value;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (configOptions[key] === undefined && check) {
|
if (configOptions[key] === undefined && check) {
|
||||||
optionsOkay = false;
|
optionsOkay = false;
|
||||||
}
|
}
|
||||||
@@ -246,8 +250,6 @@ function overrideConfigRecursive(userOverrides, configOptions = {}, check = true
|
|||||||
if (key === "substitutions" || key === "regexSubstitutions" || key === "extraGptModels") {
|
if (key === "substitutions" || key === "regexSubstitutions" || key === "extraGptModels") {
|
||||||
overrideConfigRecursive(value, configOptions[key], false);
|
overrideConfigRecursive(value, configOptions[key], false);
|
||||||
} else overrideConfigRecursive(value, configOptions[key]);
|
} else overrideConfigRecursive(value, configOptions[key]);
|
||||||
} else {
|
|
||||||
configOptions[key] = value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user