Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Auto-RebaseNew to Visual Studio Code? Get it now.
Auto-Rebase

Auto-Rebase

Jerry Xiao

| (0) | Free
VS Code extension for auto-rebase tool with GUI interface
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Auto-Rebase VS Code Extension

A VS Code extension that provides a GUI interface for the auto-rebase tool, which re-targets feature customizations when base software updates.

Features

  • 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

Installation

Prerequisites

  1. Python 3.11+ with the auto-rebase project installed
  2. Node.js 18+ for building the extension
  3. VS Code 1.74+

Build the Extension

  1. Navigate to the extension directory:

    cd vscode-extension
    
  2. Install dependencies:

    npm install
    
  3. Compile TypeScript:

    npm run compile
    
  4. Package the extension (optional):

    npx vsce package
    

Install the Extension

  1. From VSIX file (if packaged):

    • Open VS Code
    • Go to Extensions (Ctrl+Shift+X)
    • Click "..." menu → "Install from VSIX..."
    • Select the generated .vsix file
  2. 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

Usage

Configuration

  1. Open the Auto-Rebase sidebar panel
  2. 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

Running Auto-Rebase

  1. Click "Run Auto-Rebase" button
  2. Monitor progress in the sidebar and output channel
  3. View results in the file tree
  4. Click on files to open the four-way diff viewer

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)

AI Rebase (Future Feature)

The AI Rebase feature requires an OpenAI API key:

  1. Enter your API key when prompted
  2. The key is saved securely in VS Code settings
  3. AI suggestions will appear in the diff viewer

Commands

The extension provides several commands accessible via Command Palette (Ctrl+Shift+P):

  • Auto-Rebase: Run Auto-Rebase - Execute the rebase process
  • Auto-Rebase: Run AI Rebase - Execute AI-assisted rebase
  • Auto-Rebase: Open Diff View - Open four-way diff viewer
  • Auto-Rebase: Select Folder - Browse for folder selection
  • Auto-Rebase: Select File - Browse for file selection
  • Auto-Rebase: Refresh File Tree - Refresh the file tree display

Configuration

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"
  }
}

Development

Project Structure

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

Building

# Watch mode for development
npm run watch

# One-time build
npm run compile

# Package for distribution
npx vsce package

Testing

  1. Press F5 to launch Extension Development Host
  2. Test the extension functionality
  3. Check the output channel for logs

Troubleshooting

Common Issues

  1. Python not found: Ensure Python is in your PATH or configure autorebase.pythonPath
  2. Permission errors: Ensure the extension has access to the configured directories
  3. CLI commands fail: Verify the auto-rebase CLI module is properly installed

Debugging

  1. Open the Output panel
  2. Select "Auto-Rebase" from the dropdown
  3. Check for error messages and logs

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

This extension is part of the auto-rebase project and follows the same license terms.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft