Skip to content

Real-Time Chat Streaming, Dual-Engine Architecture, FIM Completions & Interactive Diff Review

Latest

Choose a tag to compare

@kXborg kXborg released this 18 Oct 09:37
· 2 commits to main since this release

CodeContinue v2.5.0 is a major feature update that enhances the developer experience in Sublime Text 4. This release introduces real-time response streaming in Chat, an intelligent Dual-Engine system that lets you mix local and frontier cloud models, suffix-aware completions with overlap deduplication, an interactive unified diff preview for in-place edits, one-click context menu presets, and an on-the-fly model switcher with a status bar widget.


Key Highlights & What's New

1. Real-Time Streaming in Chat (SSE)

  • Chat responses now stream token-by-token directly into the split Markdown chat view using Server-Sent Events (SSE).
  • Eliminates latency pauses on longer explanations, tests, and reviews.
  • Full streaming support for both OpenAI-compatible endpoints and Anthropic (content_block_delta) with automatic fallback to buffered responses.
  • Configurable via "stream": true (enabled by default).

2. Dual-Engine Architecture

  • Mix and match your LLMs: run a lightning-fast local model (e.g. Qwen 2.5 Coder 1.5B via Ollama/LM Studio) for low-latency inline code completions, while routing code discussions and refactoring to frontier models like Opus 5.5 or Gemini Argon 4.
  • Fine-grained overrides with global fallbacks:
    • chat_endpoint, chat_model, chat_api_key
    • edit_endpoint, edit_model, edit_api_key
  • Displays active model badges directly in chat panel headers.

3. Fill-In-The-Middle (FIM) & Suffix-Aware Completions

  • Autocomplete now inspects context both before and after the cursor using <CURSOR_HERE> positioning.
  • Added intelligent suffix overlap trimming (trim_suffix_overlap): prevents duplicated closing statements or repeated trailing lines when inserting code into the middle of functions.

4. Interactive Diff & Review for "Edit Selection"

  • In-place code editing (code_continue_edit) now features an interactive review flow:
    • ✓ Apply Edit: Replace selected code immediately.
    • 🔍 Preview Diff: Opens a unified diff in a dedicated scratch tab with Diff syntax highlighting before any changes touch your original buffer.
    • ✗ Discard Edit: Cancel without modifying the file.
  • Selection targets are preserved across tab switches and diff inspections.
  • Configurable via "confirm_edits": true (default).

5. 1-Click Context Menu & Palette Presets

Right-click any selected code or use the Command Palette (Ctrl+Shift+P) to trigger curated developer presets:

  • Explain Selection: Breaks down logic, assumptions, edge cases, and time/space complexity.
  • Find Bugs & Vulnerabilities: Identifies logical edge cases, memory leaks, performance bottlenecks, and security flaws.
  • Generate Unit Tests: Generates comprehensive test suites with edge-case coverage.
  • Add Docstrings & Types: Adds clean docstrings and type annotations inline without altering logic.
  • Optimize & Clean Code: Refactors selected code for readability and performance.

6. Status Bar Widget & On-the-Fly Model Switcher

  • Status Bar Widget: Shows active model CodeContinue: [model] and real-time activity (e.g. Suggesting...) in the Sublime Text status bar. Configurable via "status_bar": true.
  • Model Switcher (Ctrl+Shift+P >> CodeContinue: Switch Model...):
    • Dynamically fetches available models from the configured endpoint.
    • Choose between switching Global/Completion, Chat, or Edit models with one click.

7. 🛠️ Fixes & Clean Setup Defaults

  • Keybinding Conflict Resolution: Added on_query_context for code_continue_visible, ensuring custom keybindings (like ctrl+enter) function cleanly without retaining hardcoded tab traps.

⚙️ Configuration Reference

Settings can be edited via Preferences: CodeContinue Settings (Ctrl+Shift+P):

{
    // API endpoint URL (OpenAI-compatible v1 format or Anthropic)
    "endpoint": "http://localhost:8000/v1/chat/completions",
    "model": "qwen2.5-coder:1.5b",
    "api_key": "",

    // Optional Dual-Engine Chat overrides
    "chat_endpoint": "https://api.anthropic.com/v1/messages",
    "chat_model": "claude-3-5-sonnet-20241022",
    "chat_api_key": "sk-ant-...",

    // Optional Dual-Engine Edit overrides
    "edit_endpoint": "https://api.openai.com/v1/chat/completions",
    "edit_model": "gpt-4o",
    "edit_api_key": "sk-...",

    // Real-time chat streaming (SSE)
    "stream": true,

    // Status bar indicator
    "status_bar": true,

    // Confirm edits with interactive diff review
    "confirm_edits": true,

    // Context & Performance
    "max_context_lines": 30,
    "timeout_ms": 30000,
    "trigger_language": ["python", "cpp", "javascript", "typescript", "go", "rust"],
    "debug": false
}