# rxyshww/continue architecture

> Architecture diagram of the GitHub repository rxyshww/continue, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rxyshww/continue
- Repository: https://github.com/rxyshww/continue

## Overview

##### Main Components and Architecture

The system should be represented as a multi-layered architecture with these key components:

a. IDE Extensions Layer
- VS Code Extension (extensions/vscode)
- JetBrains Extension (extensions/intellij)
- Bidirectional communication with Core Layer

b. Core Layer (core/)
- LLM Integration Module (core/llm)
- Autocomplete Engine (core/autocomplete)
- Context Management (core/context)
- Configuration Handler (core/config)
- Command System (core/commands)
- Indexing System (core/indexing)

c. GUI Layer (gui/)
- React-based UI Components
- State Management (Redux)
- WebView Integration

d. Binary Layer (binary/)
- IPC Communication
- Platform-specific Adapters

##### Key Interactions and Data Flow

- IDE Extension → Core: User inputs, commands, context requests
- Core → LLM Providers: Model requests and responses
- Core → Context Providers: Code context retrieval
- GUI ↔ Core: User interface interactions
- Binary Layer ↔ Core: Inter-process communication

##### External Integrations

Connections to:
- Various LLM Providers (shown in core/llm/llms)
- Source Control Systems
- Documentation Services
- External Tools

##### Specific Implementation Details

Important architectural patterns:
- Protocol-based Communication (core/protocol)
- Plugin Architecture (context providers)
- Event-driven System (core/events)
- Caching Mechanisms (core/indexing)

##### Cross-cutting Concerns

Shared services:
- Authentication (core/control-plane/auth)
- Configuration Management
- Telemetry
- Error Handling

##### Development Tools

Supporting systems:
- Build Pipeline
- Testing Framework
- Documentation Generation

##### The robust communication protocols between components

Remember to maintain a balance between showing the high-level architecture while including enough detail to understand the system's core functionality around AI-assisted coding features (chat, autocomplete, edit, and actions).

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef ide fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef llm fill:#9b59b6,stroke:#8e44ad,color:white
    classDef context fill:#e67e22,stroke:#d35400,color:white
    classDef gui fill:#f1c40f,stroke:#f39c12,color:black
    classDef external fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef binary fill:#e74c3c,stroke:#c0392b,color:white
    classDef tools fill:#1abc9c,stroke:#16a085,color:white

    subgraph IDE["IDE Extensions Layer"]
        VSCode["VS Code Extension"]:::ide
        JetBrains["JetBrains Extension"]:::ide
    end

    subgraph Core["Core Layer"]
        LLM["LLM Integration"]:::llm
        Auto["Autocomplete Engine"]:::core
        Context["Context Management"]:::context
        Config["Configuration Handler"]:::core
        Commands["Command System"]:::core
        Index["Indexing System"]:::core
        Protocol["Protocol Definitions"]:::core
        Auth["Authentication"]:::core
    end

    subgraph GUI["GUI Layer"]
        React["React Components"]:::gui
        Redux["State Management"]:::gui
        WebView["WebView Integration"]:::gui
    end

    subgraph Binary["Binary Layer"]
        IPC["IPC Communication"]:::binary
        Platform["Platform Adapters"]:::binary
    end

    subgraph External["External Services"]
        LLMProviders["LLM Providers"]:::external
        SourceControl["Source Control"]:::external
        Docs["Documentation Services"]:::external
    end

    subgraph Tools["Development Tools"]
        Build["Build Scripts"]:::tools
        Testing["Testing Sandbox"]:::tools
        Documentation["Documentation"]:::tools
    end

    %% Connections
    VSCode & JetBrains <--> IPC
    IPC <--> Core
    Core <--> GUI
    LLM <--> LLMProviders
    Context <--> SourceControl
    Context <--> Docs
    
    %% Click Events
    click VSCode "https://github.com/rxyshww/continue/tree/main/extensions/vscode"
    click JetBrains "https://github.com/rxyshww/continue/tree/main/extensions/intellij"
    click LLM "https://github.com/rxyshww/continue/tree/main/core/llm"
    click Auto "https://github.com/rxyshww/continue/tree/main/core/autocomplete"
    click Context "https://github.com/rxyshww/continue/tree/main/core/context"
    click Config "https://github.com/rxyshww/continue/tree/main/core/config"
    click Commands "https://github.com/rxyshww/continue/tree/main/core/commands"
    click Index "https://github.com/rxyshww/continue/tree/main/core/indexing"
    click Protocol "https://github.com/rxyshww/continue/tree/main/core/protocol"
    click Auth "https://github.com/rxyshww/continue/tree/main/core/control-plane/auth"
    click React "https://github.com/rxyshww/continue/tree/main/gui/src/components"
    click Redux "https://github.com/rxyshww/continue/tree/main/gui/src/redux"
    click WebView "https://github.com/rxyshww/continue/tree/main/gui/src/components/gui"
    click IPC "https://github.com/rxyshww/continue/blob/main/binary/src/IpcMessenger.ts"
    click Platform "https://github.com/rxyshww/continue/tree/main/binary/pkgJson"
    click Build "https://github.com/rxyshww/continue/tree/main/scripts"
    click Testing "https://github.com/rxyshww/continue/tree/main/manual-testing-sandbox"
    click Documentation "https://github.com/rxyshww/continue/tree/main/docs"

    %% Legend
    subgraph Legend
        L1["IDE Extensions"]:::ide
        L2["Core Components"]:::core
        L3["LLM Integration"]:::llm
        L4["Context Providers"]:::context
        L5["GUI Components"]:::gui
        L6["External Services"]:::external
        L7["Binary Layer"]:::binary
        L8["Development Tools"]:::tools
    end
```
