Browse Source

Cleanup the welcome screen to be less Claude focused

Matt Rubens 1 year ago
parent
commit
525b7424fe

+ 1 - 1
src/core/config/ConfigManager.ts

@@ -16,7 +16,7 @@ export class ConfigManager {
       default: {}
     }
   }
-  private readonly SCOPE_PREFIX = "cline_config_"
+  private readonly SCOPE_PREFIX = "roo_cline_config_"
   private readonly context: ExtensionContext
 
   constructor(context: ExtensionContext) {

+ 5 - 5
src/core/config/__tests__/ConfigManager.test.ts

@@ -121,7 +121,7 @@ describe('ConfigManager', () => {
       }
 
       expect(mockSecrets.store).toHaveBeenCalledWith(
-        'cline_config_api_config',
+        'roo_cline_config_api_config',
         JSON.stringify(expectedConfig, null, 2)
       )
     })
@@ -154,7 +154,7 @@ describe('ConfigManager', () => {
       }
 
       expect(mockSecrets.store).toHaveBeenCalledWith(
-        'cline_config_api_config',
+        'roo_cline_config_api_config',
         JSON.stringify(expectedConfig, null, 2)
       )
     })
@@ -196,7 +196,7 @@ describe('ConfigManager', () => {
       }
 
       expect(mockSecrets.store).toHaveBeenCalledWith(
-        'cline_config_api_config',
+        'roo_cline_config_api_config',
         JSON.stringify(expectedConfig, null, 2)
       )
     })
@@ -256,7 +256,7 @@ describe('ConfigManager', () => {
       }
 
       expect(mockSecrets.store).toHaveBeenCalledWith(
-        'cline_config_api_config',
+        'roo_cline_config_api_config',
         JSON.stringify(expectedConfig, null, 2)
       )
     })
@@ -314,7 +314,7 @@ describe('ConfigManager', () => {
       }
 
       expect(mockSecrets.store).toHaveBeenCalledWith(
-        'cline_config_api_config',
+        'roo_cline_config_api_config',
         JSON.stringify(expectedConfig, null, 2)
       )
     })

+ 2 - 7
webview-ui/src/components/chat/ChatView.tsx

@@ -1,4 +1,4 @@
-import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
+import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
 import debounce from "debounce"
 import { useCallback, useEffect, useMemo, useRef, useState } from "react"
 import { useDeepCompareEffect, useEvent, useMount } from "react-use"
@@ -868,12 +868,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
 					<div style={{ padding: "0 20px", flexShrink: 0 }}>
 						<h2>What can I do for you?</h2>
 						<p>
-							Thanks to{" "}
-							<VSCodeLink
-								href="https://www-cdn.anthropic.com/fed9cc193a14b84131812372d8d5857f8f304c52/Model_Card_Claude_3_Addendum.pdf"
-								style={{ display: "inline" }}>
-								Claude 3.5 Sonnet's agentic coding capabilities,
-							</VSCodeLink>{" "}
+							Thanks to the latest breakthroughs in agentic coding capabilities,
 							I can handle complex software development tasks step-by-step. With tools that let me create
 							& edit files, explore complex projects, use the browser, and execute terminal commands
 							(after you grant permission), I can assist you in ways that go beyond code completion or

+ 4 - 6
webview-ui/src/components/settings/ApiOptions.tsx

@@ -43,12 +43,11 @@ import OpenAiModelPicker from "./OpenAiModelPicker"
 import GlamaModelPicker from "./GlamaModelPicker"
 
 interface ApiOptionsProps {
-	showModelOptions: boolean
 	apiErrorMessage?: string
 	modelIdErrorMessage?: string
 }
 
-const ApiOptions = ({ showModelOptions, apiErrorMessage, modelIdErrorMessage }: ApiOptionsProps) => {
+const ApiOptions = ({ apiErrorMessage, modelIdErrorMessage }: ApiOptionsProps) => {
 	const { apiConfiguration, setApiConfiguration, uriScheme, onUpdateApiConfig } = useExtensionState()
 	const [ollamaModels, setOllamaModels] = useState<string[]>([])
 	const [lmStudioModels, setLmStudioModels] = useState<string[]>([])
@@ -695,16 +694,15 @@ const ApiOptions = ({ showModelOptions, apiErrorMessage, modelIdErrorMessage }:
 				</p>
 			)}
 
-			{selectedProvider === "glama" && showModelOptions && <GlamaModelPicker />}
+			{selectedProvider === "glama" && <GlamaModelPicker />}
 
-			{selectedProvider === "openrouter" && showModelOptions && <OpenRouterModelPicker />}
+			{selectedProvider === "openrouter" && <OpenRouterModelPicker />}
 
 			{selectedProvider !== "glama" &&
 				selectedProvider !== "openrouter" &&
 				selectedProvider !== "openai" &&
 				selectedProvider !== "ollama" &&
-				selectedProvider !== "lmstudio" &&
-				showModelOptions && (
+				selectedProvider !== "lmstudio" && (
 					<>
 						<div className="dropdown-container">
 							<label htmlFor="model-id">

+ 0 - 3
webview-ui/src/components/settings/SettingsView.tsx

@@ -62,8 +62,6 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
 	const [apiErrorMessage, setApiErrorMessage] = useState<string | undefined>(undefined)
 	const [modelIdErrorMessage, setModelIdErrorMessage] = useState<string | undefined>(undefined)
 	const [commandInput, setCommandInput] = useState("")
-	// const [draftNewMode, setDraftNewMode] = useState(false) 
-
 
 	const handleSubmit = () => {
 		const apiValidationResult = validateApiConfiguration(apiConfiguration)
@@ -196,7 +194,6 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
 						}}
 					/>
 					<ApiOptions
-						showModelOptions={true}
 						apiErrorMessage={apiErrorMessage}
 						modelIdErrorMessage={modelIdErrorMessage}
 					/>

+ 4 - 9
webview-ui/src/components/welcome/WelcomeView.tsx

@@ -1,4 +1,4 @@
-import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
+import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
 import { useEffect, useState } from "react"
 import { useExtensionState } from "../../context/ExtensionStateContext"
 import { validateApiConfiguration } from "../../utils/validate"
@@ -24,21 +24,16 @@ const WelcomeView = () => {
 		<div style={{ position: "fixed", top: 0, left: 0, right: 0, bottom: 0, padding: "0 20px" }}>
 			<h2>Hi, I'm Cline</h2>
 			<p>
-				I can do all kinds of tasks thanks to the latest breakthroughs in{" "}
-				<VSCodeLink
-					href="https://www-cdn.anthropic.com/fed9cc193a14b84131812372d8d5857f8f304c52/Model_Card_Claude_3_Addendum.pdf"
-					style={{ display: "inline" }}>
-					Claude 3.5 Sonnet's agentic coding capabilities
-				</VSCodeLink>{" "}
+				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 for Claude 3.5 Sonnet.</b>
+			<b>To get started, this extension needs an API provider.</b>
 
 			<div style={{ marginTop: "10px" }}>
-				<ApiOptions showModelOptions={false} />
+				<ApiOptions />
 				<VSCodeButton onClick={handleSubmit} disabled={disableLetsGoButton} style={{ marginTop: "3px" }}>
 					Let's go!
 				</VSCodeButton>