Skip to content

Conversation

@Algomorph
Copy link

@Algomorph Algomorph commented Nov 30, 2025

Description (GFM)

  • Introduce a Claude Code client with CLI-backed generation, model aliasing, timeout handling, and verification.
  • Register the provider in app settings/client table, persist shared model IDs, and add UI strings plus icon.
  • Provide settings UI for browsing/detecting the CLI path, editing timeout/model, and validating configuration.
  • Improve the settings UI: dialog now applies the active edit panel, model combobox captures typed values, and actions fetch the latest config from stored settings so model changes ("Update", "OK/Apply") take effect without an IDE reload.

Known Issues

  • None

Algomorph and others added 3 commits November 29, 2025 19:09
Add new LLM provider that invokes the Claude Code CLI (`claude`) for
commit message generation. This allows users with Claude Code/Max
subscriptions to leverage their existing authentication without
configuring separate API keys.

Implementation:
- ClaudeCodeClientConfiguration: Settings for CLI path, timeout, model
- ClaudeCodeClientService: CLI invocation via ProcessBuilder with JSON parsing
- ClaudeCodeClientPanel: Settings UI with path selector and detect button
- ClaudeCodeClientSharedState: Cached model aliases (sonnet, opus, haiku)

Known issues (to be fixed):
- CLI path auto-detection may fail in IDE environment (different PATH)
- Verification may hang if CLI waits for input

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Use interactive bash (-i flag) to inherit user's .bashrc PATH
- Read only stdout to avoid bash terminal warnings mixing with output
- Filter output lines to find actual path (first line starting with /)
- Resolve symlinks to get the real executable path
- Close stdin immediately to prevent CLI hanging

Fixes detection when claude is installed via npm in non-standard
locations (e.g., ~/.npm-global/bin or custom npm prefix).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Look up current config by ID in generateCommitMessageAction instead
  of using potentially stale `this` (IntelliJ caches AnAction instances)
- Call editPanel.apply() when editing existing LLM client configs
  (was only called when adding new configs)
- Add onApply callback to ClaudeCodeClientPanel model combobox to
  explicitly capture typed values from editable combobox

This fixes the bug where editing an LLM client configuration (e.g.,
changing the model) would not take effect until IDE restart.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Algomorph Algomorph changed the title Draft: Add Claude Code CLI provider for commit message generation Add Claude Code CLI provider for commit message generation Nov 30, 2025
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant