Quick Actions (experimental, VS Code only)
Quick Actions streamline your development workflow by providing a tool to quickly select an entire class or function to perform a quick edit on. Configure custom actions to execute complex operations with a single click.
How It Worksβ
For the language of the file you have open, you must have the Language Server Protocol extension installed.
Quick Actions use a CodeLens provider to add interactive elements above functions and classes in your code.
By default, Quick Actions include a single predefined action:
Continue
: This action allows you to perform a quick edit on the selected class or function.
How to disable Quick Actionsβ
Quick Actions are enabled by default for pre-release versions of Contine.
To disable Quick Actions, open the settings menu (β + ,
), search for "continue.enableQuickActions"
, and toggle the checkbox to disable.
Custom Quick Actionsβ
Custom Quick Actions allow you to tailor functionality to your specific needs, extending beyond the default actions. You can easily configure these custom actions in your ~/.continue/config.json
file.
Example Use Casesβ
1. Write an inline unit testβ
A quick action that generates and inserts a unit test above the selected code.
"experimental": {
"quickActions": [
{
"title": "Unit test",
"prompt": "Write a unit test for this code. Do not change anything about the code itself.",
}
]
}
2. Send code to chat panel to learn more about itβ
The default "Explain" aims to provide a brief overview of the code. This quick action sends the prompt and the code to the chat to provides a more detailed explanation.
"experimental": {
"quickActions": [
{
"title": "Detailed explanation",
"prompt": "Explain the following code in detail, including all methods and properties.",
"sendToChat": true
}
]
}
3. Create a Typescript interfaceβ
A quick action that generates and inserts a Typescript interface above the selected code.
"experimental": {
"quickActions": [
{
"title": "Create Interface",
"prompt": "Create a new Typescript interface for the following code.",
}
]
}