> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cubic.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AI chat

> Ask about a pull request or take a guided tour beside the diff.

AI chat answers questions about a pull request while you read it. It reads the PR and the rest of
your codebase. When an answer is about a changed file, it can open that file and highlight the
lines. For the whole picture, ask it to tour the PR one stop at a time.

## Open AI chat

Choose the sidebar button at the top left of the PR page to open AI chat in the left sidebar. To
open AI chat from anywhere on the page, press `Cmd + I` on macOS or `Ctrl + I` on Windows and
Linux.

To ask about a specific change, select code and choose **Add to AI chat**. You can also add a
whole file from the file's **⋯** menu, or choose the **Add to AI chat** button on a review thread.

## Take a guided tour

Ask **"tour this PR"**, or choose **Tour this PR** when it appears among the suggested prompts. AI
chat takes you through the files in review order, one stop at a time. At each stop, it opens the
code, explains its role in the change, and suggests what to verify.

<img src="https://mintcdn.com/cubic-2/lOaRpcHrs43-yDrv/code-review-platform/images/ai-chat-tour.png?fit=max&auto=format&n=lOaRpcHrs43-yDrv&q=85&s=a271f59843dd42cbe95acdb8cde119a6" alt="Stop 5 of 7 in a guided tour: AI chat points out that the checkout handler trusts prices sent by the client, beside the handler's diff" className="border border-zinc-800 rounded-lg" width="2880" height="1800" data-path="code-review-platform/images/ai-chat-tour.png" />

To move on, choose **Next stop** or **End tour** below a tour response. You can also type one of
these commands:

* **Next** to go to the next stop.
* **Back** to return to the previous stop.
* **Skip to** a file or group to jump to that part of the PR.
* **End tour** to finish the tour.

Ask a follow-up question at any stop. The tour stays at that point until you continue.

## Ask about the change

Try questions like these:

* "How does this change affect the existing retry behavior?"
* "Where is this function called elsewhere in the codebase?"
* "What happens if this request fails?"
* "Which tests cover the new validation?"

## Draw a diagram

When a change is easier to see than to read, ask for a diagram. AI chat draws it in the
conversation, where you can open it full screen or download it. Try prompts like these:

* "Draw the checkout data flow in this PR."
* "Show how these services call each other."


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.