Repository navigation
[Feature Request] Localize Auto review denial reasons to the UI language #14048
Ghost-Sam1222
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Auto review shows its denial explanation in English even when the UI is localized. In a Chinese UI the card reads
Auto review 拒绝了此调用:followed by an English paragraph explaining which target, scope, or authorization is missing. The wrapper is translated; the reason itself is not.Why this matters
The reason is the actionable part of the card: it names the missing authorization, the exact target/scope, or the ambiguous effect that made the reviewer fail closed. A user who cannot read English can press 允许一次 / 拒绝, but cannot tell what to authorize or how to rephrase the request.
Where it comes from
packages/experimental/auto-review/src/index.ts:REVIEW_POLICYis a fixed English system prompt; the model returnsreasoninside the strict JSON decision.deniedDisplayReason(reason)localizes only the wrapper. The source comments say "reviewer reasons remain verbatim in every language" and "The audited reason is English".So this looks intentional for audit consistency rather than an oversight.
Proposal
Add a language directive to the review request, derived from the session/UI locale — for example, when the locale is
zh, append "Write thereasonin Simplified Chinese (简体中文)" to the system prompt. The strict JSON shapes stay unchanged.Alternatively, expose a config knob such as
reasonLanguage: auto | english | <locale>, so deployments can choose between audit consistency and readability.If the English reason must be preserved as the audit record, consider returning both:
{"risk":"medium","decision":"deny","reason":"<English audit>","display_reason":"<localized>"}but that adds output tokens and risks diluting the "return exactly one JSON object and no other text" contract; a locale-aware prompt seems simpler.
Alternatives considered
Question
Is the English reason intentional for auditability? If so, would a locale-aware prompt (or a localized
display_reason) be acceptable, or is there a reason to keep every reviewer reason in English?Context: observed on DSH Desktop 0.2.2-rc.3 with a Chinese UI, Auto review enabled. Example card:
Auto review 拒绝了此调用:The pending bash invocation's arguments are not present, so the exact command cannot be evaluated. ...All reactions