Skip to content

Commit fe68b50

Browse files
committed
Added pearai welcome default
1 parent 7e0acff commit fe68b50

2 files changed

Lines changed: 11 additions & 20 deletions

File tree

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
13271327
// Update mode's default config
13281328
const { mode } = await this.getState()
13291329
if (mode) {
1330-
const currentApiConfigName = await this.getGlobalState("currentApiConfigName")
1330+
const currentApiConfigName = (await this.getGlobalState("currentApiConfigName")) ?? "default"
13311331
const listApiConfig = await this.configManager.listConfig()
13321332
const config = listApiConfig?.find((c) => c.name === currentApiConfigName)
13331333
if (config?.id) {

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

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,31 @@
11
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
2-
import { useEffect, useState } from "react"
32
import { useExtensionState } from "../../context/ExtensionStateContext"
4-
import { validateApiConfiguration } from "../../utils/validate"
53
import { vscode } from "../../utils/vscode"
6-
import ApiOptions from "../settings/ApiOptions"
74

85
const WelcomeView = () => {
9-
const { apiConfiguration } = useExtensionState()
10-
11-
const [apiErrorMessage, setApiErrorMessage] = useState<string | undefined>(undefined)
12-
13-
const disableLetsGoButton = apiErrorMessage != null
14-
156
const handleSubmit = () => {
16-
vscode.postMessage({ type: "apiConfiguration", apiConfiguration })
7+
vscode.postMessage({
8+
type: "apiConfiguration",
9+
apiConfiguration: {
10+
apiProvider: "pearai",
11+
pearaiApiKey: "temp", // TODO: Change this to use api-key
12+
pearaiBaseUrl: "http://localhost:8000/integrations/cline",
13+
},
14+
})
1715
}
1816

19-
useEffect(() => {
20-
setApiErrorMessage(validateApiConfiguration(apiConfiguration))
21-
}, [apiConfiguration])
22-
2317
return (
2418
<div style={{ position: "fixed", top: 0, left: 0, right: 0, bottom: 0, padding: "0 20px" }}>
25-
<h2>Hi, I'm Roo!</h2>
19+
<h2>Welcome to PearAI's Coding Agent (Powered by Roo Code / Cline)!</h2>
2620
<p>
2721
I can do all kinds of tasks thanks to the latest breakthroughs in agentic coding capabilities and access
2822
to tools that let me create & edit files, explore complex projects, use the browser, and execute
2923
terminal commands (with your permission, of course). I can even use MCP to create new tools and extend
3024
my own capabilities.
3125
</p>
3226

33-
<b>To get started, this extension needs an API provider.</b>
34-
3527
<div style={{ marginTop: "10px" }}>
36-
<ApiOptions />
37-
<VSCodeButton onClick={handleSubmit} disabled={disableLetsGoButton} style={{ marginTop: "3px" }}>
28+
<VSCodeButton onClick={handleSubmit} style={{ marginTop: "3px" }}>
3829
Let's go!
3930
</VSCodeButton>
4031
</div>

0 commit comments

Comments
 (0)