Skip to content

Fixed "Open with Claude Code" context menu not applying Default profile settings (API key, proxy, Extra CLI args, etc.) (https://github.com/nbclaudecodegui/NetbeansClaudeCodeGui/issues/23) - #33

Merged
oleg68 merged 2 commits into
nbplugins:mainfrom
oleg68:bugfix/issue-23-extra-cli-args
Apr 14, 2026
Merged

oleg68 merged 2 commits into
nbplugins:mainfrom
oleg68:bugfix/issue-23-extra-cli-args

Conversation

@oleg68

@oleg68 oleg68 commented Apr 13, 2026 •

Copy link
Copy Markdown
Collaborator

autoStart(File, String) was passing null as extraCliArgs to the three-argument overload, so the profile's Extra CLI args setting (configured in Tools → Options → Profiles) was silently discarded when launching from the project context menu.

Fix: resolve the profile via ClaudeProfileStore.findByName() and forward its extraCliArgs. The IDE-restore path (autoStart with three args) already passes savedExtraCliArgs correctly and is unaffected.

ClaudeProfile.createDefault() constructs a profile with all fields set to
empty defaults without reading NbPreferences. As a result, findByName(null/blank)
returned a bare Default profile, silently discarding the user's configured
API key, proxy, extraCliArgs, and other settings.

Fix:

  • Added ClaudeProfileStore.getDefaultProfile() that goes through getProfiles(),
    which applies stored settings from NbPreferences to the Default profile.
  • findByName() now delegates to getDefaultProfile() for null/blank names,
    and uses it as the fallback for unknown named profiles.
  • Removed unused resolveProfile() from ClaudeProjectProperties (dead code).

Resolves: #23

Oleg Samarin and others added 2 commits April 14, 2026 09:06
autoStart(File, String) was passing null as extraCliArgs to the
three-argument overload, so the profile's Extra CLI args setting
(configured in Tools → Options → Profiles) was silently discarded
when launching from the project context menu.

Fix: resolve the profile via ClaudeProfileStore.findByName() and
forward its extraCliArgs. The IDE-restore path (autoStart with three
args) already passes savedExtraCliArgs correctly and is unaffected.

Resolves: nbplugins#23

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cked Default

ClaudeProfile.createDefault() constructs a profile with all fields set to
empty defaults without reading NbPreferences. As a result, findByName(null/blank)
returned a bare Default profile, silently discarding the user's configured
API key, proxy, extraCliArgs, and other settings.

Fix:
- Added ClaudeProfileStore.getDefaultProfile() that goes through getProfiles(),
  which applies stored settings from NbPreferences to the Default profile.
- findByName() now delegates to getDefaultProfile() for null/blank names,
  and uses it as the fallback for unknown named profiles.
- Removed unused resolveProfile() from ClaudeProjectProperties (dead code).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oleg68
oleg68 force-pushed the bugfix/issue-23-extra-cli-args branch from 1918a27 to 79aa9f3 Compare April 14, 2026 06:12
@oleg68 oleg68 changed the title Fixed "Open with Claude Code" context menu not applying Extra CLI args Fixed "Open with Claude Code" context menu not applying Default profile settings (API key, proxy, Extra CLI args, etc.) (https://github.com/nbclaudecodegui/NetbeansClaudeCodeGui/issues/23) Apr 14, 2026
@oleg68
oleg68 merged commit ee6286e into nbplugins:main Apr 14, 2026
3 checks passed
@oleg68
oleg68 deleted the bugfix/issue-23-extra-cli-args branch April 14, 2026 06:39
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.

"Open with Claude Code" project context action does not apply global defaultExtraCliArgs setting

1 participant