fix(bridge): 商机拦截话术不使用购物车
This commit is contained in:
@@ -180,3 +180,17 @@ test('guard: keeps meaningful anchor text when the URL is removed', () => {
|
||||
assert.doesNotMatch(r.content, /fake-guide/);
|
||||
assert.match(r.content, /the product care guide/);
|
||||
});
|
||||
|
||||
test('guard: CRM wording is replaced with a colleague follow-up, not a cart note', () => {
|
||||
const r = guardReply({
|
||||
content: 'Great — 500 stainless steel rings for your shops.\nI have created an opportunity for your request.',
|
||||
toolResults: [{ created: true, opportunity_id: 'opp-1' }],
|
||||
toolCalls: [{ name: 'create_opportunity', ok: true }],
|
||||
lang: 'en',
|
||||
});
|
||||
assert.equal(r.blocked, true);
|
||||
assert.ok(r.reasons.includes('internal_crm'));
|
||||
assert.match(r.content, /stainless steel rings/i);
|
||||
assert.match(r.content, /request has been noted/i);
|
||||
assert.doesNotMatch(r.content, /account cart/i);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user