feat(adapter): per-agent language instruction#4428
feat(adapter): per-agent language instruction#4428ramonmatias19 wants to merge 1 commit intopaperclipai:masterfrom
Conversation
Greptile SummaryThis PR adds a per-agent The PR description does not follow the required PR template from Confidence Score: 5/5Code changes are safe to merge; only the PR description needs to be updated to satisfy CONTRIBUTING.md requirements. All 15 changed files implement the same well-guarded pattern consistently. The helper correctly short-circuits on empty input, no security or data-integrity issues are introduced, and the Windows symlink fixes are valid. Remaining findings are P2 (missing UI field and missing PR template sections) with no correctness or reliability impact. No files require special attention from a code correctness perspective. Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: ui/src/components/agent-config-defaults.ts
Line: 28
Comment:
**Missing UI input field for `language`**
`language: ""` is added to the default config values, and all `build-config.ts` files wire it through to the adapter config, but no form input component appears to be added in this PR. Without a visible field in the agent configuration UI, users have no way to discover or set this option without editing raw config. Consider adding an input/select field (or confirming that an existing generic config editor surfaces this key automatically).
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat(adapter): per-agent language instru..." | Re-trigger Greptile |
| workspaceBranchTemplate: "", | ||
| worktreeParentDir: "", | ||
| runtimeServicesJson: "", | ||
| language: "", |
There was a problem hiding this comment.
Missing UI input field for
language
language: "" is added to the default config values, and all build-config.ts files wire it through to the adapter config, but no form input component appears to be added in this PR. Without a visible field in the agent configuration UI, users have no way to discover or set this option without editing raw config. Consider adding an input/select field (or confirming that an existing generic config editor surfaces this key automatically).
Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/src/components/agent-config-defaults.ts
Line: 28
Comment:
**Missing UI input field for `language`**
`language: ""` is added to the default config values, and all `build-config.ts` files wire it through to the adapter config, but no form input component appears to be added in this PR. Without a visible field in the agent configuration UI, users have no way to discover or set this option without editing raw config. Consider adding an input/select field (or confirming that an existing generic config editor surfaces this key automatically).
How can I resolve this? If you propose a fix, please make it concise.Add optional 'language' config field on all local adapters (Claude, Codex, Cursor, Gemini, OpenCode, Pi). When set, a final instruction is appended to the rendered prompt telling the agent to produce all outputs in that language (responses, commit messages, explanations, etc.). - New buildLanguageInstruction() helper in adapter-utils/server-utils - Each adapter's execute.ts imports the helper and appends it to its joinPromptSections call - Each adapter's ui/build-config.ts passes v.language to adapterConfig - Add language field to CreateConfigValues (optional string) + default
a159db1 to
513d395
Compare
Summary
Add an optional
languageconfig field on all local adapters (Claude, Codex, Cursor, Gemini, OpenCode, Pi). When set, a final instruction is appended to the rendered prompt telling the agent to produce all outputs in that language (responses, commit messages, explanations, etc.).buildLanguageInstruction()helper inadapter-utils/server-utilsexecute.tsimports the helper and appends it to itsjoinPromptSectionscallui/build-config.tspassesv.languagetoadapterConfiglanguagefield toCreateConfigValues(optional string) + defaultTest plan
language: "Portuguese", run a heartbeat — verify the agent replies in Portugueselanguageempty — verify no language instruction is appended