You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(readme): update documentation with screenshots and tables
Added screenshots and demo GIFs to illustrate key features. Reorganised command documentation into tables for better readability. Removed redundant keyboard shortcut sections and consolidated information. Added error handling table with status codes.
- Add screenshots and demo GIFs for visual documentation
- Convert keyboard shortcuts to formatted tables
- Add error handling reference table with status codes
- Update temperature default value and description
- Remove duplicate keyboard shortcut sections
- Improve configuration section with table formatting
Copy file name to clipboardExpand all lines: README.md
+60-55Lines changed: 60 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ Diff Commit is a VSCode extension that helps you generate commit messages follow
4
4
5
5
The generated commit messages are compatible with [googleapis/release-please](https://github.com/googleapis/release-please) and other tools that use conventional commits.
@@ -69,7 +59,7 @@ Install the extension directly from the [Visual Studio Code Marketplace](https:/
69
59
## Typical Workflow
70
60
71
61
1. Stage the changes that you wish to commit as normal
72
-
2. Run the command: "DiffCommit: Generate Commit Message" (<kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>K</kbd> then <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>G</kbd>)
62
+
2. Run the command: "DiffCommit: Generate Commit Message" (<kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>K</kbd> → <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>G</kbd>)
73
63
3. Confirm or edit the generated commit message in the Source Control message input
74
64
4. Click 'Commit' to commit the changes with the generated message
75
65
@@ -81,28 +71,41 @@ DiffCommit commands can be accessed from the Command Palette (<kbd>Cmd</kbd>/<kb
81
71
82
72
This will generate a commit message for staged changes and enter it in the Source Control message input box. You can preview and edit the generated message before committing.
- macOS: <kbd>Cmd</kbd> + <kbd>K</kbd> then <kbd>Cmd</kbd> + <kbd>G</kbd>
87
-
- Windows/Linux: <kbd>Ctrl</kbd> + <kbd>K</kbd> then <kbd>Ctrl</kbd> + <kbd>G</kbd>
80
+

88
81
89
82
### `DiffCommit: Preview Commit Message`
90
83
91
84
This will generate a commit message for staged changes and open it in a new editor window. You can preview and edit the generated message before committing.
- macOS: <kbd>Cmd</kbd> + <kbd>K</kbd> then <kbd>Cmd</kbd> + <kbd>P</kbd>
96
-
- Windows/Linux: <kbd>Ctrl</kbd> + <kbd>K</kbd> then <kbd>Ctrl</kbd> + <kbd>P</kbd>
92
+

97
93
98
94
### `DiffCommit: Update API Key`
99
95
100
-
This will update the Anthropic API key used for API access. Enter your API key when prompted and press <kbd>Enter</kbd> to confirm or <kbd>Esc</kbd> to cancel.
96
+
This will update the Anthropic API key used for API access.
97
+
98
+
1. Enter your API key when prompted
99
+
2. Press <kbd>Enter</kbd> to confirm or <kbd>Esc</kbd> to cancel
100
+
101
+

101
102
102
103
### `DiffCommit: Delete API Key`
103
104
104
105
This will delete the stored API key from your system and prevent DiffCommit from accessing the API in the future.
105
106
107
+

108
+
106
109
## Configuration
107
110
108
111
DiffCommit provides the following settings to customise its behavior.
@@ -111,66 +114,68 @@ DiffCommit provides the following settings to customise its behavior.
111
114
112
115
A list of allowed commit types. If provided, this replaces the default options.
| Array\<string> | A list (array) of any string/s you want available as commit types |[ "feat", "fix", "refactor", "chore", "docs", "style", "test", "perf", "ci" ]|
121
120
122
121
### `diffCommit.customInstructions`
123
122
124
123
Add additional custom instructions to the commit generation prompt. Useful for providing context or specific requirements like 'Use Australian English spelling'.
125
124
126
-
#### customInstructions Default Value
127
-
128
-
""
129
-
130
-
#### customInstructions Options
131
-
132
-
**string** - Free formatted string that you want to included as custom instructions for the AI prompt.
Controls randomness in the response. Lower values (like 0.4) produce more focused and consistent commit messages, while higher values introduce more variety.
161
-
162
-
#### temperature Default Value
147
+
Controls randomness in the response. Lower values (like 0.3) produce more focused and consistent commit messages, while higher values introduce more variety.
163
148
164
-
0.4
149
+
For concise, focused commit messages, I recommend the default value of 0.3. If you want a little more creativity or room for the AI model to interpret the reason for changes, try a larger value.
Diff Commit accommodates error handling to provide clear feedback and assist in troubleshooting. The following are the common warning or error scenarios you might encounter.
|**Git Related**| Git extension not found in VSCode ||
162
+
|| No Git repository found in the current workspace ||
163
+
|| No workspace folder found ||
164
+
|| No staged changes detected ||
165
+
|**API Key Related**| API key is missing or not provided ||
166
+
|| Invalid API key format (should start with sk-ant-api) ||
167
+
|| Failed to access or update secure storage ||
168
+
|**Anthropic API Errors**| Bad Request: Review your prompt and try again | 400 |
169
+
|| Unauthorized: Invalid API key, update your API key and try again | 401 |
170
+
|| Forbidden: Permission denied, update your API key and try again | 403 |
171
+
|| Rate Limited: Too many requests, try again later | 429 |
172
+
|| Server Error: Anthropic API server error | 500 |
173
+
|**Other Errors**| Failed to write commit message to Source Control ||
174
+
|| Failed to open commit message preview ||
175
+
|| No commit message was generated by the API ||
176
+
177
+
If you encounter any of these errors, Diff Commit will display a message with more details. For persistent issues, please check your configuration and if appropriate, raise an issue on [GitHub](https://github.com/tsdevau/diff-commit/issues).
0 commit comments