Edit

Share via


Fix code based on Code Optimizations insights using GitHub Copilot (preview)

You can get code-level suggestions and insights based on Code Optimizations recommendations with GitHub Copilot using either:

Note

Using the GitHub Copilot coding agent requires transferring your data to other countries in which Microsoft operates, including the United States. By using this functionality, you agree to the transfer of your data outside your country. Read the Microsoft Privacy Statement.

Prerequisites

Usage

Learn how to use GitHub Copilot to fix your code via the following how-to guides:

Sample questions

Once installed, the Code Optimizations extension introduces an agent called @code_optimizations with a few commands or "skills" that you can use in GitHub Copilot to interface with Code Optimizations issues. For example:

  • Visual Studio

    @code_optimizations /connect <Your Application Insights resource name>
    
  • Visual Studio Code

    @code_optimizations /insights <Your Application Insights AppID>
    
    @azure Any code optimizations for this app?
    
    @code_optimizations /optimize <Your Code Optimizations GitHub Issue Number>
    
    @azure Optimize my code based on GitHub issue number <Your Code Optimizations GitHub Issue Number>
    
    @code_optimizations /optimize
    

Limitations

Some Code Optimization extension features are only available:

Next steps

Learn how to: