NEW: Claude Code Security — research preview

Smart Actions

AI actions integrated throughout VS Code: commits, tests, docs, fixes, and more

Read time: 4 min

title: "Smart Actions" description: "AI actions integrated throughout VS Code: commits, tests, docs, fixes, and more" section: "Copilot" readTime: "4 min"

Smart Actions

Smart actions provide AI assistance without writing a prompt — they appear contextually where you need them.

Commit Messages & PR Descriptions

In the Source Control view, click the sparkle icon to generate a commit message based on staged changes. The AI considers:

  • Which files changed
  • Nature of changes (features, fixes, refactoring)
  • Scope and impact

The GitHub Pull Requests extension adds PR title and description generation.

Merge Conflict Resolution (Experimental)

Select the Resolve Merge Conflict with AI button in the editor. An agentic flow analyzes both branches and the merge base to suggest a resolution.

TODO Comment Implementation

With the GitHub Pull Requests extension installed:

  1. Add a TODO comment in code
  2. A code action (lightbulb) appears
  3. Select Delegate to coding agent — the cloud agent implements it and opens a PR

Editor Right-Click Actions

Right-click selected code → Generate Code to access:

ActionWhat it does
ExplainExplains selected code in Chat view
FixSuggests a fix for the selected code
Generate DocsGenerates documentation comments
Generate TestsCreates tests in an existing or new test file
ReviewPosts review comments to the Comments panel

Fix Testing Errors

From Test Explorer: hover a failing test → click the sparkle icon (Fix Test Failure). Or in Chat, use /fixTestFailure.

When using agents, the agent monitors test output automatically and re-runs tests after fixing.

Fix Terminal Errors

When a command fails, a sparkle in the terminal gutter offers a Quick Fix explaining the error and suggesting a resolution.

Rename Symbols

Press F2 on any symbol to get AI-generated name suggestions based on context.

Generate Alt Text (Markdown)

In a Markdown file, place cursor on an image → Code Action → Generate alt text (or Refine alt text to improve existing).

Semantic Search (Preview)

The Search view can find results semantically relevant to your query — even without exact text matches. Enable with search.searchView.semanticSearchBehavior.

Also enable AI keyword suggestions for your search terms: search.searchView.keywordSuggestions.

Don't know the exact setting name? Search in the Settings editor and toggle Search Settings with AI (workbench.settings.showAISearchToggle).