FAQ

Home > FAQs > State invariants

How OpenCues never loses your place or your choices

Inline AI lives or dies on state discipline: if accepting a suggestion moves your cursor or editing one word resets every other, the tool fights you. OpenCues pins four invariants.

  • Your cursor stays put. When a cycled word changes length, the caret is adjusted by rule: text before the word is untouched, text after shifts by the difference, and a caret inside the word snaps to its end. You never hunt for your position after accepting a suggestion.
  • Edits are local. Editing a word clears only that word's state; every other word keeps its alternatives and your selections. No global reset.
  • The system remembers what you chose. Words you've already cycled are excluded from the next analysis pass, so the model can't quietly replace an alternative you settled on, and you don't pay tokens re-asking.
  • Progress survives edits elsewhere. Insert a paragraph above a cycled word and its state relocates with the content. When the same word appears in several new places and the match is ambiguous, the state is dropped rather than guessed.

Multi-word replacements (a _ that became Sundar Pichai) are tracked as one unit throughout: one navigation stop, one cycle target, one revert.

Related: The keyboard model · What is a blank? · GitHub repo