Sign up and get 15% off every plan.

Sign up
AI Product Design
Get full access
All case studies

Case study · GitHub Copilot · GitHub

Suggestions you can take in pieces

Copilot writes its guess into the file as grey text after the cursor, and the developer decides with one key how much of it to keep.

The problem

A coding assistant that answers in a pop-up or a chat window pulls the developer away from the line they are writing. A suggestion can also be half right, and an all-or-nothing choice throws away the useful half. The design had to put help on the line being written and make saying no cost almost nothing.

A suggestion written in placeTap the parts
Code editor

cart.js

function addGst(price) {

The grey text stays a draft until the developer presses Tab. Esc clears it.

The design decisions

  1. Show the guess where the code will go

    Suggestions appear as grey text right after the cursor, inside the file. Tab accepts one and Esc dismisses it. The grey keeps the guess apart from code the developer typed, and reading it takes a glance instead of a trip to another window.

  2. Let people keep part of it

    Ctrl+→ (Cmd+→ on a Mac) accepts only the next word, and developers can set their own key to accept one line at a time. When a guess starts well and goes wrong halfway, they keep the good start and type the rest instead of deleting everything.

  3. Keep other options one key away

    If the first guess is wrong, a shortcut or the arrows that appear on hover flip through other suggestions, and Ctrl+Enter opens a tab with several side by side. Alternatives stay out of sight until someone asks, so the editor shows one suggestion at a time and stays calm while people type.

  4. Treat each Tab and Esc as feedback

    Because accepting and dismissing are single keys, every suggestion ends in a clear yes or no that can be counted. Among Copilot users surveyed, the share of shown suggestions they accepted predicted how productive they felt better than measures of how long the code stayed in the file. That lets the team judge whether suggestions help without asking developers to fill in a form.

What to take from it

  1. Put the AI's guess where the work happens, so reading it costs one glance.
  2. Make accepting and dismissing one key each, and let people take part of a suggestion.
  3. Count what people accept and dismiss, because those choices show whether the feature helps.
Go and look

Install VS Code, sign in to GitHub Copilot Free (it costs nothing with a GitHub account), and write one small function, such as one that adds 18 percent GST to a price. Count how often you press Tab, Esc and Ctrl+→ (Cmd+→ on a Mac), and notice which suggestions you only half wanted.

The lessons it belongs to