gitpt 1.6.1 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +34 -167
  2. package/dist/commands/commit/commitFlags.js +7 -0
  3. package/dist/commands/commit/context/buildPrompt.js +13 -10
  4. package/dist/commands/commit/context/summaryPrompt.js +5 -2
  5. package/dist/commands/commit/context/systemPrompt.js +4 -1
  6. package/dist/commands/commit/context/userPrompt.js +4 -1
  7. package/dist/commands/commit/generateCommitMessage.js +14 -17
  8. package/dist/commands/commit/index.js +186 -179
  9. package/dist/commands/commit/summarizeDiff.js +183 -162
  10. package/dist/commands/config.js +24 -9
  11. package/dist/commands/hook/index.js +68 -0
  12. package/dist/commands/middleware/capabilitiesMiddleware/ghCapability.js +20 -20
  13. package/dist/commands/middleware/capabilitiesMiddleware/gitCapability.js +13 -10
  14. package/dist/commands/middleware/capabilitiesMiddleware/index.js +12 -11
  15. package/dist/commands/middleware/hasStagedChangesMiddleware.js +9 -6
  16. package/dist/commands/middleware/setupMiddleware/defaultModels.js +14 -10
  17. package/dist/commands/middleware/setupMiddleware/index.js +65 -71
  18. package/dist/commands/model.js +7 -4
  19. package/dist/commands/passthroughArgs.js +11 -0
  20. package/dist/commands/pr/context/systemPrompt.js +4 -1
  21. package/dist/commands/pr/context/userPrompt.js +4 -1
  22. package/dist/commands/pr/generatePRDetails.js +24 -23
  23. package/dist/commands/pr/getPRContext.js +37 -62
  24. package/dist/commands/pr/index.js +57 -62
  25. package/dist/commands/reset.js +23 -23
  26. package/dist/commands/review/index.js +31 -0
  27. package/dist/commands/setup.js +38 -13
  28. package/dist/config.js +63 -60
  29. package/dist/index.js +30 -67
  30. package/dist/llm/budget.js +10 -0
  31. package/dist/llm/index.js +12 -7
  32. package/dist/llm/providers/anthropic/index.js +30 -30
  33. package/dist/llm/providers/apiKey.js +36 -35
  34. package/dist/llm/providers/apple/client.js +73 -83
  35. package/dist/llm/providers/apple/index.js +64 -72
  36. package/dist/llm/providers/apple/models.js +27 -19
  37. package/dist/llm/providers/base.js +36 -36
  38. package/dist/llm/providers/local/index.js +79 -91
  39. package/dist/llm/providers/openai/index.js +19 -16
  40. package/dist/llm/providers/openaiCompatible.js +59 -62
  41. package/dist/llm/providers/openrouter/index.js +18 -15
  42. package/dist/llm/registry.js +30 -34
  43. package/dist/llm/setup/getAvailableModels.js +15 -9
  44. package/dist/llm/setup/selectModel.js +36 -44
  45. package/dist/llm/tokenCount.js +4 -3
  46. package/dist/package.js +67 -0
  47. package/dist/services/gh/createPullRequest.js +38 -58
  48. package/dist/services/gh/index.js +6 -3
  49. package/dist/services/gh/isAvailable.js +10 -8
  50. package/dist/services/git/executeGitAdd.js +11 -12
  51. package/dist/services/git/executeGitCommit.js +10 -11
  52. package/dist/services/git/getAmendChanges.js +23 -0
  53. package/dist/services/git/getChangedFiles.js +28 -61
  54. package/dist/services/git/getCommitsSinceBaseBranch.js +28 -56
  55. package/dist/services/git/getCurrentBranch.js +10 -8
  56. package/dist/services/git/getDefaultBranch.js +35 -60
  57. package/dist/services/git/getStagedChanges.js +10 -8
  58. package/dist/services/git/getStagedFiles.js +10 -9
  59. package/dist/services/git/hasStagedChanges.js +9 -8
  60. package/dist/services/git/index.js +17 -12
  61. package/dist/services/git/isAvailable.js +10 -8
  62. package/dist/services/git/isGitRepository.js +10 -8
  63. package/dist/utils/commitlint.js +97 -135
  64. package/dist/utils/formatBaseURL.js +7 -6
  65. package/dist/utils/maskApiKey.js +6 -7
  66. package/package.json +14 -4
  67. package/dist/commands/commit/context/buildPrompt.d.ts +0 -4
  68. package/dist/commands/commit/context/summaryPrompt.d.ts +0 -2
  69. package/dist/commands/commit/context/systemPrompt.d.ts +0 -1
  70. package/dist/commands/commit/context/userPrompt.d.ts +0 -1
  71. package/dist/commands/commit/generateCommitMessage.d.ts +0 -1
  72. package/dist/commands/commit/index.d.ts +0 -7
  73. package/dist/commands/commit/summarizeDiff.d.ts +0 -1
  74. package/dist/commands/config.d.ts +0 -1
  75. package/dist/commands/middleware/capabilitiesMiddleware/ghCapability.d.ts +0 -1
  76. package/dist/commands/middleware/capabilitiesMiddleware/gitCapability.d.ts +0 -1
  77. package/dist/commands/middleware/capabilitiesMiddleware/index.d.ts +0 -3
  78. package/dist/commands/middleware/hasStagedChangesMiddleware.d.ts +0 -1
  79. package/dist/commands/middleware/setupMiddleware/defaultModels.d.ts +0 -8
  80. package/dist/commands/middleware/setupMiddleware/index.d.ts +0 -4
  81. package/dist/commands/model.d.ts +0 -1
  82. package/dist/commands/pr/context/systemPrompt.d.ts +0 -1
  83. package/dist/commands/pr/context/userPrompt.d.ts +0 -1
  84. package/dist/commands/pr/generatePRDetails.d.ts +0 -4
  85. package/dist/commands/pr/getPRContext.d.ts +0 -1
  86. package/dist/commands/pr/index.d.ts +0 -10
  87. package/dist/commands/reset.d.ts +0 -3
  88. package/dist/commands/setup.d.ts +0 -3
  89. package/dist/config.d.ts +0 -14
  90. package/dist/index.d.ts +0 -2
  91. package/dist/llm/client.d.ts +0 -24
  92. package/dist/llm/client.js +0 -1
  93. package/dist/llm/index.d.ts +0 -6
  94. package/dist/llm/providers/anthropic/index.d.ts +0 -9
  95. package/dist/llm/providers/apiKey.d.ts +0 -3
  96. package/dist/llm/providers/apple/client.d.ts +0 -3
  97. package/dist/llm/providers/apple/index.d.ts +0 -13
  98. package/dist/llm/providers/apple/models.d.ts +0 -14
  99. package/dist/llm/providers/base.d.ts +0 -30
  100. package/dist/llm/providers/local/index.d.ts +0 -11
  101. package/dist/llm/providers/openai/index.d.ts +0 -10
  102. package/dist/llm/providers/openaiCompatible.d.ts +0 -15
  103. package/dist/llm/providers/openrouter/index.d.ts +0 -9
  104. package/dist/llm/registry.d.ts +0 -8
  105. package/dist/llm/setup/getAvailableModels.d.ts +0 -5
  106. package/dist/llm/setup/selectModel.d.ts +0 -5
  107. package/dist/llm/setup/types.d.ts +0 -13
  108. package/dist/llm/setup/types.js +0 -1
  109. package/dist/llm/tokenCount.d.ts +0 -3
  110. package/dist/services/gh/createPullRequest.d.ts +0 -1
  111. package/dist/services/gh/index.d.ts +0 -4
  112. package/dist/services/gh/isAvailable.d.ts +0 -1
  113. package/dist/services/git/executeGitAdd.d.ts +0 -1
  114. package/dist/services/git/executeGitCommit.d.ts +0 -1
  115. package/dist/services/git/getChangedFiles.d.ts +0 -1
  116. package/dist/services/git/getCommitsSinceBaseBranch.d.ts +0 -1
  117. package/dist/services/git/getCurrentBranch.d.ts +0 -1
  118. package/dist/services/git/getDefaultBranch.d.ts +0 -1
  119. package/dist/services/git/getStagedChanges.d.ts +0 -1
  120. package/dist/services/git/getStagedFiles.d.ts +0 -1
  121. package/dist/services/git/hasStagedChanges.d.ts +0 -1
  122. package/dist/services/git/index.d.ts +0 -13
  123. package/dist/services/git/isAvailable.d.ts +0 -1
  124. package/dist/services/git/isGitRepository.d.ts +0 -1
  125. package/dist/utils/commitlint.d.ts +0 -25
  126. package/dist/utils/formatBaseURL.d.ts +0 -1
  127. package/dist/utils/maskApiKey.d.ts +0 -1
package/README.md CHANGED
@@ -1,208 +1,75 @@
1
1
  # GitPT
2
2
 
3
- Git Prompt Tool is a CLI tool that helps you write commit messages using AI through [OpenRouter](https://openrouter.ai/) or a local LLM. It acts as a complete git wrapper, enhancing specific commands with AI while passing through all other git commands directly.
3
+ GitPT (Git Prompt Tool) is a git command alias that writes your commit messages with an LLM, built for on-device models. Use it anywhere you use git: every command it doesn't change passes straight through, so you can replace git with it and lose nothing. The one command that changes is `commit`, which writes the message for you.
4
4
 
5
- ## Features
5
+ Big remote models already write commits fine. The harder case is the small local model on your machine (Apple's Foundation Models, Ollama, LM Studio), which holds only a few thousand tokens. A real diff is much larger, so GitPT summarizes it file by file until it fits the model's context window, then writes the message from that summary. Remote APIs (OpenAI, Anthropic, OpenRouter) work too.
6
6
 
7
- - Acts as a complete git replacement - all git commands are supported
8
- - Generate commit messages with AI based on your code changes
7
+ ![GitPT generating a commit message](assets/demo.gif)
9
8
 
10
- `gitpt commit`
11
- - Create pull requests with AI-generated titles and descriptions
9
+ <sub>The diff is summarized to fit the model's context window before the message is written.</sub>
12
10
 
13
- `gitpt pr create`
14
- - Compatible with all regular git options (flags, arguments, etc.)
15
- - Edit suggested messages before committing
16
- - Works with various AI models via OpenRouter
17
- - Support for local LLMs with OpenAI-compatible API
18
- - Support for Apple Foundation Models on-device (macOS 27+, no API key required)
19
- - [Commitlint](https://commitlint.js.org/) support - read directly from your repository
11
+ > **New: Apple Foundation Models.** On macOS 27 and later, GitPT runs on Apple's built-in on-device model. No API key, no signup, nothing leaves your Mac. Run `gitpt setup` and choose Apple Foundation Models.
20
12
 
21
- ## Installation
13
+ ## Install
22
14
 
23
15
  ```bash
24
- # Install globally
25
16
  npm install -g gitpt
26
-
27
- # Or use npx
28
- npx gitpt
29
- ```
30
-
31
- ## Set up
32
-
33
- To configure GitPT with your OpenRouter API key and select a model:
34
-
35
- ```bash
36
- gitpt setup
37
- ```
38
-
39
- This will guide you through:
40
- 1. Entering your OpenRouter API key
41
- 2. Selecting an AI model from popular options or specifying a custom one
42
-
43
- _It's recommended using small models, such as `openai/gpt-4.1-mini` as your model choice. Mainly due to its large context window, fast response times & cost-effective pricing._
44
-
45
-
46
- You'll need an [OpenRouter](https://openrouter.ai/) account to get an API key.
47
-
48
- ## Usage
49
-
50
- ### Using GitPT as a Complete Git Replacement
51
-
52
- GitPT can be used as a direct replacement for git - any git command can be run through GitPT:
53
-
54
- ```bash
55
- # Standard git commands work exactly the same
56
- gitpt status
57
- gitpt log
58
- gitpt branch
59
- gitpt checkout -b new-feature
60
- gitpt push origin main
61
-
62
- # GitPT passes all arguments and options to git
63
- gitpt log --oneline --graph
64
- gitpt merge --no-ff feature-branch
65
17
  ```
66
18
 
67
- ### Adding Files
68
-
69
- Add files to the staging area just like you would with git:
19
+ ## Setup
70
20
 
71
21
  ```bash
72
- # Same as git add . (supports all the regular git add options)
73
- gitpt add .
22
+ gitpt setup # pick a model
74
23
  ```
75
24
 
76
- ### Creating Commits
77
-
78
- Generate an AI-powered commit message based on your staged changes:
79
-
80
- ```bash
81
- gitpt commit
82
-
83
- # Or supply -m argument, if you want to avoid gitpt generating the message
84
- gitpt commit -m "feat: file hash validation"
85
-
86
- # Pass any other git commit options
87
- gitpt commit --amend
88
- ```
89
-
90
- The tool will:
91
- 1. Analyze your staged changes
92
- 2. Generate a commit message using the configured AI model
93
- 3. Validate against commitlint rules (if configured)
94
- 4. Regenerate the message if it fails validation
95
- 5. Show you the suggested message
96
- 6. Let you edit the message before committing
97
- 7. Create the commit with your approved message
98
-
99
- ### Changing Models
100
-
101
- You can change the AI model at any time:
25
+ Optional: alias git so GitPT runs everywhere you already type git.
102
26
 
103
27
  ```bash
104
- # Select model interactively (either OpenRouter or a local LLM)
105
- gitpt model
28
+ alias git=gitpt
106
29
  ```
107
30
 
108
- _It's recommended using small models, such as `openai/gpt-4.1-mini` as your model choice. Mainly due to its large context window, fast response times & cost-effective pricing._
109
-
110
- #### Using a Local LLM
111
-
112
- GitPT works with any local LLM that provides an OpenAI-compatible API endpoint, such as:
113
- - [Ollama](https://ollama.ai/)
114
- - [LM Studio](https://lmstudio.ai/)
115
- - [LocalAI](https://localai.io/)
116
- - Custom setups with tools like llama.cpp
117
-
118
- #### Using Apple Foundation Models
119
-
120
- On macOS 27 and later, GitPT can use Apple's on-device Foundation Models through the built-in `fm` CLI — no API key or network connection required. Select **Apple Foundation Models** when running `gitpt setup` or `gitpt model`.
121
-
122
- > Note: the on-device model has a small context window (~4096 tokens), so very large diffs may not fit.
123
-
124
- ## GitHub Usage
31
+ ## Use
125
32
 
126
- If you have GitHub CLI (`gh`) installed, you can use GitPT to interact with GitHub (e.g. generate full pull requests).
127
-
128
- ### Creating Pull Requests
129
-
130
- Generate AI-powered pull request titles and descriptions based on your changes:
33
+ With plain git, you write the message yourself:
131
34
 
132
35
  ```bash
133
- gitpt pr create
36
+ git add .
37
+ git commit -m "fix: handle empty staged diff" # you write the message
134
38
  ```
135
39
 
136
- The tool will:
137
- 1. Analyze the commits and files changed since branching from the base branch
138
- 2. Generate a suitable PR title and detailed description
139
- 3. Show you the suggested content
140
- 4. Let you edit the title and description before submission
141
- 5. Create the pull request with your approved content
142
-
143
- #### Pull Request Options
40
+ With GitPT, you don't:
144
41
 
145
42
  ```bash
146
- # Create a draft PR
147
- gitpt pr create --draft
148
-
149
- # Specify a custom base branch
150
- gitpt pr create --base develop
151
-
152
- # Skip editing the PR details
153
- gitpt pr create --no-edit
154
-
155
- # Provide your own title instead of generating one
156
- gitpt pr create --title "Your PR title here"
43
+ gitpt add .
44
+ gitpt commit # GitPT writes it from the diff
157
45
  ```
158
46
 
159
- ## How It Works
160
-
161
- GitPT leverages AI to enhance your Git workflow while acting as a complete git wrapper:
162
-
163
- - **Command Handling:** GitPT intelligently routes commands - enhanced commands (commit, pr) use AI capabilities while all other git commands are passed directly to git.
164
-
165
- - **For commits:** Sends a diff of your staged changes to the AI, which generates a contextual commit message following best practices.
166
-
167
- - **Commitlint Integration:** Automatically detects commitlint configuration files and validates generated commit messages against your project's commit conventions. If validation fails, it regenerates a compliant message.
168
-
169
- - **For pull requests:** Analyzes the commits and file changes between your branch and the base branch, then generates a suitable title and detailed description for your PR.
170
-
171
- - **For other git commands:** Passes them through directly to git with all arguments and options preserved, ensuring complete compatibility with your existing git workflow.
47
+ `gitpt commit` reads your staged diff, writes the message, and opens it in your editor. Save and close to commit.
172
48
 
173
- - **Local LLM Support:** Can use locally running LLM servers with OpenAI-compatible APIs instead of cloud-based services, providing privacy and offline capabilities.
49
+ ### Through plain `git commit`
174
50
 
175
- ## Development
176
-
177
- ```bash
178
- # Clone the repository
179
- git clone https://github.com/bartaxyz/GitPT.git
180
- cd GitPT
181
-
182
- # Install dependencies
183
- npm install
184
-
185
- # Build the project
186
- npm run build
187
-
188
- # Link for local development
189
- npm link
190
- ```
51
+ Prefer typing `git commit`? Two ways:
191
52
 
192
- ## Commitlint Integration
53
+ - **Shell alias** — add `alias git=gitpt` to your shell rc, then `git commit` runs GitPT.
54
+ - **Git hook** — run `gitpt hook install` once. A normal `git commit` (without `-m`) then opens your editor prefilled with an AI-generated message. It steps aside for `-m`, merges, squashes, and amends, and never blocks a commit if generation fails. Remove it with `gitpt hook uninstall`.
193
55
 
194
- GitPT automatically detects and integrates with [commitlint](https://commitlint.js.org/) if it's configured in your repository:
56
+ ## Commands
195
57
 
196
- - **Automatic Detection:** GitPT checks for common commitlint configuration files (commitlint.config.js, .commitlintrc.*, etc.)
58
+ - `gitpt commit`: write a commit message from staged changes. Respects `-m` and your commitlint rules.
59
+ - `gitpt model`: pick or switch the model. Each provider keeps its own key.
60
+ - `gitpt setup` / `gitpt config` / `gitpt reset`: configure, show, or clear settings.
61
+ - `gitpt pr create`: draft a pull request title and description with the `gh` CLI (experimental).
62
+ - `gitpt hook install` / `gitpt hook uninstall`: use GitPT through a plain `git commit` via a `prepare-commit-msg` hook.
197
63
 
198
- - **Rule-Aware Generation:** When commitlint is detected, GitPT instructs the AI to generate messages that follow your specific commit conventions
64
+ ## Models
199
65
 
200
- - **Validation & Regeneration:** Generated messages are validated against your commitlint rules before committing. If validation fails, GitPT automatically regenerates a compliant message
66
+ - **On-device**: Apple's Foundation Models on macOS 27 or later (no API key), or any OpenAI-compatible local server such as Ollama or LM Studio.
67
+ - **Remote**: OpenAI, Anthropic, OpenRouter. Bring an API key.
201
68
 
202
- - **Error Feedback:** Validation errors are sent to the AI to help it understand how to fix the message
69
+ ## Requests and bugs
203
70
 
204
- This integration ensures that all AI-generated commit messages follow your team's established commit conventions without requiring manual corrections.
71
+ Want a feature or hit a bug? [Open an issue](https://github.com/bartaxyz/GitPT/issues).
205
72
 
206
73
  ## License
207
74
 
208
- MIT
75
+ MIT
@@ -0,0 +1,7 @@
1
+ //#region src/commands/commit/commitFlags.ts
2
+ var hasFlag = (args, flag) => args.some((arg) => arg === flag || arg.startsWith(`${flag}=`));
3
+ var isAmend = (args) => hasFlag(args, "--amend");
4
+ var isAllowEmpty = (args) => hasFlag(args, "--allow-empty");
5
+ var skipsStagedGuard = (args) => isAmend(args) || isAllowEmpty(args);
6
+ //#endregion
7
+ export { isAmend, skipsStagedGuard };
@@ -1,13 +1,16 @@
1
- import { getCommitlintRules, hasCommitlintConfig, } from "../../../utils/commitlint.js";
1
+ import { getCommitlintRules, hasCommitlintConfig } from "../../../utils/commitlint.js";
2
2
  import { systemPrompt } from "./systemPrompt.js";
3
3
  import { userPrompt } from "./userPrompt.js";
4
- export const buildCommitPrompt = (diff, validationErrors) => {
5
- const baseRules = hasCommitlintConfig() ? getCommitlintRules() : "";
6
- const errorInfo = validationErrors
7
- ? `\n\nYOUR PREVIOUS MESSAGE FAILED VALIDATION WITH THESE ERRORS:\n${validationErrors}\n\nFIX THESE ISSUES IN YOUR NEW MESSAGE.`
8
- : "";
9
- return {
10
- system: [systemPrompt, baseRules, errorInfo].join("\n\n"),
11
- user: userPrompt(diff),
12
- };
4
+ //#region src/commands/commit/context/buildPrompt.ts
5
+ var buildCommitPrompt = (diff, validationErrors) => {
6
+ return {
7
+ system: [
8
+ systemPrompt,
9
+ hasCommitlintConfig() ? getCommitlintRules() : "",
10
+ validationErrors ? `\n\nYOUR PREVIOUS MESSAGE FAILED VALIDATION WITH THESE ERRORS:\n${validationErrors}\n\nFIX THESE ISSUES IN YOUR NEW MESSAGE.` : ""
11
+ ].join("\n\n"),
12
+ user: userPrompt(diff)
13
+ };
13
14
  };
15
+ //#endregion
16
+ export { buildCommitPrompt };
@@ -1,4 +1,5 @@
1
- export const summarySystemPrompt = `
1
+ //#region src/commands/commit/context/summaryPrompt.ts
2
+ var summarySystemPrompt = `
2
3
  You are condensing a fragment of a git diff so a commit message can be written afterwards.
3
4
 
4
5
  Output exactly one line per changed file, in this format:
@@ -10,8 +11,10 @@ Rules:
10
11
  - Describe the functional change (what was added, removed, refactored, or fixed), not file mechanics.
11
12
  - Output ONLY these lines. No preamble, no commentary, no code fences, no headings, no blank lines.
12
13
  `;
13
- export const summaryUserPrompt = (diffChunk) => `
14
+ var summaryUserPrompt = (diffChunk) => `
14
15
  Summarize the changes in this git diff fragment:
15
16
 
16
17
  ${diffChunk}
17
18
  `;
19
+ //#endregion
20
+ export { summarySystemPrompt, summaryUserPrompt };
@@ -1,4 +1,5 @@
1
- export const systemPrompt = `
1
+ //#region src/commands/commit/context/systemPrompt.ts
2
+ var systemPrompt = `
2
3
  You are a helpful assistant that generates concise, informative Git commit messages.
3
4
 
4
5
  Follow these strict rules:
@@ -36,3 +37,5 @@ Examples of Bad Commit Messages:
36
37
  This implements the login page... ❌ (contains multiple lines)
37
38
  - "fix: update styling" ❌ (includes quotes)
38
39
  `;
40
+ //#endregion
41
+ export { systemPrompt };
@@ -1,5 +1,8 @@
1
- export const userPrompt = (diff) => `
1
+ //#region src/commands/commit/context/userPrompt.ts
2
+ var userPrompt = (diff) => `
2
3
  Generate a single-line commit message for the following git diff:
3
4
 
4
5
  ${diff}
5
6
  `;
7
+ //#endregion
8
+ export { userPrompt };
@@ -1,21 +1,18 @@
1
1
  import { getConfig } from "../../config.js";
2
2
  import { getProvider } from "../../llm/registry.js";
3
3
  import { buildCommitPrompt } from "./context/buildPrompt.js";
4
- export const generateCommitMessage = async (diff, validationErrors) => {
5
- const config = getConfig();
6
- // Check if we have a configured model
7
- if (!config.model) {
8
- throw new Error('GitPT is not configured properly. Please run "gitpt setup" first.');
9
- }
10
- const { system, user } = buildCommitPrompt(diff, validationErrors);
11
- const provider = getProvider();
12
- const message = await provider.complete({
13
- system,
14
- user,
15
- maxTokens: provider.maxOutputTokens,
16
- });
17
- if (!message) {
18
- throw new Error("No message returned from LLM");
19
- }
20
- return message;
4
+ //#region src/commands/commit/generateCommitMessage.ts
5
+ var generateCommitMessage = async (diff, validationErrors) => {
6
+ if (!getConfig().model) throw new Error("GitPT is not configured properly. Please run \"gitpt setup\" first.");
7
+ const { system, user } = buildCommitPrompt(diff, validationErrors);
8
+ const provider = getProvider();
9
+ const message = await provider.complete({
10
+ system,
11
+ user,
12
+ maxTokens: provider.maxOutputTokens
13
+ });
14
+ if (!message) throw new Error("No message returned from LLM");
15
+ return message;
21
16
  };
17
+ //#endregion
18
+ export { generateCommitMessage };