$ show continuedev/continue
Continue is an open-source AI coding agent that provides chat, autocomplete, edit, and agent capabilities across VS Code, JetBrains IDEs, and a standalone CLI. The architecture centers on a shared TypeScript core (`core/`) that handles LLM interactions, context providers, tool definitions, indexing, and configuration management. This core is consumed by three frontends: a VS Code extension (`extensions/vscode/`), a JetBrains plugin (`extensions/intellij/`), and a CLI (`extensions/cli/`) with a React-based TUI. A separate React GUI (`gui/`) runs as a webview in the IDE extensions. The system supports 50+ LLM providers through a plugin architecture in `core/llm/llms/` and uses a YAML-based configuration system (`packages/config-yaml/`) with a Hub for sharing assistants. Codebase indexing uses a content-addressed Merkle tree approach with a Rust sync library (`sync/`). The repository is now read-only and deprecated as of the final 2.0.0 release, with the team recommending users migrate to the CLI.
The LLM identified 8 files worth highlighting for reuse:
BaseLLM abstract class providing a unified interface for 50+ LLM providers. Handles streaming chat/completion/FIM, token counting, prompt templating, tool calling with overrides, request logging, and exponential backoff. Subclasses only need to implement provider-specific streaming methods. Demonstrates excellent abstraction over diverse APIs (OpenAI, Anthropic, Ollama, Bedrock, etc.) with capability detection (images, reasoning, prefilling).
Central registry of 18+ tool definitions (readFile, writeFile, runTerminalCommand, searchCode, grepSearch, globSearch, viewDiff, multiEdit, etc.) with JSON Schema parameters. Tools are dynamically filtered by model capability and experimental flags. Clean separation of definitions from implementations enables the agent to adapt its toolset per model.
Registry of 25+ context providers (file, codebase, docs, git, terminal, MCP, Jira, GitHub, database, etc.) implementing a common interface. Providers support submenu navigation for hierarchical context (e.g., browsing Jira issues). The BaseContextProvider abstract class enforces consistent getContextItems and loadSubmenuItems contracts.
Coordinates multiple index artifacts (code snippets, full-text search, chunk embeddings) using a content-addressed caching system. Computes file hashes to avoid re-indexing unchanged files across branches. Integrates with LanceDB for vector search and SQLite for metadata. The sync logic is extracted to a Rust library for performance.
Zod-based schema system for YAML configuration with a block composition model. Supports reusable blocks (models, context, rules, prompts, MCP servers) with 'uses' references and 'override' partials. Handles secret resolution with precedence (user > org > assistant > block). Generates JSON Schema for IDE validation.
Core TUI chat hook managing streaming responses, parallel tool execution, permission checking, and conversation compaction. Handles the complex state machine for tool calls with user approval flows, thinking token rendering, and session persistence. Demonstrates sophisticated async flow control in a terminal UI.
Autocomplete prompt construction with Jaccard-similarity snippet ranking, token-budget-aware pruning, and model-specific template selection (Codestral, Mercury, Qwen, etc.). Handles prefix/suffix compilation, static context inclusion, and stop token configuration. The renderPromptWithTokenLimit function intelligently truncates context to fit model limits.
Rust implementation of Merkle tree construction and diffing for codebase indexing. Efficiently computes file-level changes between tree versions to produce compute/delete/add-label/remove-label lists. Uses Blake3 hashing and ignores .gitignore/.continueignore patterns. Exported as a Node.js native module via Neon for use in the TypeScript indexer.