fix(codex): preserve local model settings
This commit is contained in:
1 parent
64fb27f539
commit
65eee69fb9
4 files changed
+8
-8
No files matched your search
@@ -87,7 +87,7 @@ function Sync-ManagedDestination {
|
||||
$localConfig = [System.IO.File]::ReadAllText($target)
|
||||
$pluginTables = [regex]::Matches($localConfig, '(?m)^[ \t]*\[(?:plugins|marketplaces)(?:\.|\])[\s\S]*?(?=^[ \t]*\[|\z)')
|
||||
$rootConfig = [regex]::Split($localConfig, '(?m)^[ \t]*\[', 2)[0]
|
||||
$localSettings = [regex]::Matches($rootConfig, '(?m)^[ \t]*(?:model|reasoning_effort)[ \t]*=.*$')
|
||||
$localSettings = [regex]::Matches($rootConfig, '(?m)^[ \t]*(?:model|model_reasoning_effort)[ \t]*=.*$')
|
||||
if ($localSettings.Count -gt 0) {
|
||||
$content = [System.Text.Encoding]::UTF8.GetString($newBytes).TrimEnd([char[]]"`r`n")
|
||||
foreach ($setting in $localSettings) {
|
||||
|
||||
@@ -87,7 +87,7 @@ sync_managed_destination() {
|
||||
local plugin_tables local_settings setting_name
|
||||
local_settings=$(awk '
|
||||
/^[ \t]*\[/ { exit }
|
||||
/^[ \t]*(model|reasoning_effort)[ \t]*=/ { print }
|
||||
/^[ \t]*(model|model_reasoning_effort)[ \t]*=/ { print }
|
||||
' "$target")
|
||||
if [ -n "$local_settings" ]; then
|
||||
while IFS= read -r setting; do
|
||||
|
||||
Reference in new issue
Block a user