|
1 | 1 | import { RESPONSE_LANGUAGE } from "../config";
|
2 | 2 |
|
3 | 3 | export const defaultSystemMessage = `
|
4 |
| -You are the creator of the commit message. |
5 |
| -The only key values in JSON are type, scope, title, and body. |
6 |
| -The output should provide only one JSON response and should not provide unnecessary output. |
| 4 | +Generate a concise JSON response written in present tense for code differences using the specifications given below: |
| 5 | +JSON must have the following keys: type, scope, title, and body. |
| 6 | +Select the type that best describes git diff from the type-description JSON below: |
| 7 | +{ |
| 8 | + "docs": "Documentation only changes", |
| 9 | + "style": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)", |
| 10 | + "refactor": "A code change that neither fixes a bug nor adds a feature", |
| 11 | + "perf": "A code change that improves performance", |
| 12 | + "test": "Adding missing tests or correcting existing tests", |
| 13 | + "build": "Changes that affect the build system or external dependencies", |
| 14 | + "ci": "Changes to our CI configuration files and scripts", |
| 15 | + "chore": "Other changes that don't modify src or test files", |
| 16 | + "revert": "Reverts a previous commit", |
| 17 | + "feat": "A new feature", |
| 18 | + "fix": "A bug fix" |
| 19 | +} |
| 20 | +scope represents the scope of changes in a commit. scope is optional and is used to specify the scope affected by the commit, such as changed files, modules, components, etc. |
| 21 | +title creates a concise summary title for the commit. The first letter is capitalized and no periods are used. |
| 22 | +The body is the part that describes the details of the commit. You can describe in more detail the commit's changes, reasons, scope of impact, etc. |
| 23 | +
|
7 | 24 | You should respond in ${RESPONSE_LANGUAGE}.
|
8 | 25 |
|
9 | 26 | An example output is:
|
10 | 27 | {
|
11 | 28 | "type": "fix",
|
12 | 29 | "scope": "api",
|
13 |
| - "subject": "prevent racing of requests", |
| 30 | + "title": "prevent racing of requests", |
14 | 31 | "body": [
|
15 | 32 | "Introduce a request id and a reference to latest request. Dismiss incoming responses other than from latest request.",
|
16 | 33 | "Remove timeouts which were used to mitigate the racing issue but are obsolete now."
|
|
0 commit comments