Skip to content

Commit 82bdf05

Browse files
committed
docs(readme): update features and error handling sections
Added real-time progress notifications and improved error handling documentation: - Added new features for progress notifications and SCM integration - Updated usage steps to include progress monitoring - Expanded error handling section with detailed descriptions - Added error resolution guidance for each error type - Reorganised error table with clearer categories and descriptions - Updated command documentation to mention progress notifications
1 parent c051edc commit 82bdf05

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

README.md

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ The generated commit messages are compatible with [googleapis/release-please](ht
3737
- Preview and edit generated commit messages before applying the commit
3838
- Uses markdown formatting for commit messages
3939
- Implements conventional commit format with type, scope, subject, and body
40+
- Real-time progress notifications during commit message generation
41+
- Seamless integration with VSCode's Source Control Management (SCM)
4042

4143
## Requirements
4244

@@ -56,16 +58,20 @@ Install the extension directly from the [Visual Studio Code Marketplace](https:/
5658

5759
1. Stage the changes that you wish to commit as normal
5860
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>)
59-
3. Confirm or edit the generated commit message in the Source Control message input
60-
4. Click 'Commit' to commit the changes with the generated message
61+
3. Monitor progress in the notification area as the extension:
62+
- Retrieves the git diff
63+
- Validates your API key
64+
- Generates the commit message
65+
4. Review the generated message in the Source Control message input
66+
5. Click 'Commit' to commit the changes with the generated message
6167

6268
## Commands
6369

6470
DiffCommit commands can be accessed from the Command Palette (<kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) or using the default keyboard shortcuts.
6571

6672
### `DiffCommit: Generate Commit Message`
6773

68-
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.
74+
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. Progress is shown through notifications as the extension works.
6975

7076
| **Platform** | **Keyboard Shortcut** |
7177
| :----------- | :-------------------------------------------------------------- |
@@ -150,27 +156,27 @@ For concise, focused commit messages, I recommend the default value of 0.3. If y
150156

151157
## Error Handling
152158

153-
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.
154-
155-
| | **Error** | **Status Code** |
156-
| :----------------------- | :--------------------------------------------------------------- | :-------------: |
157-
| **Git Related** | Git extension not found in VSCode | |
158-
| | No Git repository found in the current workspace | |
159-
| | No workspace folder found | |
160-
| | No staged changes detected | |
161-
| **API Key Related** | API key is missing or not provided | |
162-
| | Invalid API key format (should start with sk-ant-api) | |
163-
| | Failed to access or update secure storage | |
164-
| **Anthropic API Errors** | Bad Request: Review your prompt and try again | 400 |
165-
| | Unauthorized: Invalid API key, update your API key and try again | 401 |
166-
| | Forbidden: Permission denied, update your API key and try again | 403 |
167-
| | Rate Limited: Too many requests, try again later | 429 |
168-
| | Server Error: Anthropic API server error | 500 |
169-
| **Other Errors** | Failed to write commit message to Source Control | |
170-
| | Failed to open commit message preview | |
171-
| | No commit message was generated by the API | |
172-
173-
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).
159+
Diff Commit provides clear feedback for various scenarios to help troubleshoot issues. Here are the common messages you might encounter:
160+
161+
| | **Error** | **Description** |
162+
| :----------------------- | :--------------------------------------------------------------- | :------------------------------------------------------------ |
163+
| **Git Related** | Git extension not found in VSCode | VSCode's Git extension is not installed or enabled |
164+
| | No Git repository found in the current workspace | The current workspace is not a Git repository |
165+
| | No workspace folder found | No workspace is open in VSCode |
166+
| | No changes detected | No staged changes found to generate a commit message for |
167+
| **API Key Related** | API key is missing or not provided | No API key has been set |
168+
| | Invalid API key format (should start with sk-ant-api) | The provided API key doesn't match the expected format |
169+
| | Failed to access or update secure storage | Unable to store or retrieve the API key from secure storage |
170+
| **Anthropic API Errors** | Bad Request: Review your prompt and try again | Invalid request to the Anthropic API (400) |
171+
| | Unauthorized: Invalid API key, update your API key and try again | The API key is invalid or expired (401) |
172+
| | Forbidden: Permission denied, update your API key and try again | The API key doesn't have permission for this operation (403) |
173+
| | Rate Limited: Too many requests, try again later | You've exceeded your API rate limit (429) |
174+
| | Server Error: Anthropic API server error | An error occurred on Anthropic's servers (500) |
175+
| **Other Errors** | Failed to write commit message to Source Control | Unable to update the SCM input box with the generated message |
176+
| | Failed to open commit message preview | Unable to open the preview editor |
177+
| | No commit message was generated by the API | The API response didn't contain a valid commit message |
178+
179+
Each error includes specific guidance on how to resolve the issue. For persistent problems, please check your configuration and if appropriate, raise an issue on [GitHub](https://github.com/tsdevau/diff-commit/issues).
174180

175181
## Contributing
176182

0 commit comments

Comments
 (0)