Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
AI Builder
Module 3Full course10 min read

Inline AI Writing Assistance

Autocomplete, suggested edits, and "improve this" actions inside your editor UI — with diffs the user can accept or reject piece by piece.

The most-used AI features often don't look like AI features at all. There's no chat box, just gray ghost text that finishes your sentence, an "Improve" button that appears when you select a paragraph, or a few underlined suggestions in a draft you can accept with a click. When they work, users stop noticing them. When they don't, they're the most irritating thing on the screen: slow, wrong, and in the way of typing.

In this lesson you'll build all three patterns into Deskmate's reply editor: autocomplete that's fast and cancellable, selection actions that rewrite only what was selected, and suggested edits returned as discrete changes a user can accept or reject one at a time. The model calls are the easy part. The interesting work is latency, cancellation, and keeping every change under the user's control.

Three patterns, three different budgets

Inline assistance comes in three shapes, and each one has its own latency budget, model choice, and failure mode. Treating them as one feature is how teams end up with an autocomplete that takes four seconds or an editing pass that rewrites the whole document.

PatternTriggered byLatency budgetOutputUser accepts with
Autocomplete (ghost text)A pause in typingMust arrive before the user types the next few charactersA few words to a sentenceTab
Selection action ("Improve", "Shorten")An explicit clickA couple of seconds, with a visible previewA replacement for the selectionAccept / Discard
Suggested edits (review pass)An explicit click, or on saveSeveral seconds is fineA list of discrete editsAccept or reject each

The pattern tells you the trade-off. Autocomplete is speculative: the user didn't ask for it, most suggestions will be ignored, and a slow one is worse than none. So it gets the smallest model, the lowest effort, and short outputs. Suggested edits are requested deliberately, so they can afford a stronger model and more thinking. Selection actions sit in between.