Support user OpenCode profiles under ~/.config/agentic/opencode/profiles and show them in the profile menu#57
Merged
Conversation
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.
Motivation
.opencode/opencode.json.Description
OPENCODE_USER_PROFILES_DIRand new helper functionsopencode_builtin_profile_contains,opencode_user_profile_ids, andopencode_profile_source_pathto discover and prefer bundled profiles when present.opencode_profile_*utilities so labels for user profiles are displayed as<profile-id> profileandopencode_profile_id_from_labelstrips that suffix for lookup.$HOME/.config/agentic/opencode/profiles/<profile-id>/opencode.jsonand to setSELECTED_OPENCODE_PROFILEfor chosen user profiles.opencode_profile_source_pathso installs copy from bundled profiles when available or from the user profile path otherwise.README.md,docs/opencode_setup.md, anddocs/agentic-usage.mddocumenting the user profile directory and examples.tests/e2e/opencode_plugins.e2e.shto create sample user profiles (DTandGH) and add assertions that the menu lists and applies those profiles correctly.Testing
tests/e2e/opencode_plugins.e2e.shwhich createsDTandGHprofiles under a fakeHOMEand verifies menu entries and applied profiles; the test passed.Codex Task