fix(opencode): allow partial command overrides in JSON config#27086
Open
joao-paulo-santos wants to merge 1 commit into
Open
fix(opencode): allow partial command overrides in JSON config#27086joao-paulo-santos wants to merge 1 commit into
joao-paulo-santos wants to merge 1 commit into
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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.
Issue for this PR
Fixes #27035
Type of change
What does this PR do?
ConfigCommand.Inforequirestemplateas a mandatory field, but the docs show that JSON config can override just themodelfor a built-in command. Sincetemplateis derived from markdown content for built-in commands, users shouldn't need to copy-paste it.Made
templateoptional in theInfoschema. Markdown-loaded commands always settemplatefrommd.content.trim(), so they're unaffected. Thecommand/index.tsloop now skips entries without atemplate— partial overrides get their template filled in when markdown commands are merged atconfig.ts:619.How did you verify your code works?
bun test test/config/config.test.ts— 84 tests pass, including a new test that configures a command override with onlymodel(notemplate)bun turbo typecheck— 14/14 packages cleanScreenshots / recordings
N/A — config validation fix, no UI changes.
Checklist