diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 1edb3c6bae4..f53024d6cbb 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -635,6 +635,11 @@ export function Settings() { navigate(Path.Home); } }; + if (clientConfig?.isApp) { // Force to set custom endpoint to true if it's app + accessStore.update((state) => { + state.useCustomConfig = true; + }); + } document.addEventListener("keydown", keydownEvent); return () => { document.removeEventListener("keydown", keydownEvent); @@ -909,21 +914,26 @@ export function Settings() { {!accessStore.hideUserApiKey && ( <> - - - accessStore.update( - (access) => - (access.useCustomConfig = e.currentTarget.checked), - ) - } - > - + { + // Conditionally render the following ListItem based on clientConfig.isApp + !clientConfig?.isApp && ( // only show if isApp is false + + + accessStore.update( + (access) => + (access.useCustomConfig = e.currentTarget.checked), + ) + } + > + + ) + } {accessStore.useCustomConfig && ( <>