fix(ui): support legacy prompts and publication confirmation
This commit is contained in:
@@ -361,6 +361,17 @@ export function stripKnownChatSkillPrompt(text) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Older persisted Page Data messages can contain a prompt from a previous
|
||||
// template revision. Keep this compatibility path anchored to the stable
|
||||
// skill header and final delivery sentence so the user's request is not
|
||||
// mistaken for executor-only instructions.
|
||||
if (/^请使用\s+page-data-collect\s+技能[::]/u.test(next)) {
|
||||
const legacyEndMarker = '并说明后台入口与口令。';
|
||||
const markerIndex = next.indexOf(legacyEndMarker);
|
||||
if (markerIndex >= 0) {
|
||||
next = next.slice(markerIndex + legacyEndMarker.length);
|
||||
}
|
||||
}
|
||||
return next.trim();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user