Skip to content

Commit 351d461

Browse files
authored
Merge pull request #944 from RooVetGit/hide_advanced_openrouter_config_in_welcome_view
Hide advanced openrouter config in the welcome view
2 parents a3bb0ed + c97eef7 commit 351d461

File tree

4 files changed

+68
-58
lines changed

4 files changed

+68
-58
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

webview-ui/src/components/welcome/WelcomeView.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,26 @@ const WelcomeView = () => {
2121
}
2222

2323
return (
24-
<div style={{ position: "fixed", top: 0, left: 0, right: 0, bottom: 0, padding: "0 20px" }}>
25-
<h2>Hi, I'm Roo!</h2>
26-
<p>
27-
I can do all kinds of tasks thanks to the latest breakthroughs in agentic coding capabilities and access
28-
to tools that let me create & edit files, explore complex projects, use the browser, and execute
29-
terminal commands (with your permission, of course). I can even use MCP to create new tools and extend
30-
my own capabilities.
31-
</p>
32-
33-
<b>To get started, this extension needs an API provider.</b>
34-
35-
<div style={{ marginTop: "10px" }}>
36-
<ApiOptions fromWelcomeView />
37-
<div style={{ display: "flex", flexDirection: "column", gap: "5px" }}>
38-
<VSCodeButton onClick={handleSubmit} style={{ marginTop: "3px" }}>
39-
Let's go!
40-
</VSCodeButton>
24+
<div className="flex flex-col min-h-screen px-0 pb-5">
25+
<div className="flex-grow">
26+
<h2>Hi, I'm Roo!</h2>
27+
<p>
28+
I can do all kinds of tasks thanks to the latest breakthroughs in agentic coding capabilities and
29+
access to tools that let me create & edit files, explore complex projects, use the browser, and
30+
execute terminal commands (with your permission, of course). I can even use MCP to create new tools
31+
and extend my own capabilities.
32+
</p>
33+
34+
<b>To get started, this extension needs an API provider.</b>
35+
36+
<div className="mt-3">
37+
<ApiOptions fromWelcomeView />
38+
</div>
39+
</div>
40+
41+
<div className="sticky bottom-0 bg-[var(--vscode-editor-background)] py-3">
42+
<div className="flex flex-col gap-1.5">
43+
<VSCodeButton onClick={handleSubmit}>Let's go!</VSCodeButton>
4144
{errorMessage && <span className="text-destructive">{errorMessage}</span>}
4245
</div>
4346
</div>

webview-ui/src/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,11 @@ vscode-dropdown::part(listbox) {
319319
max-height: unset !important;
320320
}
321321

322+
.vscrui-checkbox svg {
323+
min-width: 16px;
324+
min-height: 16px;
325+
}
326+
322327
/**
323328
* @shadcn/ui Overrides / Hacks
324329
*/

0 commit comments

Comments
 (0)