Inline Completions#

Inline completions provide passive code suggestions as you type, using the same local model configured for the agent. Suggestions appear at the caret position and can be accepted or dismissed without leaving the keyboard.

Disabled by default. Enable at Settings → Llamatik Code → Autonomous Local Development → Enable inline completions.


How it works#

  1. You type in the editor and pause.
  2. After a configurable debounce delay (default 600 ms), the plugin collects the text before and after the caret (prefix and suffix).
  3. A fill-in-the-middle (FIM) prompt is sent to the local model.
  4. The model’s completion is inserted as an inline hint at the caret.
  5. Press Tab to accept, or keep typing to dismiss.

The request is cancelled automatically if you type again before the model responds — stale completions are never shown.


Privacy#

Completions are generated by the same local model used for the agent. No text is sent to any remote server. The context window for completions is intentionally small (default 1200 chars) to keep latency low.


Settings#

Settings live at Settings → Llamatik Code → Autonomous Local Development → Inline Completions.

SettingDescriptionDefault
Enable inline completionsMaster toggleoff
Debounce delay (ms)Idle time before a request is sent600 ms
Max context charsCharacters of prefix + suffix sent to the model1200
Max completion tokensMaximum tokens in the generated completion64
ProfileDebounceMax contextMax tokens
Low-end (< 8 GB RAM)1000 ms80032
Mid-range (8–16 GB)600 ms120064
High-end (> 16 GB / GPU)300 ms2000128

Supported models#

FIM completions work best with models that support the <fim_prefix> / <fim_suffix> / <fim_middle> token format, such as:

  • Qwen2.5 Coder series
  • DeepSeek Coder series
  • CodeLlama (FIM variant)
  • StarCoder2

For models that do not support FIM, the plugin falls back to a plain prefix-only prompt. Completions still work but may be less accurate for mid-line insertions.


Performance notes#

  • Completions are generated on the same thread pool as the agent. Running a long agent task while inline completions are enabled may increase completion latency.
  • If idle model unloading is enabled, the first completion after an idle period will be slower while the model reloads.
  • Completions are limited to the current file only. Cross-file context is not included in the completion prompt.