Skip to content

feat(ai): subscription-first commit message suggestions#17

Merged
danielss-dev merged 3 commits into
mainfrom
developements/ai-commit-messages-9092
Jul 1, 2026
Merged

feat(ai): subscription-first commit message suggestions#17
danielss-dev merged 3 commits into
mainfrom
developements/ai-commit-messages-9092

Conversation

@danielss-dev

Copy link
Copy Markdown
Owner

Summary

Adds AI-generated commit message suggestions from staged changes, using subscriptions developers already pay for instead of separate API keys.

  • OpenAI: ChatGPT subscription via Codex CLI (codex login / codex exec, read-only sandbox)
  • Anthropic: Claude Code CLI (claude auth login / claude -p, tools disabled)

UI

  • Settings → AI — provider picker, sign-in/sign-out, CLI path overrides, install hints
  • CommitBar — sparkle Suggest button fills subject + body
  • ⌘⇧M and command palette "Suggest commit message"

Backend

  • New crates/strand-tauri/src/ai/ module (prompt builder, JSON parse, CLI subprocess runners)
  • IPC: ai_provider_status, ai_provider_login, ai_provider_logout, repo_suggest_commit_message

Verification

  • cargo test -p strand-tauri (9 unit tests)
  • cargo check -p strand-core -p strand-tauri
  • pnpm --filter ./ui exec tsc --noEmit

Docs

  • ROADMAP open Q3 → ◐
  • TASKS.md AI section
  • docs/learnings.md — vendor CLI delegation policy
  • README feature bullet

Manual test

  1. Install + sign in via Settings → AI (Codex or Claude Code)
  2. Stage changes in Local Changes
  3. Click Suggest or use ⌘⇧M
  4. Verify subject/body populate; commit as usual
Open in Web Open in Cursor 

cursoragent and others added 3 commits July 1, 2026 14:18
Wire Codex CLI and Claude Code CLI for AI-generated commit messages from
staged diffs. Adds Settings → AI sign-in, CommitBar Suggest button, and
⌘⇧M / palette action. Auth stays in vendor CLIs; Strand orchestrates
subprocess calls and parses JSON responses.

Co-authored-by: Daniels <danielss-dev@users.noreply.github.com>
CI runs `cargo clippy -- -D warnings`, which promoted the
`redundant_closure` lint to a hard error at 6 call sites wrapping
the zero-arg `not_installed()` in a needless closure. Pass the
function directly to `ok_or_else`; behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
While a commit-message suggestion is generating, swap the sparkle icon for a spinning refresh icon and mark the button aria-busy. Keep the disabled button fully visible and accented with a progress cursor so the spinner reads as "working" rather than an inert, greyed-out control, and update the tooltip to reflect the in-progress state.
@danielss-dev danielss-dev marked this pull request as ready for review July 1, 2026 16:34
@danielss-dev danielss-dev merged commit b7a004a into main Jul 1, 2026
2 checks passed
@danielss-dev danielss-dev deleted the developements/ai-commit-messages-9092 branch July 1, 2026 16:36
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