Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/polite-lizards-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"roo-cline": patch
---

Hide advanced openrouter config in the welcome view
79 changes: 38 additions & 41 deletions webview-ui/src/components/settings/ApiOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,55 +355,52 @@ const ApiOptions = ({ apiErrorMessage, modelIdErrorMessage, fromWelcomeView }: A
</VSCodeButtonLink>
</p>
)}
<Checkbox
checked={openRouterBaseUrlSelected}
onChange={(checked: boolean) => {
setOpenRouterBaseUrlSelected(checked)
if (!checked) {
handleInputChange("openRouterBaseUrl")({
target: {
value: "",
},
})
}
}}>
Use custom base URL
</Checkbox>

{openRouterBaseUrlSelected && (
<VSCodeTextField
value={apiConfiguration?.openRouterBaseUrl || ""}
style={{ width: "100%", marginTop: 3 }}
type="url"
onBlur={handleInputChange("openRouterBaseUrl")}
placeholder="Default: https://openrouter.ai/api/v1"
/>
)}
<p
style={{
fontSize: "12px",
marginTop: "5px",
color: "var(--vscode-descriptionForeground)",
}}>
This key is stored locally and only used to make API requests from this extension.{" "}
{/* {!apiConfiguration?.openRouterApiKey && (
<span style={{ color: "var(--vscode-charts-green)" }}>
(<span style={{ fontWeight: 500 }}>Note:</span> OpenRouter is recommended for high rate
limits, prompt caching, and wider selection of models.)
</span>
)} */}
</p>
<Checkbox
checked={apiConfiguration?.openRouterUseMiddleOutTransform || false}
onChange={(checked: boolean) => {
handleInputChange("openRouterUseMiddleOutTransform")({
target: { value: checked },
})
}}>
Compress prompts and message chains to the context size (
<a href="https://openrouter.ai/docs/transforms">OpenRouter Transforms</a>)
</Checkbox>
<br />
{!fromWelcomeView && (
<>
<Checkbox
checked={openRouterBaseUrlSelected}
onChange={(checked: boolean) => {
setOpenRouterBaseUrlSelected(checked)
if (!checked) {
handleInputChange("openRouterBaseUrl")({
target: {
value: "",
},
})
}
}}>
Use custom base URL
</Checkbox>

{openRouterBaseUrlSelected && (
<VSCodeTextField
value={apiConfiguration?.openRouterBaseUrl || ""}
style={{ width: "100%", marginTop: 3 }}
type="url"
onBlur={handleInputChange("openRouterBaseUrl")}
placeholder="Default: https://openrouter.ai/api/v1"
/>
)}
<Checkbox
checked={apiConfiguration?.openRouterUseMiddleOutTransform || false}
onChange={(checked: boolean) => {
handleInputChange("openRouterUseMiddleOutTransform")({
target: { value: checked },
})
}}>
Compress prompts and message chains to the context size (
<a href="https://openrouter.ai/docs/transforms">OpenRouter Transforms</a>)
</Checkbox>
</>
)}
</div>
)}

Expand Down
37 changes: 20 additions & 17 deletions webview-ui/src/components/welcome/WelcomeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,26 @@ const WelcomeView = () => {
}

return (
<div style={{ position: "fixed", top: 0, left: 0, right: 0, bottom: 0, padding: "0 20px" }}>
<h2>Hi, I'm Roo!</h2>
<p>
I can do all kinds of tasks thanks to the latest breakthroughs in agentic coding capabilities and access
to tools that let me create & edit files, explore complex projects, use the browser, and execute
terminal commands (with your permission, of course). I can even use MCP to create new tools and extend
my own capabilities.
</p>

<b>To get started, this extension needs an API provider.</b>

<div style={{ marginTop: "10px" }}>
<ApiOptions fromWelcomeView />
<div style={{ display: "flex", flexDirection: "column", gap: "5px" }}>
<VSCodeButton onClick={handleSubmit} style={{ marginTop: "3px" }}>
Let's go!
</VSCodeButton>
<div className="flex flex-col min-h-screen px-0 pb-5">
<div className="flex-grow">
<h2>Hi, I'm Roo!</h2>
<p>
I can do all kinds of tasks thanks to the latest breakthroughs in agentic coding capabilities and
access to tools that let me create & edit files, explore complex projects, use the browser, and
execute terminal commands (with your permission, of course). I can even use MCP to create new tools
and extend my own capabilities.
</p>

<b>To get started, this extension needs an API provider.</b>

<div className="mt-3">
<ApiOptions fromWelcomeView />
</div>
</div>

<div className="sticky bottom-0 bg-[var(--vscode-editor-background)] py-3">
<div className="flex flex-col gap-1.5">
<VSCodeButton onClick={handleSubmit}>Let's go!</VSCodeButton>
{errorMessage && <span className="text-destructive">{errorMessage}</span>}
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions webview-ui/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ vscode-dropdown::part(listbox) {
max-height: unset !important;
}

.vscrui-checkbox svg {
min-width: 16px;
min-height: 16px;
}

/**
* @shadcn/ui Overrides / Hacks
*/
Expand Down
Loading