Skip to content

Commit 3715a70

Browse files
committed
Hide advanced openrouter config in the welcome view
1 parent a3bb0ed commit 3715a70

File tree

2 files changed

+43
-41
lines changed

2 files changed

+43
-41
lines changed

.changeset/polite-lizards-rhyme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Hide advanced openrouter config in the welcome view

webview-ui/src/components/settings/ApiOptions.tsx

Lines changed: 38 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -355,55 +355,52 @@ const ApiOptions = ({ apiErrorMessage, modelIdErrorMessage, fromWelcomeView }: A
355355
</VSCodeButtonLink>
356356
</p>
357357
)}
358-
<Checkbox
359-
checked={openRouterBaseUrlSelected}
360-
onChange={(checked: boolean) => {
361-
setOpenRouterBaseUrlSelected(checked)
362-
if (!checked) {
363-
handleInputChange("openRouterBaseUrl")({
364-
target: {
365-
value: "",
366-
},
367-
})
368-
}
369-
}}>
370-
Use custom base URL
371-
</Checkbox>
372-
373-
{openRouterBaseUrlSelected && (
374-
<VSCodeTextField
375-
value={apiConfiguration?.openRouterBaseUrl || ""}
376-
style={{ width: "100%", marginTop: 3 }}
377-
type="url"
378-
onBlur={handleInputChange("openRouterBaseUrl")}
379-
placeholder="Default: https://openrouter.ai/api/v1"
380-
/>
381-
)}
382358
<p
383359
style={{
384360
fontSize: "12px",
385361
marginTop: "5px",
386362
color: "var(--vscode-descriptionForeground)",
387363
}}>
388364
This key is stored locally and only used to make API requests from this extension.{" "}
389-
{/* {!apiConfiguration?.openRouterApiKey && (
390-
<span style={{ color: "var(--vscode-charts-green)" }}>
391-
(<span style={{ fontWeight: 500 }}>Note:</span> OpenRouter is recommended for high rate
392-
limits, prompt caching, and wider selection of models.)
393-
</span>
394-
)} */}
395365
</p>
396-
<Checkbox
397-
checked={apiConfiguration?.openRouterUseMiddleOutTransform || false}
398-
onChange={(checked: boolean) => {
399-
handleInputChange("openRouterUseMiddleOutTransform")({
400-
target: { value: checked },
401-
})
402-
}}>
403-
Compress prompts and message chains to the context size (
404-
<a href="https://openrouter.ai/docs/transforms">OpenRouter Transforms</a>)
405-
</Checkbox>
406-
<br />
366+
{!fromWelcomeView && (
367+
<>
368+
<Checkbox
369+
checked={openRouterBaseUrlSelected}
370+
onChange={(checked: boolean) => {
371+
setOpenRouterBaseUrlSelected(checked)
372+
if (!checked) {
373+
handleInputChange("openRouterBaseUrl")({
374+
target: {
375+
value: "",
376+
},
377+
})
378+
}
379+
}}>
380+
Use custom base URL
381+
</Checkbox>
382+
383+
{openRouterBaseUrlSelected && (
384+
<VSCodeTextField
385+
value={apiConfiguration?.openRouterBaseUrl || ""}
386+
style={{ width: "100%", marginTop: 3 }}
387+
type="url"
388+
onBlur={handleInputChange("openRouterBaseUrl")}
389+
placeholder="Default: https://openrouter.ai/api/v1"
390+
/>
391+
)}
392+
<Checkbox
393+
checked={apiConfiguration?.openRouterUseMiddleOutTransform || false}
394+
onChange={(checked: boolean) => {
395+
handleInputChange("openRouterUseMiddleOutTransform")({
396+
target: { value: checked },
397+
})
398+
}}>
399+
Compress prompts and message chains to the context size (
400+
<a href="https://openrouter.ai/docs/transforms">OpenRouter Transforms</a>)
401+
</Checkbox>
402+
</>
403+
)}
407404
</div>
408405
)}
409406

0 commit comments

Comments
 (0)