Fix NSFW reply refusals and media offers

This commit is contained in:
Jamie Brunton committed 2026-08-14 08:59:07 +01:00
1 parent e9a4c965ee
commit 6b2e1bc380
11 files changed
+161 -22

No files matched your search

+3 -1
View File
@@ -107,7 +107,7 @@ describe('conversation state', () => {
expect(state?.automation).toMatchObject({ turnsUsed: 0, status: 'active' });
expect(state?.sellerDetected).toBe(false);
expect(state?.automation).toMatchObject({
policyMode: 'legacy', policyVersion: 3, maxAutomatedTurns: 3,
policyMode: 'legacy', policyVersion: 4, maxAutomatedTurns: 3,
rapportTurnsBeforeMediaAsk: 3, hybridPhase: null,
});
});
@@ -162,6 +162,8 @@ describe('conversation state', () => {
it('rejects media solicitation from autonomous r4r replies', () => {
expect(isSafeR4RReply('Would you send me a nude?')).toBe(false);
expect(isSafeR4RReply('Want me to send you a pic?')).toBe(true);
expect(buildConversationState([message('I can share a pic if you want.', true)]).askedForMedia).toBe(false);
expect(isSafeR4RReply('I love live music too. What was your last gig?')).toBe(true);
});