Tab Autocomplete (FIM)
Sub-millisecond Fill-In-the-Middle (FIM) code prediction powered by dual-buffer streaming and adaptive debouncing.
Sub-Millisecond Dual-Buffer FIM
Fill-In-the-Middle (FIM) code autocomplete requires ultra-low latency inference to feel instantaneous. Kernax replaces generic autocomplete pipelines with a specialized Dual-Buffer Streaming Core.
As you type, Kernax buffers two complementary streams:
- Prefix Buffer: The lines immediately preceding your active caret, enriched with AST scope headers (class declarations, enclosing function signatures).
- Suffix Buffer: The lines immediately following your cursor, ensuring that closed braces, return types, and upcoming expressions are taken into account.
These dual streams are routed through ultra-fast speculative inference engines running on high-throughput GPU clusters, delivering completions in under 30 milliseconds.
Debounce & Trigger Latency
To prevent battery drain and excessive GPU roundtrips during rapid typing bursts, Kernax uses an adaptive debounce algorithm. You can customize the trigger sensitivity in your settings:
{
// Milliseconds to wait after last keystroke before issuing FIM prediction
"kernax.fim.debounceMs": 35,
// Automatically suppress suggestions inside comments and strings
"kernax.fim.suppressInComments": false,
// Maximum tokens to generate per autocomplete suggestion
"kernax.fim.maxCompletionTokens": 64
}
Cross-File Next-Edit Prediction
When you edit an interface signature in one file (e.g. types.ts), the next thing you need to update is usually the implementing class in another file (e.g. service.ts).
Kernax projects next-edits across files using our local Tree-sitter call graph. When you switch tabs to the consuming file, Kernax immediately primes the ghost text suggestion anticipating your change before you even press a key.
Keyboard Acceptance Controls
| Action | Windows / Linux | macOS |
|---|---|---|
| Accept Entire Suggestion | Tab | Tab |
| Accept Word-by-Word | Ctrl+RightArrow | Cmd+RightArrow |
| Dismiss Suggestion | Esc | Esc |
| Cycle Alternative Suggestions | Alt+] / Alt+[ | Option+] / Option+[ |