GitHub Copilot uses editor context, open files, comments, and direct questions to generate and explain code.
2
Specific prompts, useful names, relevant files, examples, and iterative feedback produce better results.
3
GitHub Codespaces gives workshop participants a preconfigured cloud development environment with Copilot and the required extensions.
Summary
Christina Warren and her colleagues give a hands-on introduction to GitHub Copilot in Visual Studio Code. They explain how Copilot uses open files, selected code, comments, and chat prompts to generate code, write tests, explain implementations, translate languages, fix bugs, and suggest security improvements. Much of the workshop focuses on prompt quality. Clear intent, meaningful names, relevant context, examples, and iteration help developers get more useful suggestions. The presenters demonstrate completions, inline chat, the chat panel, slash commands, code explanations, fixes, and test generation. They also show how to fork the workshop repository and open it in GitHub Codespaces, where a Dev Container configuration installs the required tools and extensions. The Q&A covers context selection, model speed and quality tradeoffs, custom chat extensions, enterprise knowledge bases, local models, and Copilot Workspace. The speakers are candid that generated code can be wrong and should be reviewed, tested, and refined.
Copilot generates code from the context a developer provides
Christina Warren describes GitHub Copilot as an AI pair programmer that synthesizes code from the developer's context. That context includes open files and tabs, comments, and direct questions in Copilot Chat. The tool can turn a comment such as a request to parse a URL into a function, fill in repetitive boilerplate, suggest alternative implementations, and help create tests. Copilot runs across Visual Studio Code, Visual Studio, JetBrains IDEs, Neovim, the terminal, and selected GitHub.com workflows. Warren says the model receives editor context and returns suggestions, while business and Enterprise users' code is not used to train the model by default.
Specific prompts and relevant context improve the generated result
The presenters repeatedly connect output quality to the information given to Copilot. Open relevant files, select the code being discussed, state the intended purpose, and describe the desired result clearly. Warren contrasts a broad request to find the maximum value in an array with a more detailed request for a JavaScript function that returns the longest string and handles embedded arrays containing strings and numbers. Harold adds that users can attach specific files or symbols, use the @workspace context, and inspect the references Copilot used. The more directly a question points to patterns in the codebase, the more useful the answer is likely to be.
Good code structure and naming give Copilot stronger signals
Warren recommends meaningful function, class, and variable names because Copilot is designed to understand natural language. Single-letter variables and unexplained abbreviations can create ambiguity. She also recommends keeping functions focused and following consistent patterns across the codebase. Harold says selected code can provide explicit context, while relevant files should remain open for the current task. Warren argues that experienced developers often get the most value because they work with these patterns every day and can judge whether a suggestion fits. The tool can help less experienced developers, but it does not remove the need to understand the code being accepted.
Copilot works through several interaction modes with different tradeoffs
Harold separates Copilot's main Visual Studio Code experiences. Ghost-text completions appear while a developer types and are designed to arrive quickly, often as a single line or a multiline function body. Inline chat opens a natural-language input over the code and is better for directly editing or iterating on a specific change. The chat panel supports longer conversations and broader exploration, where the developer can ask Copilot to critique or challenge a proposed solution. Ghost text uses a smaller context focused on neighboring tabs so it can respond quickly. Inline chat can spend more time gathering dependencies, documentation, and other context.
Slash commands turn repeated coding tasks into short actions
The workshop demonstrates slash commands in inline chat and the chat panel. /do adds a documentation comment around a symbol. /explain describes how the active code works. /fix proposes a correction, while /fixTestFailure addresses a failing test. /test generates unit tests for selected code. Harold also mentions /new for bootstrapping a project and a notebook command that needs additional context about the data and desired output. Explanations can use dependencies, symbol definitions, type definitions, and documentation. The presenters recommend starting a new chat for a new subject because the panel uses conversation history and can become anchored to earlier concepts.
Codespaces removes much of the environment setup for the workshop
Participants are asked to fork the workshop repository and create a GitHub Codespace from its Code menu. Warren describes Codespaces as a preconfigured virtual cloud environment. The repository contains a devcontainer.json file that defines dependencies, versions, Visual Studio Code settings, extensions, and a Python 3.11 Docker image. The environment runs Visual Studio Code in a browser and installs GitHub Copilot, Copilot Chat, a code spell checker, and a GitHub-flavored Markdown preview. Participants can also connect the Codespace to a local Visual Studio Code client. Warren recommends keeping the lab instructions open in a separate browser window while working.
Generated code needs review and repeated refinement
The presenters show that developers can cycle through multiple suggestions, accept a whole result, accept a line, or accept a word at a time. Harold recommends accepting only the high-confidence portion of a multiline completion and completing the rest as the intended design becomes clearer. Inline chat allows follow-up instructions, such as asking Copilot to use a library instead of generating an HTML element. Quick Fix can use an error message and inspect the code for likely problems, then present a line-by-line change. The speakers warn that Copilot can hallucinate and advise users to keep iterating rather than accept the first answer automatically.
Copilot balances model quality against response speed
In the Q&A, Harold explains that different Copilot features can use different models because response time matters. He says completions use a small model and a small context window so ghost text can appear quickly. At the time of the workshop, inline chat still used a faster model because a slower model's quality improvement was limited in some languages and users were more likely to abandon the interaction while waiting. The chat panel used a newer model. Harold says model updates can improve some languages while worsening others, and they require prompt changes. The team evaluates changes against code-based internal tests and repositories containing open-source code.
"As with all AIs they can get things wrong, so make sure you keep iterating."47:59
Who should watch
You are deciding whether Copilot can help with everyday coding, testing, explanations, or bug fixes inside your IDE.
You want practical guidance on giving Copilot enough context and writing prompts that describe the intended behavior.
You need a repeatable cloud setup for trying Copilot in a repository without configuring the development environment locally.