+
+
{messages.map((message) => (
{
? "var(--vscode-editor-background)"
: "var(--vscode-sideBar-background)",
}}>
- {message.text}
+ {message.text}
))}
-
+
-
-
-
+ setInputValue(e.target.value)}
+ onKeyDown={handleKeyDown}
+ onHeightChange={() => scrollToBottom()}
placeholder="Type a message..."
- style={{ marginBottom: "10px", width: "100%" }}
+ maxRows={10}
+ style={{
+ width: "100%",
+ boxSizing: "border-box",
+ backgroundColor: "var(--vscode-input-background, #3c3c3c)",
+ color: "var(--vscode-input-foreground, #cccccc)",
+ border: "1px solid var(--vscode-input-border, #3c3c3c)",
+ borderRadius: "2px",
+ fontFamily:
+ "var(--vscode-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif)",
+ fontSize: "var(--vscode-editor-font-size, 13px)",
+ lineHeight: "var(--vscode-editor-line-height, 1.5)",
+ resize: "none",
+ overflow: "hidden",
+ paddingTop: "8px",
+ paddingBottom: "8px",
+ paddingLeft: "8px",
+ paddingRight: "40px", // Make room for button
+ }}
/>
- Send
-
-
-
-
+ {textAreaHeight && (
+
+
+
-
-
-
-
-
-
-
-
-
- Send
+
+ )}
)
diff --git a/webview-ui/src/components/ResizingTextArea.tsx b/webview-ui/src/components/ResizingTextArea.tsx
deleted file mode 100644
index 183d3b7..0000000
--- a/webview-ui/src/components/ResizingTextArea.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import React, { TextareaHTMLAttributes, CSSProperties, useRef, useEffect } from "react"
-
-interface ResizingTextAreaProps extends Omit
, "onChange"> {
- onChange: (value: string) => void
-}
-
-const ResizingTextArea= ({ style, value, onChange, ...props }: ResizingTextAreaProps) => {
- const textAreaRef = useRef(null)
-
- const textareaStyle: CSSProperties = {
- width: "100%",
- minHeight: "60px",
- backgroundColor: "var(--vscode-input-background, #3c3c3c)",
- color: "var(--vscode-input-foreground, #cccccc)",
- border: "1px solid var(--vscode-input-border, #3c3c3c)",
- borderRadius: "2px",
- padding: "4px 8px",
- outline: "none",
- fontFamily: "var(--vscode-editor-font-family)",
- fontSize: "var(--vscode-editor-font-size, 13px)",
- lineHeight: "var(--vscode-editor-line-height, 1.5)",
- resize: "none",
- overflow: "hidden",
- ...style,
- }
-
- const adjustTextAreaHeight = () => {
- if (textAreaRef.current) {
- textAreaRef.current.style.height = "auto"
- textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight}px`
- }
- }
-
- const handleInputChange = (event: React.ChangeEvent) => {
- onChange(event.target.value)
- adjustTextAreaHeight()
- }
-
- useEffect(() => {
- adjustTextAreaHeight()
- }, [value])
-
- return
-}
-
-export default ResizingTextArea
diff --git a/webview-ui/src/components/SettingsView.tsx b/webview-ui/src/components/SettingsView.tsx
new file mode 100644
index 0000000..16fc79c
--- /dev/null
+++ b/webview-ui/src/components/SettingsView.tsx
@@ -0,0 +1,78 @@
+import React from "react"
+import { VSCodeTextField, VSCodeDivider, VSCodeLink, VSCodeButton } from "@vscode/webview-ui-toolkit/react"
+
+const SettingsView = () => {
+ const handleDoneClick = () => {
+ // Add your logic here for what should happen when the Done button is clicked
+ console.log("Done button clicked")
+ }
+
+ return (
+
+
+
Settings
+ Done
+
+
+
+
+ Anthropic API Key
+
+
+ This key is not shared with anyone and only used to make API requests from the extension.
+
+ You can get an API key by signing up here.
+
+
+
+
+
+
+ Maximum # Requests Per Task
+
+
+ If Claude Dev reaches this limit, it will pause and ask for your permission before making additional
+ requests.
+
+
+
+
+
+
+
Made possible by the latest breakthroughs in Claude 3.5 Sonnet's agentic coding capabilities.
+
+ This project was submitted to Anthropic's "Build with Claude June 2024 contest".
+
+ github.com/saoudrizwan/claude-dev
+
+
+
+
+ )
+}
+
+export default SettingsView
diff --git a/webview-ui/src/index.css b/webview-ui/src/index.css
index 53c6ba7..4140aac 100644
--- a/webview-ui/src/index.css
+++ b/webview-ui/src/index.css
@@ -1,4 +1,4 @@
-body {
+/* body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
"Droid Sans", "Helvetica Neue", sans-serif;
@@ -8,4 +8,10 @@ body {
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
+} */
+body {
+ margin: 0;
}
+textarea:focus {
+ outline: 1.5px solid var(--vscode-focusBorder, #007fd4);
+}
\ No newline at end of file