From 4c21cd22cace73bf8c625723d4f0675bbb1a3dd7 Mon Sep 17 00:00:00 2001 From: zeeland Date: Sun, 3 Nov 2024 19:29:20 +0800 Subject: [PATCH] docs: update documentation links and optimize prompt - 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. --- README.md | 4 ++-- gcop/prompt.py | 14 ++++++++++---- pyproject.toml | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fef94fa..c1dae49 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ 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: > @@ -86,7 +86,7 @@ config your model [here](./docs/guide/how-to-config-model.md): > - Linux: `~/.gcop/config.yaml` > - MacOS: `~/.gcop/config.yaml` -4. Verify the installation: +1. Verify the installation: ``` git ghelp diff --git a/gcop/prompt.py b/gcop/prompt.py index 407493a..48a0031 100644 --- a/gcop/prompt.py +++ b/gcop/prompt.py @@ -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_template} + release generate a conventional commit message based on the provided git diff, following the above guidelines. -## Provided Git Diff + {diff} + """ # noqa @@ -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} + """ if instruction: - _ += f"\nfeedback: {instruction}" + _ += f"{instruction}" return _ diff --git a/pyproject.toml b/pyproject.toml index 696d48d..49acc93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "]