Good evening/Buenas noches, @bernabedev.
I would copy the whole content from the GEMINI.md file to prompt and instruct your extension’s AI (of course, it is @google/generative-ai instead of @google/gemini-cli) into the gemcommit.customPrompt setting. I am just uncertain if it will work.
If it is not possible, since this extension is MIT, can I modify the extension.json from the folder out to readjust prompt:
|
const prompt = `${ |
|
customPrompt || |
|
`Analyze the following git diff and generate a Conventional Commit message that accurately describes the changes made. |
|
- The message must be concise and informative, following the Conventional Commits format. |
|
- ${languageInstruction} |
|
- The commit message should not exceed 150 characters in the subject line. |
|
- Use imperative mood (e.g., "fix bug" instead of "fixed bug"). |
|
- Include a scope if relevant (e.g., "feat(auth): add login validation"). |
|
- If the commit fixes a bug, use "fix". |
|
- If the commit introduces a new feature, use "feat". |
|
- If the commit includes refactoring, use "refactor". |
|
- If the commit adds tests, use "test". |
|
- If the commit updates documentation, use "docs". |
|
- Do not include unnecessary details; keep it clear and to the point. |
|
- Return ONLY the commit message text, without formatting, backticks, or extra characters.` |
|
} |
and
|
const prompt = `Analyze the following git diff and generate a detailed Conventional Commit message with the following parts: |
|
1. Type (e.g., feat, fix, refactor, docs, style, test, etc.) |
|
2. Scope (optional, in parentheses) |
|
3. Short description |
|
4. Detailed body explaining the changes |
|
5. Note any breaking changes |
|
|
|
${languageInstruction} |
|
|
|
Return the result in JSON format with the following properties: |
|
{ |
|
"type": "feat|fix|refactor|docs|style|test|...", |
|
"scope": "optional scope", |
|
"description": "short description", |
|
"body": "detailed explanation", |
|
"breakingChanges": boolean |
|
} |
|
|
|
IMPORTANT: Return ONLY the raw JSON without any Markdown formatting, code blocks, backticks, or explanation text. The response should start with '{' and end with '}'. |
to my taste? Clearly, I need to be careful and to keep
projectContext and
stagedDiff.
Good evening/Buenas noches, @bernabedev.
I would copy the whole content from the
GEMINI.mdfile to prompt and instruct your extension’s AI (of course, it is@google/generative-aiinstead of@google/gemini-cli) into thegemcommit.customPromptsetting. I am just uncertain if it will work.If it is not possible, since this extension is MIT, can I modify the
extension.jsonfrom the folderoutto readjustprompt:gemcommit/src/extension.ts
Lines 258 to 273 in 9ac1ba2
gemcommit/src/extension.ts
Lines 306 to 324 in 9ac1ba2
projectContextandstagedDiff.