Skip to content

About

Win inline text autocompletion

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoFiller

A Windows background utility that provides system-wide inline text autocompletion. It tracks what you type in any application, asks an LLM for a continuation, and shows the suggestion in a floating window near the caret. Press Tab to accept the next chunk, Esc to dismiss.

Features

  • System-wide capture — low-level keyboard/mouse hooks plus UI Automation events track the text of the focused editable control in any app.
  • Two-tier input tracking — UIAInput reads real text from UIA Text/Value patterns when available and falls back to HeuristicsInput (keystroke reconstruction) otherwise. Password fields and non-editable elements are ignored.
  • Debounced LLM requests — a background worker (SuggestionsScheduler) waits for a typing idle gap (~300 ms) and only serves the response matching the latest input version, so stale suggestions are dropped.
  • Anchor-based prompting — the request sends the full typed context plus a trailing 3-word anchor; the model must continue the anchor by 2–3 words. The system prompt is embedded as an RC resource (SystemPrompt.txt).
  • Prefix subtraction — PrefixSubtractSuggestionProcessor strips the part of the response that repeats what is already typed (case-insensitive) and splits the remainder into insertion tokens that preserve spacing, so Tab inserts one word at a time.
  • Injected-input awareness — accepted text is sent via SendInput and marked as expected, so the tool does not treat its own output as user typing.
  • Offline mode — run with the DISABLE_LLM argument to use a stub LLM service.

Tech Stack

  • C++20, MSVC v143, x64, Unicode, Visual Studio solution (AutoFiller.sln)
  • Win32 API: SetWindowsHookEx (WH_KEYBOARD_LL / WH_MOUSE_LL), SetWinEventHook, SendInput, layered window for the suggestion popup
  • UI Automation (uiautomation.h, WRL ComPtr) for focused-element text and change events
  • WinHTTP for HTTPS calls to the OpenAI Responses API (/v1/responses)
  • nlohmann/json (NuGet) for request payload building
  • GoogleTest (NuGet) for unit tests

Projects

Project Type Contents
AutoFiller Console app Entry point, hooks, buffer, input routing, LLM client, scheduler, suggestion window
AutoFiller.Core Static library Platform-independent suggestion post-processing (SuggestionProcessingProvider)
AutoFillerTests Test app GoogleTest suite for suggestion processing

Build & Run

# Restore NuGet packages and build from Visual Studio, or:
msbuild AutoFiller.sln /p:Configuration=Debug /p:Platform=x64

# Configure the model access
$env:OPENAI_API_KEY = "sk-..."
$env:OPENAI_MODEL   = "gpt-5.4-nano"   # optional

x64\Debug\AutoFiller.exe
# or without any LLM calls:
x64\Debug\AutoFiller.exe DISABLE_LLM

The app runs in a console window and logs buffer state, LLM requests/responses and errors to stdout. Close the console or press Ctrl+C to stop.

About

Win inline text autocompletion

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages