> For the complete documentation index, see [llms.txt](https://chainide.gitbook.io/chainide-english-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chainide.gitbook.io/chainide-english-1/chainide-modules/2.9.-ai-code-sage-module.md).

# 2.9. AI - Code Sage Module

{% embed url="<https://www.youtube.com/watch?v=awJ2UqnljQM>" %}

## 1. Using plugins

The plugins will be displayed in the sidebar on the right side for users. Clicking on a plugin will expand its functionality menu.

ChainIDE Code Sage currently supports five functions:

* Commentator: Add comments to the code.
* DeCommentator: Remove comments from the code.
* Advisor: Provide suggestions for code optimization.
* Refactorer: Identify and fix code defects.
* Code Generator: Generate the code you need in a conversational manner.

<figure><img src="/files/yXkzBNHaBPdhkC2Psumh" alt=""><figcaption></figcaption></figure>

## 2. Global Usage

Users can click on the four buttons on the right to quickly perform the corresponding operations on all the code in the currently open file. For example, clicking a button can provide detailed comments for smart contracts.

<figure><img src="/files/dMU0h7Gmfu7R7PEzeAgX" alt=""><figcaption></figcaption></figure>

## 3. Local Operations

Users can also select the code block they want to operate on, right-click to open quick actions, and choose the operation they want to perform.

<figure><img src="/files/L8bSPSSNGgnajmYCgTgN" alt=""><figcaption></figcaption></figure>
