🐛 fix(settings): fixed bug preventing custom headers from being saved #3558
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The issue was that when users added or modified custom headers, the changes were only stored in the local component state but never propagated to the main configuration object that gets saved.
The fix adds a
useEffecthook that updates the main configuration whenever the custom headers change, ensuring they're properly saved when the user clicks the "Save" button.Now users can successfully add custom headers to their OpenAI Compatible provider configurations.
Test plan:
Closes: Kilo-Org/kilocode#383
Type of Change
srcor test files.Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Screenshots / Videos
Documentation Updates
Important
Fixes bug in
OpenAICompatible.tsxto ensure custom headers are saved by updating the main configuration with auseEffecthook.OpenAICompatible.tsxwhere custom headers were not saved to the main configuration.useEffecthook to updateopenAiHeadersin the main configuration whencustomHeaderschange.This description was created by
for 75995e11e316be2451551215feba301b6d629a47. You can customize this summary. It will automatically update as commits are pushed.