fix(ui): support legacy prompts and publication confirmation
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user