Saoud Rizwan 1 год назад
Родитель
Сommit
520ef5281e

+ 4 - 0
CHANGELOG.md

@@ -4,6 +4,10 @@ All notable changes to the "claude-dev" extension will be documented in this fil
 
 
 <!-- Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. -->
 <!-- Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. -->
 
 
+## [1.5.13]
+
+- New terminal emulator! When Claude runs commands, you can now type directly in the terminal (+ support for Python environments)
+
 ## [1.5.6]
 ## [1.5.6]
 
 
 - You can now edit Claude's changes before accepting! When he edits or creates a file, you can modify his changes directly in the right side of the diff view (+ hover over the 'Revert Block' arrow button in the center to undo `// rest of code here` shenanigans)
 - You can now edit Claude's changes before accepting! When he edits or creates a file, you can modify his changes directly in the right side of the diff view (+ hover over the 'Revert Block' arrow button in the center to undo `// rest of code here` shenanigans)

+ 1 - 1
package.json

@@ -2,7 +2,7 @@
   "name": "claude-dev",
   "name": "claude-dev",
   "displayName": "Claude Dev",
   "displayName": "Claude Dev",
   "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.",
   "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.",
-  "version": "1.5.12",
+  "version": "1.5.13",
   "icon": "icon.png",
   "icon": "icon.png",
   "engines": {
   "engines": {
     "vscode": "^1.84.0"
     "vscode": "^1.84.0"

+ 1 - 3
src/ClaudeDev.ts

@@ -91,9 +91,7 @@ Default Shell: ${defaultShell}${await (async () => {
 			if (pythonEnvPath) {
 			if (pythonEnvPath) {
 				return `\nPython Environment: ${pythonEnvPath}`
 				return `\nPython Environment: ${pythonEnvPath}`
 			}
 			}
-		} catch (error) {
-			console.log("Failed to get python env path", error)
-		}
+		} catch {}
 		return ""
 		return ""
 	})()}
 	})()}
 Home Directory: ${os.homedir()}
 Home Directory: ${os.homedir()}

+ 4 - 16
src/providers/ClaudeDevProvider.ts

@@ -33,7 +33,7 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
 	private disposables: vscode.Disposable[] = []
 	private disposables: vscode.Disposable[] = []
 	private view?: vscode.WebviewView | vscode.WebviewPanel
 	private view?: vscode.WebviewView | vscode.WebviewPanel
 	private claudeDev?: ClaudeDev
 	private claudeDev?: ClaudeDev
