fix(ui): support legacy prompts and publication confirmation

This commit is contained in:
john
2026-07-14 15:05:37 +08:00
parent 77f1ea8350
commit f2d0c99f6c
5 changed files with 105 additions and 1 deletions
+13
View File
@@ -32,6 +32,19 @@ test('deriveUserFacingText removes page-data prompt persisted as display text',
assert.equal(deriveUserFacingText(persistedDisplayText), userText);
});
test('deriveUserFacingText removes a legacy page-data prompt after the template changes', () => {
const userText = '帮我做一个日记页面,可以每天写日记,其他人可以评价';
const persistedDisplayText = [
'请使用 page-data-collect 技能:在 MindSpace 页面中实现可提交、可持久化的数据收集。',
'流程:loadskill → privatedataexecute 建表 → privatedataregisterdataset → writefile/editfile。',
'完成后只返回 workspaceUrl,并说明后台入口与口令。',
userText,
].join('');
assert.equal(stripKnownChatSkillPrompt(persistedDisplayText), userText);
assert.equal(deriveUserFacingText(persistedDisplayText), userText);
});
test('deriveUserFacingText removes Memind task orchestration prefix', () => {
const userText = '帮我生成深度搜索报告';
const agentPayload = [