mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-09 05:10:45 +08:00
Fix reply language ignored when user writes Chinese.
Strengthen Host prompt injection with a per-step reply reminder, read live settings, and stop persona from forcing follow-user language. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d52c05e774
commit
91f2e9a5c8
7 changed files with 108 additions and 19 deletions
|
|
@ -6,6 +6,7 @@ import {
|
|||
normalizeReplyLanguage,
|
||||
normalizeThinkingLanguage,
|
||||
replyInstruction,
|
||||
replyReminder,
|
||||
resolveThinkingLanguage,
|
||||
thinkingInstruction,
|
||||
thinkingReminder,
|
||||
|
|
@ -48,5 +49,12 @@ test('thinkingInstruction and reminder mention the target language', () => {
|
|||
test('replyInstruction is empty for follow-user and forces otherwise', () => {
|
||||
assert.equal(replyInstruction('follow-user'), '')
|
||||
assert.match(replyInstruction('en'), /English/)
|
||||
assert.match(replyInstruction('en'), /Do not switch to the user's language/)
|
||||
assert.match(replyInstruction('zh'), /简体中文/)
|
||||
})
|
||||
|
||||
test('replyReminder is empty for follow-user and reminds otherwise', () => {
|
||||
assert.equal(replyReminder('follow-user'), '')
|
||||
assert.match(replyReminder('en'), /Mandatory/)
|
||||
assert.match(replyReminder('en'), /English/)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue