From 3715a70f720f69aaab8524332baf10d202401a4b Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Tue, 11 Feb 2025 12:37:20 -0500 Subject: [PATCH] Hide advanced openrouter config in the welcome view --- .changeset/polite-lizards-rhyme.md | 5 ++ .../src/components/settings/ApiOptions.tsx | 79 +++++++++---------- 2 files changed, 43 insertions(+), 41 deletions(-) create mode 100644 .changeset/polite-lizards-rhyme.md diff --git a/.changeset/polite-lizards-rhyme.md b/.changeset/polite-lizards-rhyme.md new file mode 100644 index 0000000000..690b900743 --- /dev/null +++ b/.changeset/polite-lizards-rhyme.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +Hide advanced openrouter config in the welcome view diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index ce34e5f194..0d8bb43bb5 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -355,30 +355,6 @@ const ApiOptions = ({ apiErrorMessage, modelIdErrorMessage, fromWelcomeView }: A

)} - { - setOpenRouterBaseUrlSelected(checked) - if (!checked) { - handleInputChange("openRouterBaseUrl")({ - target: { - value: "", - }, - }) - } - }}> - Use custom base URL - - - {openRouterBaseUrlSelected && ( - - )}

This key is stored locally and only used to make API requests from this extension.{" "} - {/* {!apiConfiguration?.openRouterApiKey && ( - - (Note: OpenRouter is recommended for high rate - limits, prompt caching, and wider selection of models.) - - )} */}

- { - handleInputChange("openRouterUseMiddleOutTransform")({ - target: { value: checked }, - }) - }}> - Compress prompts and message chains to the context size ( - OpenRouter Transforms) - -
+ {!fromWelcomeView && ( + <> + { + setOpenRouterBaseUrlSelected(checked) + if (!checked) { + handleInputChange("openRouterBaseUrl")({ + target: { + value: "", + }, + }) + } + }}> + Use custom base URL + + + {openRouterBaseUrlSelected && ( + + )} + { + handleInputChange("openRouterUseMiddleOutTransform")({ + target: { value: checked }, + }) + }}> + Compress prompts and message chains to the context size ( + OpenRouter Transforms) + + + )} )}