Skip to main content

What is a Quick Command

Quick Commands are predetermined instructions that can be sent to the Large Language Model (LLM) to perform specific actions. It provides fast and efficient ways to contextualize the LLM. They are very user-friendly and can be accessed by simply right-clicking with your mouse.

You can easily create Quick Commands via StackSpot AI Portal and execute them in your IDE or via API. For example, you can create a quick command to:

  • Translate Portuguese to English.
  • Searches for a security breach in the code according to your company's policies and add it to your organization's Workspace.

StackSpot AI Quick Commands

The Quick Command Built In offers five predefined functions to use on your code.

How it works

A Quick Command is a predefined prompt to generate better answers for you. It allows you to select a part of your code and choose one action that suits your needs. This feature is designed to make programming more accessible and efficient.

Image with Quick Command functions

Usage

Follow the instructions to use a Quick Command on your IDE. You will see the answers on your StackSpot AI prompt or inline code.

Option 1: Use the right mouse button click

  1. Select a part of your code and click on the right button of the mouse;

  2. Then select 'StackSpot AI';

  3. Select one of these available options:

  • Add tests for this code
  • Document this code
  • Explain the code to me
  • Is there any code smell in this code?
  • Refactor this code

See an example with the ‘Explain the code to me’:

Gif showing how Quick Command works

The output will be:

An image showing the Quick Command output. It explains the code.

  • You can also choose a Quick Command from:
    • Account
    • All Quick Commands
    • My Quick Commands
    • Shared Quick Commands

Option 2: Use '/' in the StackSpot AI extension on your IDE

  • Type '/' (slash) in the chat box, and you can choose the Quick Command you want from Personal, Account, or Shared.

You can choose the Agent you want as well. See the example below:

A GIF demonstrating the StackSpot AI extension in the IDE. The user clicks the slash (/) in the chat box, revealing Quick Commands categorized as Personal, Account, and Shared. The cursor also selects Agents from the side button.

Learn more