CotabThis is a VS Code extension that provides AI-powered multi-line edit suggestions. It generates multiple lines of code using AI, taking into account not only the cursor position but also the all code context, and displays the merged result with the existing code as an autocomplete suggestion. Feature
Quick start
How to useImportant Notes
PerformanceCotab is optimized for llama-server and Qwen3-4b-2507, designed to operate at high speed. Even with source code exceeding 1000 lines, it understands the entire content and displays completions in about 0.6 seconds on RTX3070, even with prompts exceeding 15,000 tokens including hundreds of reference symbols. For the first time, it analyzes source code to improve accuracy. After that, as long as the cursor position doesn't move significantly, it sends completion requests with each keystroke even if exceeding 10,000 tokens, maintaining that response speed. Detailsllama-serverYou can also use OpenAI compatible APIs, but strongly recommend using llama-server. llama-server has low overhead and operates at the fastest speed among servers using llama.cpp as backend. Code completion requests frequently repeat requests and cancellations, so that overhead directly affects user experience. Prompt Optimizationllama-server has a mechanism enabled by default that caches prompts from previous requests. Prompt cache is effective up to the part that matches the previous prompt, allowing prompt processing to be skipped up to that part. In other words, placing changes from the previous request at the end of the prompt enables fast response. To maximize the use of this mechanism, even when users type characters, the full source code remains unchanged, and instead, the latest source code reflecting the input is appended only to the bottom of the prompt as surrounding code. Edit HistoryRemembers the user's immediate previous edits and utilizes them in suggestions. Edits are categorized into add, delete, edit, rename, and copy to improve prediction accuracy. This makes functions created immediately before more likely to be suggested, more accurately reflecting user intent. Symbols from Other FilesUses symbols obtainable from VSCode's language providers and utilizes them in suggestions. These symbols allow LLM to understand class structures and improve the accuracy of member function suggestions. Privacy and TelemetryAll communication performed by Cotab is strictly limited to requests to the default endpoint
With this policy, you can use Cotab with complete confidence. ContributingHow to buildLicenseMIT License |