From 298c41a100af661c168c103876474e0bfc501bab Mon Sep 17 00:00:00 2001 From: mrT23 Date: Wed, 17 Jan 2024 10:03:48 +0200 Subject: [PATCH] improve usage guide --- docs/IMPROVE.md | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/docs/IMPROVE.md b/docs/IMPROVE.md index 698f88ef..bd94f52d 100644 --- a/docs/IMPROVE.md +++ b/docs/IMPROVE.md @@ -10,21 +10,24 @@ - [A note on code suggestions quality](#a-note-on-code-suggestions-quality) ## Overview -The `improve` tool scans the PR code changes, and automatically generates committable suggestions for improving the PR code. +The `improve` tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is [opened](https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#github-app-automatic-tools), or it can be invoked manually by commenting on any PR: ``` /improve ``` -For example: +The suggestions can appear as a collapsible comment (pr_code_suggestions.summarize=true): + - +Or as a separate commitable comment for each suggestion: ---- --- +Note that a collapsible comment has a significantly smaller PR footprint. + +### Extended mode An extended mode, which does not involve PR Compression and provides more comprehensive suggestions, can be invoked by commenting on any PR: ``` @@ -53,19 +56,6 @@ To edit [configurations](./../pr_agent/settings/configuration.toml#L66) related - `max_number_of_calls`: maximum number of chunks. Default is 5. - `final_clip_factor`: factor to remove suggestions with low confidence. Default is 0.9. -#### Summarize mode -In this mode, instead of presenting committable suggestions, the different suggestions will be combined into a single compact comment, with significantly smaller PR footprint. - -To invoke the summarize mode, use the following command: -``` -/improve --pr_code_suggestions.summarize=true -``` - -For example: - - - -___ ## Usage Tips @@ -87,10 +77,6 @@ Emphasize the following aspects: ``` Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable. -### PR footprint - regular vs summarize mode -The default mode of the `improve` tool provides committable suggestions. This mode as a high PR footprint, since each suggestion is a separate comment you need to resolve. -If you prefer something more compact, use the [`summarize`](#summarize-mode) mode, which combines all the suggestions into a single comment. - ### A note on code suggestions quality - While the current AI for code is getting better and better (GPT-4), it's not flawless. Not all the suggestions will be perfect, and a user should not accept all of them automatically.