Dev Agent VS Code Extension
May 21, 2025 ยท View on GitHub
Overview
The Dev Agent VS Code extension provides a chat interface similar to GitHub Copilot Chat, allowing users to interact with a Python-based agent script. The extension can process the current file or uploaded files and execute Python scripts to analyze code.
Features
- Chat Interface: A chat panel in the secondary sidebar, similar to GitHub Copilot Chat
- File Processing: Process the current file or upload files for analysis
- Python Integration: Execute Python scripts to analyze code
- Configurable: Set custom paths for Python and agent scripts
- Clear Chat: Easily clear chat history with a button
- Smart File Selection: Use the current editor file or file selected in the VS Code explorer
- Code Execution: Execute Python code directly from the chat
- @dev-agent Mentions: Support for @dev-agent mentions in code
Usage
- Open the Dev Agent chat panel using the command palette (
Ctrl+Shift+PorCmd+Shift+P) and search for "Dev Agent: Start Chat" - The chat panel will open in the panel area at the bottom of VS Code (similar to GitHub Copilot Chat)
- Type commands in the chat input, such as:
@dev-agent explain this code@dev-agent provide pseudo code@dev-agent summarize this file
- Execute Python code by typing code blocks with
python orpy syntax - Upload files using the upload button in the chat panel
- Process the current file using the "Use Current File" button
- If you have an active editor open, it will use that file
- If no editor is open but you have a file selected in the explorer, it will use that file
- Clear the chat history using the "Clear Chat" button
- Select text in an editor that starts with @dev-agent and use the context menu to process it
Configuration
The extension provides the following configuration options:
dev-agent.pythonPath: Path to the Python executabledev-agent.scriptPath: Path to the agent script (defaults to agent_v2.py)dev-agent.additionalArgs: Additional arguments to pass to the agent script
Agent Scripts
The extension comes with two agent scripts:
-
agent_v2.py (default): A more advanced agent script that supports the following features:
- Code explanation
- Pseudo code generation
- File summarization
- Code execution
- Custom commands
-
agent.py: The original agent script (legacy support)
The agent_v2.py script uses the --input-file argument format and processes JSON input files.
Installation
- Download the
.vsixfile from the releases page - Open VS Code
- Go to the Extensions view (Ctrl+Shift+X)
- Click on the "..." menu in the top-right of the Extensions view
- Select "Install from VSIX..."
- Choose the downloaded
.vsixfile
Development
- Clone the repository
- Run
npm installto install dependencies - Make your changes
- Run
npm run compileto compile the TypeScript code - Run
npm run packageto create a.vsixfile - Install the extension from the
.vsixfile
License
MIT