Skip to content

Commit

Permalink
fix extragptmodels config option
Browse files Browse the repository at this point in the history
  • Loading branch information
end-4 committed Nov 12, 2024
1 parent a4061cb commit 4ed4bf2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .config/ags/modules/.configuration/user_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,17 @@ let configOptions = {
let optionsOkay = true;
function overrideConfigRecursive(userOverrides, configOptions = {}, check = true) {
for (const [key, value] of Object.entries(userOverrides)) {
if (!check) {
configOptions[key] = value;
continue;
}
if (configOptions[key] === undefined && check) {
optionsOkay = false;
}
else if (typeof value === 'object' && !(value instanceof Array)) {
if (key === "substitutions" || key === "regexSubstitutions" || key === "extraGptModels") {
overrideConfigRecursive(value, configOptions[key], false);
} else overrideConfigRecursive(value, configOptions[key]);
} else {
configOptions[key] = value;
}
}
}
Expand Down

2 comments on commit 4ed4bf2

@mogro0022
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recursion doesn't actually set any overrides even when it should.

@Caliel666
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this change broke user config overrides

Please sign in to comment.