feat(desktop): customizable code-suggestion output (spec + layout)#197
Merged
Conversation
Add two optional settings under Settings → Agent → Strategy that control how AI code suggestions are written and how they land in a review-draft comment: - code_suggestion_spec: free-text guidance injected as extra_instructions for /improve, /review and /ask to shape each suggestion's structure (e.g. Problem / Analysis / Suggestion). A soft constraint the model generally follows; /describe is excluded. - code_suggestion_layout: a deterministic markdown template for the draft comment, with <TITLE> / <SUGGESTIONS> / <HOME> / <PR> / <MODEL> placeholders. If it contains <SUGGESTIONS> it is the full body, otherwise it is prepended as a prefix. Empty falls back to a default layout (a linked "AI suggestion" label + model name above the body), replacing the previous plain "[AI suggestion]" prefix. Both are edited in a shared nested modal (textarea, placeholder shows the actual default). The project home URL is consolidated into a single PRODUCT_HOME_URL constant in @meebox/shared, also used by the About page. i18n added for all four locales; config-reference guide (EN + ZH) and CHANGELOG (EN + ZH) updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Two optional settings under Settings → Agent → Strategy that control how AI code suggestions read and how they land in a review-draft comment. Both default to empty and are edited in a shared nested modal.
①
code_suggestion_spec— LLM soft constraintFree-text guidance injected as
extra_instructionsfor/improve,/reviewand/ask(viabuildExtraInstructions;/improve&/reviewthrough the env key,/askspliced into the question). Shapes each suggestion's structure (e.g. Problem / Analysis / Suggestion)./describeis excluded. The model generally complies but it is not guaranteed.②
code_suggestion_layout— deterministic templateA markdown template applied when a suggestion finding becomes a review-draft comment (exact substitution, no model dependency). Placeholders:
<TITLE><SUGGESTIONS><HOME><PR><MODEL>If the layout contains
<SUGGESTIONS>it is the full comment body; otherwise it is prepended as a prefix. Empty falls back to a new default layout —[<TITLE>](<HOME>) (<MODEL>)on its own line above the body — replacing the previous plain[AI suggestion]prefix.Notes
PRODUCT_HOME_URLconstant in@meebox/shared(source of truth for the<HOME>placeholder and the About-page link, which was previously hardcoded).DEFAULT_CODE_SUGGESTION_LAYOUTlives there too, so the settings editor placeholder equals the actual default by construction.packages/pr-agent-bridge/src/prompts.ts(spec directive) +run-executor.ts(main);chat/utils/findings.tsrenderCodeSuggestionDraft+useChatActions(layout).Verification
lint,typecheck,test(packages), anddesktop buildall pass locally.🤖 Generated with Claude Code