fix(language): anchor responses to the user's language by default - #55
Merged
Merged
Conversation
Models occasionally drifted to the wrong language (e.g. Spanish replies in pt-BR sessions) because no language directive existed unless the user set settings.language. Now every system prompt path — including CLAUDE_CODE_SIMPLE mode — injects a locale-agnostic 'respond in the language of the user's most recent message' section, while the explicit settings.language override is preserved for users who want a fixed language. Bumps version to 0.15.25. Co-Authored-By: Verboo Code <noreply@code.verboo.ai>
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.
Summary
settings.language.CLAUDE_CODE_SIMPLEearly-return — injects a locale-agnostic section: "Always respond in the same language as the user's most recent message…".settings.languageoverride is preserved (fixed-language behavior for those who want it); the picker hint now reads "Leave empty to respond in the user's language".Context
Root cause was verified across providers/router/CLI: nothing pinned or injected language anywhere. Model-side drift (DeepSeek V4 lost output-language self-monitoring; GLM-5.3 mixed languages) fills the gap when no anchor exists. Locale-agnostic by design — Verboo Code is international; no hardcoded locale.
Test plan
src/constants/languageAnchor.test.ts— 8 tests: default mirror injection, no-undefined leak, locale-agnostic (no pinned language), explicit override (verbatim + suppresses mirror), simple-mode anchor (unset + override), technical-terms exemptionbun test src/constants/— 15 pass / 0 fail (incl. pre-existing promptIdentity suite)bun testcompared with/without patch (stash): 0 new failures, 0 regressions (76 pre-existing failures unchanged)🤖 Generated with Verboo Code