Skip to content

Smart Actions SOP

Fresh

Context-aware AI actions triggered from selected code — no typing required.

How Smart Actions Work

Select code in your editor and context-specific AI actions appear instantly.

VS Code

  1. Select a block of code
  2. Click the lightbulb icon that appears next to the selection
  3. Choose an action

IntelliJ

  1. Select a line or block of code
  2. Right-click the selection
  3. Choose a smart action from the Gemini submenu

Available Actions

ActionWhat it does
Generate unit testsCreates test cases for the selected code
Explain this codePlain-language explanation of what it does
Add documentationGenerates docstrings/JSDoc/comments
Fix issueApplies quick fix to selected error
Make code more readableRefactors for clarity without changing behavior

Code Transformation Quick Fix

For squiggly error lines — fastest way to fix errors:

VS Code:

  1. Hover over the squiggly error line
  2. Click Quick Fix
  3. Select /fix
  4. Review diff view > Accept

IntelliJ:

  1. Click the red error bulb icon
  2. Select Fix with Gemini
  3. Review and Accept

Best Use Cases

  • Generate unit tests after writing a new function — saves 10-15 minutes per function
  • Explain this code when inheriting unfamiliar code — faster than reading docs
  • Quick Fix for compilation errors — often one-click resolution

Based on official Google Gemini Code Assist documentation.