feat: add emoji option to cli and config to control emoji prefixes

This commit is contained in:
sankalp committed 2025-08-25 13:54:51 +05:45
1 parent c80a6caca0
commit b09b5f676e
3 files changed
+73 -41

No files matched your search

+4 -1
View File
@@ -31,7 +31,8 @@ def cli():
@click.option('--no-stage', is_flag=True, help='Skip automatic staging of changes')
@click.option('--sign', is_flag=True, help='Sign commits with GPG')
@click.option('--temperature', type=float, help='AI temperature (0.0-1.0)')
def generate(files: tuple, repo: str, commit: bool, push: bool, conventional: bool, no_stage: bool, sign: bool, temperature: float):
@click.option('--emoji/--no-emoji', default=False, help='Include emoji prefixes in commit messages')
def generate(files: tuple, repo: str, commit: bool, push: bool, conventional: bool, no_stage: bool, sign: bool, temperature: float, emoji: bool):
"""Generate commit messages for staged changes"""
try:
with Progress(
@@ -41,6 +42,8 @@ def generate(files: tuple, repo: str, commit: bool, push: bool, conventional: bo
) as progress:
# Initialize services
config = Config()
# Override emoji setting for this invocation without persisting to disk
config._config["emoji"] = "true" if emoji else "false"
git_service = CommitGenGitService(config)
ai_service = CommitGenerator(config)