mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-06 05:40:38 +08:00
60 lines
2.1 KiB
Markdown
60 lines
2.1 KiB
Markdown
## Overview
|
|
|
|
The `ask` tool answers questions about the PR, based on the PR code changes. Make sure to be specific and clear in your questions.
|
|
It can be invoked manually by commenting on any PR:
|
|
```
|
|
/ask "..."
|
|
```
|
|
|
|
## Example usage
|
|
|
|
{width=512}
|
|
|
|
{width=512}
|
|
|
|
## Ask lines
|
|
|
|
You can run `/ask` on specific lines of code in the PR from the PR's diff view. The tool will answer questions based on the code changes in the selected lines.
|
|
- Click on the '+' sign next to the line number to select the line.
|
|
- To select multiple lines, click on the '+' sign of the first line and then hold and drag to select the rest of the lines.
|
|
- write `/ask "..."` in the comment box and press `Add single comment` button.
|
|
|
|
{width=512}
|
|
|
|
Note that the tool does not have "memory" of previous questions, and answers each question independently.
|
|
|
|
## Ask on images
|
|
|
|
You can also ask questions about images that appear in the comment, where the entire PR code will be used as context.
|
|
<br>
|
|
The basic syntax is:
|
|
```
|
|
/ask "..."
|
|
|
|
[Image](https://real_link_to_image)
|
|
```
|
|
where `https://real_link_to_image` is the direct link to the image.
|
|
|
|
Note that GitHub has a built-in mechanism of pasting images in comments. However, pasted image does not provide a direct link.
|
|
To get a direct link to an image, we recommend using the following scheme:
|
|
|
|
1\. First, post a comment that contains **only** the image:
|
|
|
|
{width=512}
|
|
|
|
2\. Quote reply to that comment:
|
|
|
|
{width=512}
|
|
|
|
3\. In the screen opened, type the question below the image:
|
|
|
|
{width=512}
|
|
{width=512}
|
|
|
|
4\. Post the comment, and receive the answer:
|
|
|
|
{width=512}
|
|
|
|
|
|
See a full video tutorial [here](https://codium.ai/images/pr_agent/ask_image_video.mov)
|