-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.commitronrc
More file actions
94 lines (82 loc) · 3.74 KB
/
example.commitronrc
File metadata and controls
94 lines (82 loc) · 3.74 KB
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
# Commitron configuration file
# This file should be placed at ~/.commitronrc
# AI provider configuration
ai:
# Available providers: openai, gemini, ollama, claude, custom
provider: ollama
# Your API key for the selected provider
api_key: your-api-key-here
# The model to use - varies by provider
model: mistral:latest
# Control creativity (0.0-1.0): lower values are more deterministic, higher values more creative
temperature: 0.7
# Set to true to see detailed debugging information about AI requests and responses
debug: false
# Maximum tokens in AI response (increase for longer commit messages or more complex changes)
max_tokens: 1000
# Optional custom system prompt - overrides default AI instructions
# Leave empty to use the default prompt that matches the selected convention
# For conventional commits, a default prompt like this will be used:
# system_prompt: |
# Generate a concise git commit message written in present tense for the following code changes.
# Commit message must be a maximum of 72 characters.
# Include a brief descriptive body explaining the changes.
# Choose an appropriate type from: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.
#system_prompt: ""
# Only needed for Ollama, defaults to http://localhost:11434
ollama_host: http://localhost:11434
# Only needed for custom provider - URL of your local GPT API endpoint
# Examples:
# - Open WebUI: http://localhost:8080/v1/chat/completions
# - Local API server: http://localhost:8000/v1/chat/completions
# - Custom endpoint: https://your-api.example.com/v1/chat/completions
#api_endpoint: http://localhost:8080/v1/chat/completions
# Commit message configuration
commit:
# Available conventions: none, conventional, custom
convention: conventional
# Whether to include a message body after the subject
include_body: true
# Maximum length for the subject line
max_length: 72
# Maximum length for the commit body - keep this concise to avoid truncation
max_body_length: 400
# Only used when convention is 'custom'
# custom_template: "{{type}}({{scope}}): {{subject}}"
# Context settings for AI
context:
# Whether to include file names in the context
# Provides basic information about which files changed
include_file_names: true
# Whether to include the git diff in the context
# This is the most important setting for accurate commit messages
# STRONGLY RECOMMENDED to keep this enabled
include_diff: true
# Maximum length for the context to avoid exceeding token limits
# Increase for large changes, decrease if you hit token limits
# For more accurate messages with large diffs, increase this value
max_context_length: 4000
# Include statistics about file changes (+/- lines)
# Helps AI understand the magnitude and type of changes
include_file_stats: true
# Include brief description of what each file does (based on first few lines)
# Helps AI understand the purpose of each file
include_file_summaries: true
# Show the first N lines of each file for additional context
# Set to 0 to disable
# Note: This is skipped when include_diff is true to avoid duplication
show_first_lines_of_file: 5
# Include high-level repository structure for better context
# Helps for changes that affect multiple parts of the codebase
# May not be needed for simple changes
include_repo_structure: false
# User interface configuration
ui:
# Enable TUI (Text User Interface) for better visualization
# Shows staged files and commit message with confirmation
enable_tui: true
# Ask for confirmation before finalizing the commit message
confirm_commit: true
# Maximum number of files to display in the TUI (0 = no limit)
# Useful for commits with many files
display_files_limit: 20