# VS Code Extension

The CoderFlow extension lets you preview and apply AI-generated changes directly in VS Code.

- Browse completed tasks with code changes
- Preview diffs side-by-side
- Apply changes to your local repositories
- Work with multi-repository projects

**Note**: Create and manage tasks in the Web UI. The extension is for reviewing and applying completed work.

## Installation

**From VS Code Marketplace:**
Search for "CoderFlow" in Extensions and click Install.

**From VSIX File:**
1. Get the `.vsix` file from your admin
2. In VS Code: Extensions → `...` menu → Install from VSIX

## Connecting to the Server

1. Click the CoderFlow icon in the Activity Bar
2. Click the server icon to open Profile Manager
3. Create a profile with your server URL and credentials
4. Tasks from completed work will appear in the tree view

## Previewing Changes

Click the diff icon next to any file to see changes side-by-side.

## Applying Changes

**Apply all changes from a variant:**
Click the ↓ icon next to the AI agent name (Claude, Codex, etc.)

**Apply a single file:**
Click the ↓ icon next to an individual file.

**When You Have Uncommitted Work:**
If your repository has uncommitted changes, you'll be prompted to:
- **Stash & Continue** - Saves your work, applies patch (recommended)
- **Discard & Continue** - Loses your work, applies patch
- **View Changes** - Opens Source Control to review first

## Multi-Repository Projects

Open all repositories in your VS Code workspace. The extension matches folders by name and applies changes to each repository.

## Troubleshooting

**"Cannot find repository"**
- Ensure the repository folder is open in your workspace
- Folder name must match the repository name on the server

**Connection issues**
- Verify server URL in Profile Manager
- Re-login if your API key expired
