Skip to main content

Overview

The HAI Build Code Generator provides a rich extension API that allows you to programmatically interact with the AI-powered development assistant. This API is available when the extension is activated and can be accessed from other VS Code extensions.

Getting Started

To use the HAI Build API in your VS Code extension:
import * as vscode from 'vscode';

const haiExtension = vscode.extensions.getExtension('presidio-inc.hai-build-code-generator');
if (haiExtension) {
  const api = await haiExtension.activate();
  // Use the API
}

API Structure

The HAI Build extension API provides access to:

Commands

VS Code commands for triggering extension functionality

Slash Commands

In-chat commands for AI-assisted workflows

Events

Extension events and hooks for integration

Extension Information

Extension ID
string
presidio-inc.hai-build-code-generator
Display Name
string
HAI Build Code Generator
Version
string
3.13.4
Activation Events
string[]
  • onLanguage - Activates on any language file
  • onStartupFinished - Activates when VS Code finishes startup
  • workspaceContains:evals.env - Activates when workspace contains evals.env

Key Features

AI-Powered Development

The extension integrates with multiple LLM providers (Anthropic Claude, OpenAI, Google Gemini, etc.) to provide intelligent code generation, refactoring, and debugging assistance.

Task Management

Manage development tasks with built-in task tracking, history, and state management capabilities.

File Operations

Automated file identification, inline editing, and diff viewing for code changes.

MCP Integration

Model Context Protocol (MCP) support for extending functionality with custom tools and prompts.

Extension Configuration

The extension can be configured through VS Code settings. Configuration is managed through the extension’s settings UI and state management system.
For detailed configuration options, see the Configuration section in the main documentation.

API Exports

The extension exports an API object when activated that provides programmatic access to the core controller and functionality:
interface ClineAPI {
  controller: ClineController;
  // Additional API methods
}

Next Steps

1

Explore Commands

Learn about available VS Code commands in the Commands reference
2

Use Slash Commands

Discover in-chat slash commands in the Slash Commands reference
3

Integrate Events

Hook into extension events in the Events reference

Build docs developers (and LLMs) love