|
1 | 1 | import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" |
2 | | -import { useEffect, useState } from "react" |
3 | 2 | import { useExtensionState } from "../../context/ExtensionStateContext" |
4 | | -import { validateApiConfiguration } from "../../utils/validate" |
5 | 3 | import { vscode } from "../../utils/vscode" |
6 | | -import ApiOptions from "../settings/ApiOptions" |
7 | 4 |
|
8 | 5 | const WelcomeView = () => { |
9 | | - const { apiConfiguration } = useExtensionState() |
10 | | - |
11 | | - const [apiErrorMessage, setApiErrorMessage] = useState<string | undefined>(undefined) |
12 | | - |
13 | | - const disableLetsGoButton = apiErrorMessage != null |
14 | | - |
15 | 6 | 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 | + }) |
17 | 15 | } |
18 | 16 |
|
19 | | - useEffect(() => { |
20 | | - setApiErrorMessage(validateApiConfiguration(apiConfiguration)) |
21 | | - }, [apiConfiguration]) |
22 | | - |
23 | 17 | return ( |
24 | 18 | <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> |
26 | 20 | <p> |
27 | 21 | I can do all kinds of tasks thanks to the latest breakthroughs in agentic coding capabilities and access |
28 | 22 | to tools that let me create & edit files, explore complex projects, use the browser, and execute |
29 | 23 | terminal commands (with your permission, of course). I can even use MCP to create new tools and extend |
30 | 24 | my own capabilities. |
31 | 25 | </p> |
32 | 26 |
|
33 | | - <b>To get started, this extension needs an API provider.</b> |
34 | | - |
35 | 27 | <div style={{ marginTop: "10px" }}> |
36 | | - <ApiOptions /> |
37 | | - <VSCodeButton onClick={handleSubmit} disabled={disableLetsGoButton} style={{ marginTop: "3px" }}> |
| 28 | + <VSCodeButton onClick={handleSubmit} style={{ marginTop: "3px" }}> |
38 | 29 | Let's go! |
39 | 30 | </VSCodeButton> |
40 | 31 | </div> |
|
0 commit comments