fix(config): properly handle prompt_append for Prometheus agent #1271
+50
−3
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.
Summary
Fixes #723 —
prompt_appendin agent overrides is ignored for Prometheus agent.Problem
When using
prompt_appendinoh-my-opencode.jsonfor Prometheus:{ "agents": { "prometheus": { "prompt_append": "## Custom Rules\nUse max 2 commits." } } }The
prompt_appendwas ignored becauseconfig-handler.tsused shallow spread:This leaves
prompt_appendas a separate property instead of appending it to thepromptfield.Solution
Extract
prompt_appendfrom the override and explicitly append it to the base prompt:Changes
src/plugin-handlers/config-handler.ts: Handleprompt_appendproperly for Prometheussrc/plugin-handlers/config-handler.test.ts: Add test verifyingprompt_appendis appendedTesting
prompt_appendcontent appears at end of promptRelated
Summary by cubic
Properly appends prompt_append from Prometheus agent overrides to the base prompt instead of ignoring it. Fixes #723 and ensures custom rules appear at the end of the final prompt.
Written for commit 2094b33. Summary will update on new commits.