A VS Code extension that provides a GUI interface for the auto-rebase tool, which re-targets feature customizations when base software updates.
- Sidebar Panel: Custom sidebar view with folder selection interface
- Progress Visualization: Real-time progress indicators during rebasing process
- File Tree Display: Expandable tree showing all project files with status indicators
- Four-Way Diff Viewer: Diamond layout diff viewer showing:
- Base 1.0 (Old Base) - Top
- Base 1.1 (New Base) - Left
- Feature 5.0 (Original Feature) - Right
- Feature 5.1 (Rebased Result) - Bottom
- Configuration Management: Save/load configuration presets
- Export Reports: HTML diff reports and JSON trace files
- Python 3.11+ with the auto-rebase project installed
- Node.js 18+ for building the extension
- VS Code 1.74+
-
Navigate to the extension directory:
cd vscode-extension -
Install dependencies:
npm install
-
Compile TypeScript:
npm run compile
-
Package the extension (optional):
npx vsce package
-
From VSIX file (if packaged):
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Click "..." menu → "Install from VSIX..."
- Select the generated
.vsixfile
-
From source (for development):
- Open VS Code
- Press F5 to launch Extension Development Host
- The extension will be loaded in a new VS Code window
- Open the Auto-Rebase sidebar panel
- Configure the following paths:
- Old Base: Path to the original base software (e.g.,
/data/sample/base-1.0) - New Base: Path to the updated base software (e.g.,
/data/sample/base-1.1) - Feature: Path to the feature to rebase (e.g.,
/data/sample/feature-5.0) - Requirements Map: Path to the requirements mapping file (e.g.,
/data/sample/requirements_map.yaml) - Output Directory: Where to save the rebased results
- Old Base: Path to the original base software (e.g.,
- Click "Run Auto-Rebase" button
- Monitor progress in the sidebar and output channel
- View results in the file tree
- Click on files to open the four-way diff viewer
The diff viewer shows:
- Top: Original base (Base 1.0)
- Left: Updated base (Base 1.1)
- Right: Original feature (Feature 5.0) with requirements mapping
- Bottom: Rebased result (Feature 5.1)
The AI Rebase feature requires an OpenAI API key:
- Enter your API key when prompted
- The key is saved securely in VS Code settings
- AI suggestions will appear in the diff viewer
The extension provides several commands accessible via Command Palette (Ctrl+Shift+P):
Auto-Rebase: Run Auto-Rebase- Execute the rebase processAuto-Rebase: Run AI Rebase- Execute AI-assisted rebaseAuto-Rebase: Open Diff View- Open four-way diff viewerAuto-Rebase: Select Folder- Browse for folder selectionAuto-Rebase: Select File- Browse for file selectionAuto-Rebase: Refresh File Tree- Refresh the file tree display
The extension can be configured via VS Code settings:
{
"autorebase.pythonPath": "python",
"autorebase.openaiApiKey": "",
"autorebase.defaultPaths": {
"oldBase": "/data/sample/base-1.0",
"newBase": "/data/sample/base-1.1",
"feature": "/data/sample/feature-5.0",
"requirementsMap": "/data/sample/requirements_map.yaml"
}
}vscode-extension/
├── src/
│ ├── extension.ts # Main extension entry point
│ ├── providers/
│ │ ├── sidebarProvider.ts # Sidebar tree data provider
│ │ └── diffViewProvider.ts # Diff viewer webview provider
│ ├── commands/
│ │ └── rebaseCommands.ts # Command implementations
│ └── views/
│ └── sidebar.html # Sidebar HTML template
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
└── README.md # This file
# Watch mode for development
npm run watch
# One-time build
npm run compile
# Package for distribution
npx vsce package- Press F5 to launch Extension Development Host
- Test the extension functionality
- Check the output channel for logs
- Python not found: Ensure Python is in your PATH or configure
autorebase.pythonPath - Permission errors: Ensure the extension has access to the configured directories
- CLI commands fail: Verify the auto-rebase CLI module is properly installed
- Open the Output panel
- Select "Auto-Rebase" from the dropdown
- Check for error messages and logs
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This extension is part of the auto-rebase project and follows the same license terms.