fix: allow page clarification turns without delivery error
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
isPageDataDevIntent,
|
||||
isPageDataIntent,
|
||||
isPageGenerationIntent,
|
||||
isGenericPageGenerationRequest,
|
||||
} from './chat-skills.mjs';
|
||||
|
||||
test('filterChatSkills shows summarize and analyze without granted skills', () => {
|
||||
@@ -125,6 +126,14 @@ test('isPageGenerationIntent matches implicit travel guide page requests', () =>
|
||||
assert.equal(isPageGenerationIntent('你好'), false);
|
||||
});
|
||||
|
||||
test('isGenericPageGenerationRequest only matches page requests without a subject', () => {
|
||||
assert.equal(isGenericPageGenerationRequest('帮我生成一个页面吧'), true);
|
||||
assert.equal(isGenericPageGenerationRequest('Please create a web page'), true);
|
||||
assert.equal(isGenericPageGenerationRequest('帮我做一个秋夜诗的 H5 页面'), false);
|
||||
assert.equal(isGenericPageGenerationRequest('苏州攻略页面'), false);
|
||||
assert.equal(isGenericPageGenerationRequest('你好'), false);
|
||||
});
|
||||
|
||||
test('buildAutoChatSkillPrefix prefers page-data-collect for survey requests', () => {
|
||||
const text = '帮我在这个页面增加一个调查问卷,出三个问题,密码 888 查看提交记录';
|
||||
const prefix = buildAutoChatSkillPrefix(text, ['page-data-collect', 'static-page-publish']);
|
||||
|
||||
Reference in New Issue
Block a user