File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
webview-ui/src/components/settings Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,12 @@ const ApiOptions = ({
8585 return Object . entries ( headers )
8686 } )
8787
88+ // Effect to synchronize internal customHeaders state with prop changes
89+ useEffect ( ( ) => {
90+ const propHeaders = apiConfiguration ?. openAiHeaders || { }
91+ setCustomHeaders ( Object . entries ( propHeaders ) )
92+ } , [ apiConfiguration ?. openAiHeaders ] )
93+
8894 const [ anthropicBaseUrlSelected , setAnthropicBaseUrlSelected ] = useState ( ! ! apiConfiguration ?. anthropicBaseUrl )
8995 const [ azureApiVersionSelected , setAzureApiVersionSelected ] = useState ( ! ! apiConfiguration ?. azureApiVersion )
9096 const [ openRouterBaseUrlSelected , setOpenRouterBaseUrlSelected ] = useState ( ! ! apiConfiguration ?. openRouterBaseUrl )
You can’t perform that action at this time.
0 commit comments