mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
fix(ui): preserve server config values on partial provider config save
The submit filter in ProviderConfiguationModal only included fields where the user had typed a new value (entry.value), causing untouched fields like API Host to be silently dropped. Now the filter also includes fields with existing non-masked server values (entry.serverValue), preventing config reversion when only some fields are edited. Fixes #7245 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: clayarnoldg2m <carnold@g2m.ai>
This commit is contained in:
@@ -105,8 +105,15 @@ export default function ProviderConfigurationModal({
|
||||
|
||||
const toSubmit = Object.fromEntries(
|
||||
Object.entries(configValues)
|
||||
.filter(([_k, entry]) => !!entry.value)
|
||||
.map(([k, entry]) => [k, entry.value || ''])
|
||||
.filter(
|
||||
([_k, entry]) =>
|
||||
!!entry.value ||
|
||||
(entry.serverValue != null && typeof entry.serverValue === 'string')
|
||||
)
|
||||
.map(([k, entry]) => [
|
||||
k,
|
||||
entry.value ?? (typeof entry.serverValue === 'string' ? entry.serverValue : ''),
|
||||
])
|
||||
);
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user