AutoRebase VS Code Extension
A VS Code extension that provides a GUI sidebar for AutoRebase operations, allowing you to easily select folders from data/sample
and perform automated rebasing operations.
Features
- Sidebar GUI: Clean, intuitive interface in the VS Code sidebar
- Folder Selection: Browse and select from available sample folders (base-1.0, base-1.1, feature-5.0, etc.)
- AutoRebase Processing: Execute complete AutoRebase workflows with a single click
- Server Management: Automatic start/stop of the Python FastAPI backend
- Real-time Status: Live updates on processing status and results
- Error Handling: Comprehensive error reporting and user feedback
Installation
Prerequisites:
- VS Code 1.74.0 or higher
- Python 3.11+ with required dependencies
- Node.js 18+ for building the extension
Build the Extension:
cd vscode-extension
npm install
npm run compile
Install in VS Code:
- Open VS Code
- Go to Extensions view (Ctrl+Shift+X)
- Click "..." menu and select "Install from VSIX..."
- Select the generated
.vsix
file
Usage
Open the Extension:
- Open a workspace containing the AutoRebase project
- Look for the "AutoRebase" icon in the Activity Bar (left sidebar)
- Click to open the AutoRebase panel
Configure AutoRebase:
- Enter the repository URLs for base and feature repositories
- Provide the GitHub SHAs for:
- Base Software 0 (original base version)
- Base Software 1 (updated base version)
- Feature Software 0 (feature with customizations)
- Optionally specify a custom working directory
Process AutoRebase:
- Click "Process AutoRebase" to start the operation
- Monitor progress in the status section
- View detailed results when complete
Sample Data:
- The extension automatically detects available sample folders in
data/sample/
- Use these for testing and development
How It Works
The extension integrates with the AutoRebase Python engine through the following process:
- Server Management: Automatically starts the Python FastAPI server (
main.py
)
- API Communication: Sends requests to the
/autorebase/process
endpoint
- Repository Cloning: The backend clones the specified repositories to the given SHAs
- AutoRebase Processing: Executes the complete AutoRebase workflow:
- Extracts feature patches (base-0 → feature-0)
- Extracts base patches (base-0 → base-1)
- Applies patches to create feature-NEW (feature-5.1)
- Generates reports and validation results
Sample Data Structure
The extension works with the following sample folder structure:
data/sample/
├── base-1.0/ # Original base version
├── base-1.1/ # Updated base version
├── feature-5.0/ # Feature with customizations
├── feature-5.1/ # Generated feature (output)
└── requirements_map.yaml
API Endpoints
The extension communicates with these FastAPI endpoints:
POST /autorebase/process
- Main AutoRebase processing
GET /health
- Server health check
GET /autorebase/health
- AutoRebase service health
Development
Building from Source
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes
npm run watch
Testing
- Open the extension in VS Code
- Press F5 to launch a new Extension Development Host window
- Test the extension functionality in the new window
Project Structure
vscode-extension/
├── src/
│ ├── extension.ts # Main extension entry point
│ ├── autorebaseProvider.ts # Webview provider for sidebar
│ └── autorebaseServer.ts # Python server management
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
└── README.md # This file
Troubleshooting
Common Issues
Server Won't Start:
- Ensure Python dependencies are installed:
pip install -r requirements.txt
- Check that
main.py
is in the workspace root
- Verify Python is in your PATH
Extension Not Loading:
- Check VS Code version compatibility (1.74.0+)
- Rebuild the extension:
npm run compile
- Check the Developer Console for errors
AutoRebase Fails:
- Verify repository URLs are correct
- Ensure SHAs exist in the repositories
- Check network connectivity for repository cloning
Debug Mode
Enable debug logging by opening the Developer Console (Help → Toggle Developer Tools) and checking the Console tab for detailed error messages.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
This extension is part of the AutoRebase project and follows the same license terms.