-	private latestAnnouncementId = "aug-31-2024-1" // update to some unique identifier when we add a new announcement
+	private latestAnnouncementId = "sep-2-2024" // update to some unique identifier when we add a new announcement
 
 
 	constructor(readonly context: vscode.ExtensionContext, private readonly outputChannel: vscode.OutputChannel) {
 	constructor(readonly context: vscode.ExtensionContext, private readonly outputChannel: vscode.OutputChannel) {
 		this.outputChannel.appendLine("ClaudeDevProvider instantiated")
 		this.outputChannel.appendLine("ClaudeDevProvider instantiated")
@@ -166,14 +166,7 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
 	async initClaudeDevWithTask(task?: string, images?: string[]) {
 	async initClaudeDevWithTask(task?: string, images?: string[]) {
 		await this.clearTask() // ensures that an exising task doesn't exist before starting a new one, although this shouldn't be possible since user must clear task before starting a new one
 		await this.clearTask() // ensures that an exising task doesn't exist before starting a new one, although this shouldn't be possible since user must clear task before starting a new one
 		const { apiConfiguration, customInstructions, alwaysAllowReadOnly } = await this.getState()
 		const { apiConfiguration, customInstructions, alwaysAllowReadOnly } = await this.getState()
-		this.claudeDev = new ClaudeDev(
-			this,
-			apiConfiguration,
-			customInstructions,
-			alwaysAllowReadOnly,
-			task,
-			images
-		)
+		this.claudeDev = new ClaudeDev(this, apiConfiguration, customInstructions, alwaysAllowReadOnly, task, images)
 	}
 	}
 
 
 	async initClaudeDevWithHistoryItem(historyItem: HistoryItem) {
 	async initClaudeDevWithHistoryItem(historyItem: HistoryItem) {
@@ -472,13 +465,8 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
 	}
 	}
 
 
 	async getStateToPostToWebview() {
 	async getStateToPostToWebview() {
-		const {
-			apiConfiguration,
-			lastShownAnnouncementId,
-			customInstructions,
-			alwaysAllowReadOnly,
-			taskHistory,
-		} = await this.getState()
+		const { apiConfiguration, lastShownAnnouncementId, customInstructions, alwaysAllowReadOnly, taskHistory } =
+			await this.getState()
 		return {
 		return {
 			version: this.context.extension?.packageJSON?.version ?? "",
 			version: this.context.extension?.packageJSON?.version ?? "",
 			apiConfiguration,
 			apiConfiguration,

+ 0 - 4
src/utils/get-python-env.ts

@@ -4,14 +4,12 @@ export async function getPythonEnvPath(): Promise<string | undefined> {
 	const pythonExtension = vscode.extensions.getExtension("ms-python.python")
 	const pythonExtension = vscode.extensions.getExtension("ms-python.python")
 
 
 	if (!pythonExtension) {
 	if (!pythonExtension) {
-		console.log("Python extension is not installed.")
 		return undefined
 		return undefined
 	}
 	}
 
 
 	// Ensure the Python extension is activated
 	// Ensure the Python extension is activated
 	if (!pythonExtension.isActive) {
 	if (!pythonExtension.isActive) {
 		// if the python extension is not active, we can assume the project is not a python project
 		// if the python extension is not active, we can assume the project is not a python project
-		console.log("Python extension is not active.")
 		return undefined
 		return undefined
 	}
 	}
 
 
@@ -20,12 +18,10 @@ export async function getPythonEnvPath(): Promise<string | undefined> {
 	// Get the active environment path for the current workspace
 	// Get the active environment path for the current workspace
 	const workspaceFolder = vscode.workspace.workspaceFolders?.[0]
 	const workspaceFolder = vscode.workspace.workspaceFolders?.[0]
 	if (!workspaceFolder) {
 	if (!workspaceFolder) {
-		console.log("No workspace folder is open.")
 		return undefined
 		return undefined
 	}
 	}
 	// Get the active python environment path for the current workspace
 	// Get the active python environment path for the current workspace
 	const pythonEnv = await pythonApi?.environments?.getActiveEnvironmentPath(workspaceFolder.uri)
 	const pythonEnv = await pythonApi?.environments?.getActiveEnvironmentPath(workspaceFolder.uri)
-	console.log("Python environment path:", pythonEnv)
 	if (pythonEnv && pythonEnv.path) {
 	if (pythonEnv && pythonEnv.path) {
 		return pythonEnv.path
 		return pythonEnv.path
 	} else {
 	} else {

+ 4 - 4
webview-ui/src/components/Announcement.tsx

@@ -30,6 +30,10 @@ const Announcement = ({ version, hideAnnouncement, apiConfiguration, vscodeUriSc
 				🎉{"  "}New in v{version}
 				🎉{"  "}New in v{version}
 			</h3>
 			</h3>
 			<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
 			<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
+				<li>
+					New terminal emulator! When Claude runs commands, you can now type directly in the terminal (+
+					support for Python environments)
+				</li>
 				<li>
 				<li>
 					<b>You can now edit Claude's changes before accepting!</b> When he edits or creates a file, you can
 					<b>You can now edit Claude's changes before accepting!</b> When he edits or creates a file, you can
 					modify his changes directly in the right side of the diff view (+ hover over the 'Revert Block'
 					modify his changes directly in the right side of the diff view (+ hover over the 'Revert Block'
@@ -43,10 +47,6 @@ const Announcement = ({ version, hideAnnouncement, apiConfiguration, vscodeUriSc
 					Adds new <code>search_files</code> tool that lets Claude perform regex searches in your project,
 					Adds new <code>search_files</code> tool that lets Claude perform regex searches in your project,
 					making it easy for him to refactor code, address TODOs and FIXMEs, remove dead code, and more!
 					making it easy for him to refactor code, address TODOs and FIXMEs, remove dead code, and more!
 				</li>
 				</li>
-				<li>
-					Adds "Always allow read-only operations" setting to let Claude read files and view directories
-					without needing to approve (<b>off</b> by default).
-				</li>
 			</ul>
 			</ul>
 			<p style={{ margin: "0" }}>
 			<p style={{ margin: "0" }}>
 				Follow me for more updates!{" "}
 				Follow me for more updates!{" "}