Templates

Instantly improve code performance, security, and readability with AI suggestions.

Templates help you improve your code quality instantly with AI-powered analysis. Get automated suggestions for performance optimization, security fixes, style improvements, and code cleanup without leaving your editor. Each template provides actionable feedback and ready-to-use code improvements that you can review and apply with a single click.

Available templates

  1. Performance Check: Optimize code performance and efficiency

  2. Security Check: Identify and fix security vulnerabilities

  3. Style Check: Apply coding style and formatting standards

  4. Improve Readability: Enhance code clarity and organization

  5. Clean Code: Remove debugging and logging statements

Templates menu in Bito Panel

How to use templates

Prerequisites

Select the code you want to analyze in your editor before using any template.

Method 1: Click Templates button

  1. Select code in your editor

  2. Click the Templates button at the bottom of the Bito extension panel

  1. Choose the desired template from the dropdown menu

Quick navigation: Use arrow keys, Tab, or Shift+Tab to navigate the template menu

Method 2: Open context menu

  1. Select code in your editor

  2. Right-click in the editor window

  3. Hover over "Bito AI" in the context menu

  4. Select the desired template from the submenu

Method 3: Using slash / command in Bito chat box

  1. Select code in your editor

  2. Type / at the start of the Bito chat box

  3. Choose the desired template from the dropdown menu

  1. Type some text after the slash / to filter templates by name

Method 4: Command Palette (VS Code)

  1. Select code in your editor

  2. Go to View → Command Palette (or press Ctrl+Shift+P / Cmd+Shift+P)

  3. Type "bito" to see available templates

  4. Select the desired template from the list

Applying code suggestions

When templates provide code improvements, you'll see an Apply button above the suggested code snippet.

  1. Click the Apply button to open the diff view

  1. Review the changes highlighted in the diff:

    • Red lines show code to be removed

    • Green lines show code to be added

  2. Choose your action:

    • Accept - Apply the suggested changes to your code

    • Undo - Reject the changes and keep your original code

Tips

  • Select meaningful code blocks for better analysis results

  • Templates work best with complete functions or logical code segments

  • Review suggested changes before applying them to your codebase

  • Verify that the changes don't break existing functionality

  • Use multiple templates on the same code for comprehensive analysis

  • Use the diff view to understand exactly what changes will be made

Last updated