feat(agent): add skip_onboarding to Agent trait for Claude#50
Merged
Conversation
Adds a `skip_onboarding` method to the `Agent` trait that accepts a map of filename → file content and returns the modified map. The default implementation is a no-op (used by OpenCode). ClaudeAgent overrides it to set `hasCompletedOnboarding: true` and `hasTrustDialogAccepted: true` in `.claude.json`, preventing the interactive onboarding dialog from appearing on first launch. `stage_agent_settings` is refactored to call `skip_onboarding` so that Claude always produces a `.claude.json` even when no user-provided settings directory exists, and merges with any existing `.claude.json` content when one is provided. Adds integration tests and README documentation. Closes #49 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Philippe Martin <phmartin@redhat.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #50 +/- ##
=======================================
Coverage ? 84.07%
=======================================
Files ? 16
Lines ? 1997
Branches ? 0
=======================================
Hits ? 1679
Misses ? 318
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
skip_onboardingmethod to theAgenttrait that accepts a map of filename → file content and returns the modified map. The default implementation is a no-op (used by OpenCode). ClaudeAgent overrides it to sethasCompletedOnboarding: trueandhasTrustDialogAccepted: truein.claude.json, preventing the interactive onboarding dialog from appearing on first launch.stage_agent_settingsis refactored to callskip_onboardingso that Claude always produces a.claude.jsoneven when no user-provided settings directory exists, and merges with any existing.claude.jsoncontent when one is provided.Adds integration tests and README documentation.
Closes #49