Skip to content

feat: add --yolo flag for immediate commits#93

Merged
rm-hull merged 4 commits into
mainfrom
feat/yolo-mode
May 15, 2026
Merged

feat: add --yolo flag for immediate commits#93
rm-hull merged 4 commits into
mainfrom
feat/yolo-mode

Conversation

@rm-hull
Copy link
Copy Markdown
Owner

@rm-hull rm-hull commented May 15, 2026

Introduced a yolo mode that bypasses the interactive confirmation step. When enabled, the application automatically commits the generated summary upon receiving it from the LLM.

graph LR
    A[LLM Result] --> B{YOLO mode?}
    B -- Yes --> C[Commit Immediately]
    B -- No --> D[Show Confirmation UI]
Loading

Introduced a `yolo` mode that bypasses the interactive confirmation
step. When enabled, the application automatically commits the generated
summary upon receiving it from the LLM.

```mermaid
graph LR
    A[LLM Result] --> B{YOLO mode?}
    B -- Yes --> C[Commit Immediately]
    B -- No --> D[Show Confirmation UI]
```
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

TestsPassed ✅SkippedFailed
JUnit Test Report45 ran45 passed0 skipped0 failed
TestResult
JUnit Test Report
com/rm-hull/git-commit-summary/internal/config.TestLoad/Defaults✅ passed
com/rm-hull/git-commit-summary/internal/config.TestLoad/WithEnvironmentVariables✅ passed
com/rm-hull/git-commit-summary/internal/config.TestLoad✅ passed
com/rm-hull/git-commit-summary/internal/config.Test_updateProperties/handle_empty_quoted_strings✅ passed
com/rm-hull/git-commit-summary/internal/config.Test_updateProperties/empty_file,_add_new_properties✅ passed
com/rm-hull/git-commit-summary/internal/config.Test_updateProperties/existing_file,_update_properties✅ passed
com/rm-hull/git-commit-summary/internal/config.Test_updateProperties/doesnt_overwrite_values_if_new_value_is_the_same✅ passed
com/rm-hull/git-commit-summary/internal/config.Test_updateProperties/existing_file,_add_new_and_update_existing✅ passed
com/rm-hull/git-commit-summary/internal/config.Test_updateProperties/preserve_comments_and_other_lines✅ passed
com/rm-hull/git-commit-summary/internal/config.Test_updateProperties/handle_mixed_quoting_styles✅ passed
com/rm-hull/git-commit-summary/internal/config.Test_updateProperties/empty_props,_no_changes✅ passed
com/rm-hull/git-commit-summary/internal/config.Test_updateProperties/properties_with_special_characters✅ passed
com/rm-hull/git-commit-summary/internal/config.Test_updateProperties✅ passed
com/rm-hull/git-commit-summary/internal/llm_provider.TestNewProvider/GoogleProvider✅ passed
com/rm-hull/git-commit-summary/internal/llm_provider.TestNewProvider/OpenAIProvider✅ passed
com/rm-hull/git-commit-summary/internal/llm_provider.TestNewProvider/UnknownProvider✅ passed
com/rm-hull/git-commit-summary/internal/llm_provider.TestNewProvider✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestHistory/NewHistory✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestHistory/Add_and_Value✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestHistory/Undo✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestHistory/Redo✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestHistory/Undo_at_beginning✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestHistory/Redo_at_end✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestHistory/Add_truncates_future_history✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestHistory/Multiple_Undos_and_Redos✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestHistory✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/tea.KeyMsg_-_CtrlC_in_showSpinner_state✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/tea.KeyMsg_-_CtrlC_in_other_states✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/gitCheckMsg_-_empty_(no_staged_changes)✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/gitCheckMsg_-_non-empty_(staged_changes)✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/gitDiffMsg✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/llmResultMsg_-_with_user_message✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/llmResultMsg_-_without_user_message✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/commitMsg✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/regenerateMsg✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/userResponseMsg✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/cancelRegenPromptMsg✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/errMsg✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/abortMsg✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/spinner.Update_for_showSpinner_state✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/commitView.Update_for_showCommitView_state✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/promptView.Update_for_showRegeneratePrompt_state✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/llmResultMsg_-_YOLO_mode✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update/llmResultMsg_-_YOLO_mode_-_empty_summary✅ passed
com/rm-hull/git-commit-summary/internal/ui.TestModel_Update✅ passed

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a 'YOLO mode' via a new --yolo command-line flag, which allows the application to automatically commit generated summaries without manual confirmation. The changes involve updating the CLI flag parsing, the application runner, and the UI model to bypass the confirmation view when the flag is enabled. Additionally, safety checks were added to the UI rendering logic to handle nil sub-models, and unit tests were updated to cover the new functionality. A review comment suggests adding a validation check in YOLO mode to prevent the application from attempting to create an empty commit if the LLM fails to generate a summary.

Comment thread internal/ui/model.go
@coveralls
Copy link
Copy Markdown

coveralls commented May 15, 2026

Coverage Report for CI Build 25939876817

Coverage increased (+0.3%) to 32.271%

Details

  • Coverage increased (+0.3%) from the base build.
  • Patch coverage: 19 uncovered changes across 3 files (11 of 30 lines covered, 36.67%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
internal/app/app.go 7 0 0.0%
internal/ui/model.go 17 11 64.71%
main.go 6 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 973
Covered Lines: 314
Line Coverage: 32.27%
Coverage Strength: 0.35 hits per line

💛 - Coveralls

@rm-hull rm-hull changed the title feat: add --yolo flag for immediate commits feat: add --yolo flag for immediate commits May 15, 2026
rm-hull added 3 commits May 15, 2026 21:22
…t/yolo-mode

* 'main' of github.com:rm-hull/git-commit-summary:
  chore: go get -u && go mod tidy (#95)
  feat: add support for including all modified files (#94)
Properly register the `all` flag as a pointer variable to ensure it is
correctly captured and passed to the `git.Client` during application
initialization.
Stop execution and report an error if the LLM fails to generate a
commit message while in `yolo` mode to prevent committing empty
summaries.
@rm-hull rm-hull merged commit 1e3c504 into main May 15, 2026
3 checks passed
@rm-hull rm-hull deleted the feat/yolo-mode branch May 15, 2026 20:32
rm-hull added a commit that referenced this pull request May 23, 2026
…/delete-line-capability

* 'main' of github.com:rm-hull/git-commit-summary:
  feat: separate system instructions and user prompts (#102)
  feat: support Gemini 3.5 Flash model
  chore(deps): Bump github.com/openai/openai-go/v3 from 3.36.0 to 3.37.0 (#100)
  chore(deps): Bump google.golang.org/genai from 1.57.0 to 1.58.0 (#101)
  style: reorder version notice message parts
  style: adjust new version notification format
  refactor: defer error check in app.Run
  chore: go get -u && go mod tidy (#99)
  feat: add automatic version update check (#98)
  chore(deps): Bump github.com/revrost/go-openrouter from 1.5.0 to 1.6.0 (#97)
  chore: go get -u && go mod tidy (#96)
  fix: reset cursor position in commit summary textarea
  feat: display LLM generation duration in UI
  feat: add Gemma 4 26B and 31B models
  feat: add `--yolo` flag for immediate commits (#93)
  chore: go get -u && go mod tidy (#95)
  feat: add support for including all modified files (#94)
  chore(deps): Bump google.golang.org/genai from 1.56.0 to 1.57.0 (#92)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants