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
feat(gitcommit): add auto-generate commit message option for gitcommit buffer
- introduce `auto_generate` and `auto_generate_delay` options to buffer config
- automatically generate commit message on entering gitcommit buffer if enabled
- update README with new configuration and workflow details
- update type definitions for new buffer options
When enabled, adds `/gitcommit` slash command to CodeCompanion chat buffers.
234
250
235
251
#### `adapter` (string, optional)
252
+
236
253
The LLM adapter to use for generating commit messages. If not specified, defaults to the adapter configured for CodeCompanion's chat strategy.
237
254
238
255
#### `model` (string, optional)
256
+
239
257
The specific model to use with the adapter. If not specified, defaults to the model configured for CodeCompanion's chat strategy.
240
258
241
259
#### `languages` (table, optional)
260
+
242
261
A list of languages that can be used for generating commit messages. When specified, the extension will prompt you to select a language before generating the commit message. If not provided or empty, commit messages will be generated in English by default.
A list of file patterns to exclude from git diff analysis when generating commit messages. Supports glob patterns using `*` and `?` wildcards. This is useful for excluding generated files, minified files, or large files that don't need AI analysis.
252
272
253
273
Examples:
254
274
255
275
```lua
256
-
exclude_files= {
276
+
exclude_files= {
257
277
"*.pb.go", -- Protocol buffer generated files
258
278
"*.min.js", -- Minified JavaScript files
259
279
"package-lock.json", -- NPM lock file
@@ -265,11 +285,21 @@ exclude_files = {
265
285
```
266
286
267
287
#### `buffer.enabled` (boolean, default: `true`)
288
+
268
289
Controls whether gitcommit buffer keymap integration is enabled.
When `true`, automatically generates a commit message upon entering a `gitcommit` buffer, but only if the buffer does not already contain a message (to avoid overwriting during an amend).
The delay in milliseconds before the automatic generation is triggered. This helps prevent race conditions with other plugins (like `neogit`) that manage UI elements. You can increase this value if you still experience issues.
302
+
273
303
## Contributing
274
304
275
-
Feel free to submit issues and enhancement requests!
305
+
Feel free to submit issues and enhancement requests!
0 commit comments