cline:developer process - chunhualiao/public-docs GitHub Wiki

cline

The Process to Prototype a Modified Version of Cline Locally

Setup Development Environment

# Clone the repository
git clone https://github.com/cline/cline
cd cline

# Install dependencies
npm install

Development Workflow

# Start development mode with hot reload
npm run watch

In VS Code:

  1. Press F5 to launch the Extension Development Host
  2. Select "Run Extension" from the debug menu

Making Modifications

Key directories to modify based on your needs:

  • /src/core/ – Core extension logic
  • /src/api/ – API integrations
  • /src/services/ – Various services including search
  • /src/integrations/ – VS Code integrations

For Adding RAG Support, You Would:

Add Dependencies

// package.json
{
  "dependencies": {
    "hnswlib-node": "^1.4.2",  // Vector database
    "@xenova/transformers": "^2.6.1"  // For embeddings
    // ... other existing dependencies
  }
}

Create RAG Components

// src/services/rag/index.ts
// Add vector store and embedding generation

Integrate with Search

// src/services/search/index.ts
// Combine with existing search

Testing Your Changes

# Run tests
npm run test

# Build extension
npm run compile

# Package extension
npm run package

Debugging

Use VS Code's built-in debugger to check the extension.