Commit 5411c45
authored
feat(gitcommit): add commit history context for message generation (#9)
* feat(gitcommit): add commit history context for message generation
- introduce `use_commit_history` and `commit_history_count` options to include recent commit messages as context
- update generator to pass commit history to LLM prompt for improved style consistency
- implement `Git.get_commit_history` to retrieve recent commit messages from git log
- update configuration, types, and example config to support and document the new feature
- ensure commit history context is used across buffer, init, and generator modules
* refactor(gitcommit): improve formatting and consistency
- update indentation and spacing across gitcommit extension files
- fix minor comment alignment and trailing comma issues in config example
- standardize function parameter documentation and formatting
* fix(types): correct type declarations for Git and Generator classes
- move generate_commit_message function from Git class to proper Generator class
- add missing get_commit_history function declaration to Git class
- fix indentation and formatting issues in type annotations
* style(types): remove unnecessary blank line in types.lua
- delete extraneous blank line for improved code readability
* docs(guide): migrate documentation to codecompanion.txt
- consolidate EXTENSION_DEVELOPMENT_GUIDE.md, GEMINI.md, tools.md, and prompt_construction_en.md into codecompanion.txt
- update and expand help documentation for plugin features, configuration, extension development, and tool creation
- remove outdated and redundant markdown guides in favor of unified vim help file
* style(gitcommit): improve code comments and docstrings
- update comments and docstrings for clarity and consistency across buffer, generator, git, init, and ui modules
- rephrase and simplify inline comments to enhance readability
- standardize parameter descriptions and function documentation for better maintainability
* docs(gitcommit): document commit history context and API
- add commit history context feature to README and configuration docs
- introduce programmatic API section with usage examples in README and help file
- update documentation structure and configuration options for clarity
* feat(workspace): add structured workspace manifest file
- introduce codecompanion-workspace.json with schema and group definitions
- organize extension components into logical groups for core, git, AI, UI, tools, and docs
- provide metadata and file descriptions to support project tooling and documentation
* docs(guide): document new get_changed_files tool and update tool options
- add documentation for the get_changed_files tool, including usage and options
- update tool group listings and examples to include get_changed_files
- clarify and expand options for file_search, grep_search, insert_edit_into_file, and next_edit_suggestion tools
- update event list with CodeCompanionChatDone event
- fix and improve tool group documentation for clarity and completeness
* fix(gitcommit): handle cancelled language selection gracefully
- add checks for nil language selection in commit message generation
- prevent further processing if user cancels language selection dialog
* style(gitcommit): remove trailing whitespace in buffer.lua
- clean up unnecessary whitespace for improved code consistency
* docs(gitcommit): add setup function annotation and clean config usage
- document Git.setup with LuaDoc annotation for configuration options
- simplify git_config retrieval in generate_commit_message by removing redundant check1 parent 4d0682e commit 5411c45
File tree
16 files changed
+5849
-1964
lines changed- doc
- lua/codecompanion/_extensions/gitcommit
16 files changed
+5849
-1964
lines changedThis file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| |||
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
| 179 | + | |
| 180 | + | |
173 | 181 | | |
174 | 182 | | |
175 | 183 | | |
| |||
182 | 190 | | |
183 | 191 | | |
184 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
185 | 225 | | |
186 | 226 | | |
187 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
0 commit comments