Lecture 13 - Introduction to AI-Assisted Programming
Chatbots are helpful in 2025!
” = ["Chat", "bots", "are", "help", "ful", "in", "2025", "!"]
Source: Tulio (2024).
Tab
or Enter
Ctrl
and the right arrow key to select just the next wordCtrl + I
, a text box will appear into which you can write a promptThere are a few standard commands that are available for prompting Copilot to do something when you have a piece of code selected
You can access these in the Ctrl + I
interface by typing a forward slash, then the name of the command. These are:
/doc
: This will ask Copilot to generate documentation for the selected code. This will suggest changes in the editor
/explain
: This will ask Copilot to explain the selected code. It will do this in the Copilot Chat extension
/fix
will look for problems in the selected code and suggest fixes for them in the editor.
/tests
will ask Copilot to generate tests for the selected code. This will suggest changes in the editor, which may include creating a new file for the tests
You can also find these options by right-clicking a highlighted piece of code, and going into the Copilot menu
/doc
command/tests
to generate tests/tests
on a function or snippet, and Copilot Chat will generate relevant test cases@websearch
to get more specific results@websearch
command that allows you to search the web for informationwebsearch.preferredEngine
, and select Tavily