Skip to content

Commit

Permalink
docs: update documentation links and optimize prompt
Browse files Browse the repository at this point in the history
- Corrected the link to the model configuration guide in README.md
- Fixed the list item for installation verification in README.md
- Added a note about single commit output in prompt.py
- Incremented the version number in pyproject.toml to 1.5.1

This update ensures that the documentation links are accurate and the prompt instructions are clear, facilitating better user experience and understanding.
  • Loading branch information
Undertone0809 committed Nov 3, 2024
1 parent 50d0b4e commit 4c21cd2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ We recommend you to read the [Quick Start Guide](https://gcop.zeeland.top/) in d
Then gcop will generate a `config.yaml`, then gcop will open the `config.yaml`
file in the default editor, and you can config your language model. See how to
config your model [here](./docs/guide/how-to-config-model.md):
config your model [here](https://gcop.zeeland.top/how-to-config-model.html):

> `config.yaml` store path:
>
> - Windows: `%USERPROFILE%\.gcop\config.yaml`
> - Linux: `~/.gcop/config.yaml`
> - MacOS: `~/.gcop/config.yaml`

4. Verify the installation:
1. Verify the installation:

```
git ghelp
Expand Down
14 changes: 10 additions & 4 deletions gcop/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,17 @@
- Maintain a professional and objective tone, avoiding emotional or unnecessary descriptions.
- Ensure the commit message clearly communicates the purpose and impact of the changes.
- If the diff contains multiple unrelated changes, suggest splitting them into separate commits.
- Your output should only have one commit, do not output multiple commits.
## Examples
<commit_templates>
{commit_template}
</commit_templates>
release generate a conventional commit message based on the provided git diff, following the above guidelines.
## Provided Git Diff
<git_diff>
{diff}
</git_diff>
""" # noqa


Expand Down Expand Up @@ -105,10 +108,13 @@ def get_commit_instrcution(
_ += f"""
This is the original git commit message, which needs improvement. Please consider
the feedback and generate a better git message.
previous_commit_message: {previous_commit_message}
<previous_commit_message>
{previous_commit_message}
</previous_commit_message>
"""

if instruction:
_ += f"\nfeedback: {instruction}"
_ += f"<user_feedback>{instruction}</user_feedback>"

return _
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ requires = ["poetry-core"]

[tool.poetry]
name = "gcop"
version = "1.5.0"
version = "1.5.1"
description = "gcop is your git AI copilot."
readme = "README.md"
authors = ["gcop <[email protected]>"]
Expand Down

0 comments on commit 4c21cd2

Please sign in to comment.