Forbid bilingual glosses in forced reply language.

Stop English replies from keeping Chinese parentheticals like failure (失联).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-15 20:52:03 +08:00
parent 91f2e9a5c8
commit 8360c2e4fc
4 changed files with 19 additions and 4 deletions

View file

@ -134,12 +134,16 @@ export function replyInstruction(setting: string | undefined | null): string {
const normalized = normalizeReplyLanguage(setting)
if (normalized === REPLY_LANGUAGE_DEFAULT) return ''
const meta = REPLY_META[normalized]
const noGloss = normalized === 'en'
? 'Never add Chinese glosses or bilingual parentheses such as "communication failure (失联)" or "alarm (告警)"; use one English wording only.'
: 'Never add English glosses or bilingual parentheses such as "失联 (communication failure)" or "告警 (alarm)"; use one Chinese wording only.'
return [
'## Reply language requirement (mandatory)',
`The operator set Netx Ops reply language to ${meta.native} (${meta.name}).`,
`You MUST write the entire final reply in ${meta.name} only.`,
`Do not switch to the user's language even if they write in Chinese, English, or any other language.`,
'This includes titles, bullet labels (Result / Evidence / Next may stay as English keywords), explanations, summaries, warnings, and error text.',
noGloss,
'Keep code, commands, file paths, API names, host names, UUIDs, and proper nouns unchanged.',
'This rule outranks persona wording such as "follow the user language" and outranks language hints in the user message.',
].join(' ')
@ -153,8 +157,12 @@ export function replyReminder(setting: string | undefined | null): string {
const normalized = normalizeReplyLanguage(setting)
if (normalized === REPLY_LANGUAGE_DEFAULT) return ''
const meta = REPLY_META[normalized]
const noGloss = normalized === 'en'
? 'No Chinese words or (中文) glosses in the answer.'
: 'No English glosses like (English term) in the answer.'
return [
`[Reply language] Mandatory: write your entire final answer in ${meta.native} (${meta.name}).`,
'Do not answer in the user\'s language. Code/paths/host names stay original.',
noGloss,
'Code/paths/host names stay original.',
].join(' ')
}