Skip to content

Latest commit

 

History

History
104 lines (76 loc) · 3.22 KB

File metadata and controls

104 lines (76 loc) · 3.22 KB
TTAB Banner

TTAB Completion

Minimal · Inline · Fast

A lightweight AI inline completion assistant for VS Code

License


Features

  • Inline completions that trigger while typing
  • FIM (prefix/suffix) prompts for Qwen and Codestral
  • Lightweight context from clipboard and import definitions
  • Activity Bar sidebar to edit API keys and parameters quickly
  • Output Channel logs requests, responses, and debug info

Vision

This project started because the ecosystem shifted toward Codex- and Claude-based tools, and we lost fast, lightweight inline completion like Cursor. Most existing solutions are heavy extensions and feel slow, so TTAB focuses on a minimal, responsive inline completion experience. If a solid Next Edit model becomes available, it will be integrated.

Install and Run

Local development

  1. Install dependencies: npm install
  2. Build the extension: npm run compile
  3. Press F5 in VS Code to launch the Extension Development Host

Install the packaged VSIX

This repo includes ttab-completion-0.0.1.vsix. In VS Code, run “Extensions: Install from VSIX...”.

Usage

  1. Open the TTAB view in the Activity Bar
  2. Choose a model (qwen3-coder-flash or codestral-latest)
  3. Set the corresponding API key
  4. Start typing to see inline completions

Or configure via Settings JSON:

{
  "ttabCompletion.apiKeys": {
    "qwen": "YOUR_DASHSCOPE_KEY",
    "codestral": "YOUR_CODESTRAL_KEY"
  },
  "ttabCompletion.model": "qwen3-coder-flash",
  "ttabCompletion.maxTokens": 128,
  "ttabCompletion.maxPromptTokens": 1024,
  "ttabCompletion.debounceDelay": 350,
  "ttabCompletion.enabled": true
}

Configuration

  • ttabCompletion.apiKey: legacy API key (mapped to the selected provider)
  • ttabCompletion.apiKeys: per-provider keys (qwen / codestral)
  • ttabCompletion.model: model name (default qwen3-coder-flash)
  • ttabCompletion.maxTokens: max output tokens (100-500)
  • ttabCompletion.maxPromptTokens: max prompt context tokens (128-8192)
  • ttabCompletion.debounceDelay: debounce delay in ms
  • ttabCompletion.enabled: enable/disable completions

How it works

  • Read prefix/suffix from the current file and build a FIM prompt
  • Build a system prompt with clipboard content and import definition snippets
  • Call DashScope (Qwen) or Codestral endpoints to get completions
  • Strip code fences and return inline completion text

Scripts

  • npm run compile: compile TypeScript
  • npm run watch: watch and rebuild
  • npm run package: build the .vsix package

Project structure

  • src/extension.ts: inline completion entrypoint and flow
  • src/prompt.ts: FIM and system prompt builders
  • src/llm.ts: Qwen/Codestral request adapters
  • src/importDefinitions.ts: Tree-sitter import snippets
  • src/sidebar.ts: sidebar configuration UI

References

This project is inspired by Continue: https://github.com/continuedev/continue

License

Apache-2.0