AI Engineer World's Fair 2024
GitHub Copilot - The World’s Most Widely Adopted AI Developer Tool (Repeat)
Loading slides…
Read the talk
GitHub Copilot - The World’s Most Widely Adopted AI Developer Tool (Repeat)
A hands-on path through Copilot in VS Code, from supplying useful context and reviewing JavaScript suggestions to understanding model latency, extensions, and multistep development.
From a talk by Dave Burnison, Alex Malebranche, Dimitrios Philliou, Christina Warren and Harald Kirschner
Before you start: Basic JavaScript and familiarity with an editor are helpful; following the labs also requires a GitHub account and Copilot access.
What does Copilot need to help you write code?
How do you turn a coding assistant into something useful inside your own editor? This workshop starts with a shared repository, a configured development environment, and small coding tasks that make the interaction visible. Christina Warren, a senior developer advocate at GitHub, leads the session with Dave, Alex, and Harald assisting. The sequence moves from an overview through access and setup to hands-on labs and questions.
The repeat workshop was scheduled for June 25, 2024; the product behavior and rollout discussion below belong to that period. Its central resource is the DaveOps30 Copilot hands-on repository. Warren presents a workshop shortlink and QR code, with the materials and slide deck collected in the repository so participants can follow along.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
From editor context to a suggestion
GitHub Copilot entered limited technical preview in June 2021 and general release in 2022. Its basic operation is to synthesize code from supplied context: the current file, other open editor tabs, comments, and direct questions. A comment can request a URL-parsing function; surrounding code can establish a repetitive pattern; a chat request can ask for tests or another implementation. The context is part of the request, even when you have not typed it into a chat box.
The workshop concentrates on VS Code, but Warren also names Visual Studio, JetBrains IDEs, and Neovim. Copilot extends into terminal work and, for Enterprise users, GitHub website workflows such as pull-request assistance and potentially insecure-code fixes. A separate session covers the larger path from an idea to an implementation.
Warren distinguishes using code as inference context from training on it. In her account, editor context goes to an OpenAI GPT model and suggestions return; the underlying model has learned from public source code. She describes completion-data contribution as optional, disabled by default for Business and Enterprise, and configurable for individuals. She also says Business and Enterprise code is not stored by GitHub. Training, processing, and retention are separate questions: the current Copilot FAQ distinguishes IDE prompt retention from other access methods and engagement data, so that broad historical statement should not be read as a present-day retention guarantee across every surface.
The immediate benefit is familiar: developers repeatedly write similar boilerplate with small changes. Starting with the active file and relevant open tabs gives Copilot patterns to follow, leaving the developer to direct the work and decide which suggestions belong in the program.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Make the request—and its context—explicit
Copilot Chat brings conversation into the editor. Select code and ask how to optimize it, request a unit test, translate it into another language, or propose a bug or security fix. Warren describes Chat support across the same editor families, while acknowledging incomplete feature parity in Neovim. The prompting advice follows from these tasks: provide relevant files and examples, state the intended result, and specify the output you do and do not want. A request to create a URL parser is more useful when its purpose and expected behavior are clear.
An audience question exposes the limit of relying on open tabs: a collection of large files cannot simply be assumed to fit into the model’s context. Harald offers three ways to direct what Copilot sees:
| Context mechanism | Useful when | Boundary |
|---|---|---|
| Select code | You know the exact code to discuss | Selection must fit the context window |
| Attach a file | A particular file is relevant | You identify it explicitly |
@workspace | You need relevant material from the project | Retrieval selects material rather than inserting the entire repository |
The attach button had recently shipped. Selected code also works for inline chat. @workspace uses retrieval-augmented generation, or RAG, to find material related to the question; questions that name actual code patterns help that retrieval. Inspect the references in the answer to see what context was used.
Mentioning a method in another file did not reliably cause that file to be included in this version. Harald’s advice is to attach the relevant file yourself. Symbol attachment and better automatic inference were work in progress. Similarly, asking @workspace about a folder or project does not mean its complete contents enter the prompt: the repository is the retrieval scope, not necessarily the resulting context.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Good names and concrete examples reduce ambiguity
The repository’s Discussions collect earlier questions and links about context collection. Within the code itself, descriptive function and class names, spelled-out variables, focused functions, and consistent patterns make intent easier to infer. Generated code follows the patterns it receives. Warren observes that experienced developers often benefit substantially because they already provide this structure in their everyday work.
The next example begins with a broad request: write a JavaScript function that finds the maximum value in an array. The refinement changes the specification substantially: create findMax, return the longest string, handle nested arrays, and accommodate mixed strings and numbers. The useful move is to resolve what “maximum” means, then make representative inputs part of the request.
For example, this JavaScript comment makes the mixed-type and empty-result policies explicit before requesting a completion:
javascript
// Create findMax(values): return the longest string in nested arrays.
// Ignore numbers and other non-string values.
// Keep the first string when lengths tie; return null if none exist.
// Example: [7, ["cat", "elephant"], "horse"] => "elephant"
// Example: [7, [12]] => null
These additional cases settle choices the broad request leaves open. Keep relevant implementation files available, use @workspace when the question needs broader project context, and revise the request when the result misses a requirement. Experimentation includes discarding unsuccessful outputs.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Prepare the workshop environment
Existing personal or company Copilot access is sufficient for the labs. Participants without access were offered a seven-day workshop trial through a repository-linked coupon. The demonstrated activation sequence includes applying the coupon and then activating Copilot; Warren warns that stopping before the final confirmation leaves setup incomplete. The historical coupon is not a promise of current eligibility.
The lab uses GitHub Codespaces to avoid making every participant assemble the same environment locally:
- Fork the workshop repository so you can make your own changes.
- Open the repository’s Code menu and choose Codespaces.
- Select Create Codespace on main.
- Let the remote environment provision and open browser-based VS Code.
A devcontainer.json file describes the container configuration, dependencies, settings, and extensions. Default machine resources suffice for the workshop; larger machines are configurable, and Warren notes included Codespaces usage on GitHub accounts.
During provisioning, VS Code connects to the remote environment while dependencies and extensions install. The configuration shown uses a Python 3.11 container image and includes a code spellchecker, GitHub-style Markdown preview, Copilot, and Copilot Chat. A desktop VS Code connection is another option; Warren notes that some extension setup may need attention there. The repository files then appear in the editor.
Open the hands-on lab document in another browser tab or window and keep it beside the working environment. The selected frame shows the lab instructions and repository setup guide tiled side by side—the arrangement is useful because you can read the next instruction without repeatedly navigating away from the task.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Find the right participant and open a JavaScript file
Check the Copilot icon in the editor’s lower corner: Warren’s environment reports that Copilot is ready and Chat is enabled. Chat participants direct a request toward a particular domain:
| Participant | Workshop use |
|---|---|
@github | Enterprise-oriented GitHub account questions |
@terminal | Shell tasks, including FFmpeg commands |
@vscode | Editor questions and settings |
@workspace | Questions about the open project |
Keep the repository and lab README available alongside the editor; the coupon is only needed for access setup.
Before the first lab, a shortcut question establishes that the multiple-completions panel uses Control+Enter on the demonstrated Mac setup, rather than Command+Enter. Warren then loses the Codespace connection and reloads it. Cloud provisioning removes much local setup work, but the live editor still depends on a working connection.
Create index.js. The editor offers inline prompting with Command+I on macOS; Warren identifies Control+I for Windows. Slash commands package common requests: documentation generation around a symbol, /explain for understanding code, /fix for proposed repairs, a command for fixing test failures, and /tests for unit-test generation. Explanations can still hallucinate. Warren also describes frequent GPT-version updates and Copilot-specific fine-tuning, so an older experience with the product may differ from the one shown here.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Ghost text, inline edits, and conversation
Warren adds a comment to index.js and presses Enter. Copilot proposes pale gray ghost text; pressing Tab accepts the suggestion into the file. The gray text is still a proposal, not already committed source.
Harald separates three interaction modes:
| Mode | Typical use | Developer action |
|---|---|---|
| Completions | Continue code while typing | Wait, cycle, or accept part of a suggestion |
| Inline chat | Generate or edit code in place | Describe the change and review it |
| Panel chat | Explore a solution or critique code | Converse with project context |
Completions are designed to fit into the typing flow. Harald’s airplane-mode anecdote captures how habitual they can become: you wait for a suggestion before remembering there is no connection. Inline chat provides a focused natural-language input over the code, while the panel gives longer discussions room to develop.
Why use inline chat if a comment can request the same function? Harald observes that prompt-driven comments often restate what the next lines should do, instead of explaining why the code exists. Inline chat lets you elaborate and revise the request without leaving that prompting conversation in permanent source comments. The context collection also differs: ghost text emphasizes neighboring tabs and a smaller context window for speed; inline commands have more freedom to gather dependencies, documentation, and other relevant information before answering.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Accept only the part you want
Editor sparkle actions expose operations such as Fix using Copilot and Explain using Copilot. Warren opens an explanation and its references, then returns to completions. Control+Enter opens the alternatives panel on both Mac and Windows in the demonstration. Her generic prompt produces eight different suggestions. That variety makes the ambiguity concrete: the assistant has several plausible interpretations of what she wants. Accepting an alternative would insert its lines, but she declines them and returns to typing and selective acceptance with Tab.
Harald then shows a more granular workflow:
- Hover over ghost text to reveal its widget and three-dot menu.
- Inspect the available alternatives; the demonstrated widget shows a one-of-three indicator.
- Use Accept Word to keep a useful prefix without accepting the entire function body.
- Continue typing or let Copilot propose the remainder again.
- Use Accept Line, optionally with a custom VS Code keybinding, or open the completions panel to compare larger alternatives.
Multiline suggestions offer more room for the model to choose an approach. Partial acceptance lets the developer preserve the useful beginning while continuing to work out the rest.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Generate a URL parser, then inspect the repair
For the inline-chat version, Harald removes the existing code and asks for a URL parser function. This starts from intent rather than a partial function body. Copilot proposes a parser using an HTML anchor element, arriving at an approach he had also obtained through completions. The editor presents the generated change with Accept and Discard controls.
The anchor-element approach uses the browser’s URL parsing behavior. Its core can be expressed in JavaScript like this:
javascript
function parseUrl(value) {
const link = document.createElement("a");
link.href = value;
return {
protocol: link.protocol,
hostname: link.hostname,
port: link.port,
pathname: link.pathname,
search: link.search,
hash: link.hash,
};
}
This version needs a browser document; relative inputs resolve against that document’s base URL. If the intended environment or dependency policy calls for a library instead, the inline follow-up field is where to request that change before accepting. Harald emphasizes iterating on the proposal rather than taking the first result automatically.
After accepting the parser, Harald introduces a mistake and tries to demonstrate a diagnostic-driven quick fix. Diagnostics can come from extensions, including accessibility checks from axe, but this attempt surfaces code-spell warnings instead of the expected error. He switches to the context menu: Modify using Copilot, then fix. The repair request considers error messages and other potential issues; here it proposes a spelling correction involving parses. Toggle Changes expands the compact view into a line-by-line comparison, which he reviews before accepting. The demonstrated success is a small correction, not a test of the parser’s full correctness.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Explain code, reset context, and generate tests
/explain saves repeatedly writing a general explanation request. Harald describes it as gathering current code together with dependencies, symbol definitions, type definitions, and documentation. In the running example, it explains extracting URL components from a link element. Move the answer from the small inline view into panel chat for more space; linked symbols and IntelliSense make code in the answer easier to inspect and navigate.
You can add requirements to the command, although the live request to explain the code as if to a five-year-old does not noticeably simplify the answer. Copilot’s locale override setting can change the response language, and prompts can mix languages—Harald cites German, Spanish, and French. Exact terminology matters when retrieving project concepts with @workspace; looser wording can be useful when the goal is to explore possible solutions.
Start a new conversation when you start a new task. Panel chat incorporates earlier turns, so old concepts can keep influencing an unrelated question. Use the New Chat button or Control+L; previous conversations remain accessible through history. Inline prompt entries can be recalled with up/down navigation, though Harald is unsure about the full inline-history behavior in that version. He says stored history lives in the local VS Code profile rather than being synchronized to GitHub.
/help lists commands, /new can bootstrap a project, and typing slash or hash reveals command and context-variable completions. More specialized commands still need a meaningful request: for notebook generation, supply the dataset and the analysis or output you want. The workshop Discussions include guidance on that workflow. VS Code notebooks offer a path from exploratory analysis toward code that can be shipped.
Test generation exposes the same difference between interaction modes. Inline /tests attempts to detect the project’s testing framework and appropriate destination folder. With ghost text, keep the implementation file open while starting the test file so completions can use that implementation as context. Both can help write tests; the inline path does additional work to infer how those tests should fit the project.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Model quality has to fit the interaction
The model question leads to a product-engineering distinction. Harald says GPT-4 Turbo has rolled out to panel chat and that he has closed its tracking issue. Asking the assistant to identify itself is not a reliable way to verify that routing: he jokes that prompting it to say GPT-5 can produce that answer without changing the model.
Inline chat still uses GPT-3.5 in his account because GPT-4 is too slow for that interaction. Harald reports roughly sub-250-millisecond ghost-text responsiveness for most users or on average, using GPT-3.5 with a very small context window. He does not supply a precise timing boundary or measurement setup. For inline chat, offline evaluations showed only a slight quality lift from GPT-4, limited to some languages; an online experiment then saw users leave when time to first token increased. The team therefore treats latency and quality together, rather than choosing one model for every surface.
Harald’s final routing summary is GPT-4 Turbo for panel chat and GPT-3.5 for inline chat. In the ensuing question, GPT-4o is described as forthcoming. The practical distinction is the time budget of the task: a developer waiting for ghost text has a different tolerance from someone asking an exploratory question in the panel.
Asked about smaller models, Harald confirms the team is testing them and points to the Microsoft Phi Cookbook for a local Phi-3 chat-extension example. He then describes two evaluation layers:
- Per-change regression checks: small code-based suites exercise patterns and past failures, including cases where relevant files were missed.
- Larger offline evaluations:
/fixand documentation tasks run across executable open-source repositories to assess broader behavior.
These are internal evaluations rather than public benchmarks. Harald says they do not achieve perfect pass rates, and a major model update need not produce a dramatic improvement. Some languages improve while others regress; prompts require adjustment, and each candidate model needs its own evaluation.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Extend chat without assuming full model replacement
VS Code extension APIs provide another route for specialized development assistance: add a chat participant or integrate a model into a custom chat experience. Harald names internal developer knowledge and workflows, alongside participants from companies and projects such as Stripe and Postgres. The contemporary GitHub Copilot Extensions are all you need article describes the Chat and Language Model APIs; at the time, these APIs were in Insiders, with Stable availability expected in July.
An audience member asks whether this could replace Copilot’s underlying model for a company that cannot send code to an external provider. Harald says it cannot provide that full replacement in the product being discussed. The Phi-3 example offers a more isolated custom experience, and broader replacement is something the team is investigating. Adding a participant and replacing all built-in Copilot inference are different capabilities.
A separate interface question concerns quick chat. This is a quick-question overlay for situations where opening the panel would consume too much room, especially in a small viewport. Harald frames the choice primarily as a UI preference. The exchange remains active while the overlay is open; he describes closing it or using Control+L to clear the conversation.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Updated knowledge and automatic delegation solve different problems
What happens when a library has changed since the model learned about it? Harald describes Enterprise knowledge bases as a way to import repositories of Markdown documentation, index that material, and reference it in a question on GitHub or through @github in VS Code. A team can curate documentation for several dependencies and update the collection as those projects change. Easier updating and more natural use of that knowledge while coding remain areas of ongoing work in this account.
Participants can also expose context variables: API documentation, the databases a product actually uses, or their schemas. These can be combined with other context. The audience then sharpens the question: could Copilot act as an orchestrator, recognize a Stripe- or Octopus-related question, and delegate it to the appropriate installed participant without the developer explicitly selecting it? Supplying information and routing work to another participant are distinct operations.
Harald describes automatic delegation as an exploration for the following six months, not a demonstrated capability. The motivation comes from user testing: people either fail to discover an extension or enjoy it once and then forget it exists. The proposed behavior would consider installed extensions and current work before invoking a participant.
The workshop’s resource file is updated during the session with the VS Code extensions article, alongside an earlier Microsoft Build extensions post. Dave directs participants back to the DaveOps repository’s resources and Discussions, offers to monitor questions for a few days, and asks for separate feedback on the lab and Copilot itself.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
From a reviewed suggestion to a reviewed plan
The final questions expand the unit of work from a function to a feature. Does Copilot Workspace replace Copilot Chat? Harald describes Workspace as a standalone experience starting from a repository, pull request, or task. It breaks a task into a plan and proposes cross-file changes for more involved features or bug fixes. The developer can correct both the plan and its individual items as the work develops.
The resulting artifact is a diff. Repository actions and a terminal provide ways to run validation and build steps. Harald hopes that sufficiently complicated chat requests will eventually lead naturally into a Workspace-like flow, and describes similar exploration for pull-request review. In the existing chat experience, developers can already request a plan and work through it with Copilot. The plan is another reviewable proposal, with opportunities to redirect the work before accepting the resulting edits.
The last question asks how Enterprise features, especially PR summaries and knowledge bases, fit inside the editor. The presenters describe an existing VS Code PR-summary experience separate from the Enterprise version. Harald explains that enterprise requirements involve managing many repositories and developers, while the editor also needs to support an individual developer’s immediate work. VS Code already offers AI-generated commit messages and simple PR descriptions; he says the GitHub website’s PR descriptions inspect more files and offer deeper grounding for Enterprise needs.
Some capabilities remain Enterprise-only while the team gathers feedback and works through scale requirements, with more functionality moving into the editor as its interaction becomes clearer. The workshop ends with a concrete capability already present in the Codespace: its automatically installed PR extension can manage issues, manage pull requests, and create pull requests. The same environment used to inspect a ghost-text suggestion can therefore carry reviewed changes into the repository workflow.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
From the talk
Codespaces setup instructions, hands-on labs, presentations and additional Copilot resources.
A June 2024 introduction to VS Code's Chat and Language Model APIs and the extension experiences they enable.
Hands-on examples for Microsoft Phi models, including local inference and VS Code chat integrations.
Updates since the talk
- Current Copilot privacy and retention FAQDocumentation
GitHub's current explanation of training, data processing and retention across Copilot plans and access methods.
Full transcript
Loading transcript…