improve_component tool generates code suggestions for a specific code component that changed in the PR. The improve_component tool supports the programming languages: Python, Java, C++, JavaScript, TypeScript, C#.
How to use the improve_component tool
This tool can also be triggered interactively by using the analyze tool.
Manual usage
Comment on the PR: /improve_component component_name The tool will generate code suggestions for the selected component. If no component is stated, it will generate code suggestions for the largest component.
Choosing components
You can set the component name as the name of a specific component in the PR. To get a list of the components that changed in the PR and choose the relevant component interactively, use theanalyze tool.
Configuration options
Configure theimprove_component tool by setting configurations under the pr_improve_component part in your configuration file.
| Possible configurations | Default value | What they do |
|---|---|---|
num_code_suggestions | 4 | Number of code suggestions to provide. |
extra_instructions | none | Optional extra instructions for the tool. For example: “focus on the changes in the file X”, “Ignore changes in …” |
file | none | Lets you specify a relevant file in case there are several components with the same name. |
class_name | none | Lets you specify a relevant class name in case there are several methods with the same name in the same file. |
Example usage

