@tomflow/chatloop-extension 0.3.73 → 0.3.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -593,6 +593,24 @@
|
|
|
593
593
|
if(rUserVersion && rVersion!==rUserVersion){
|
|
594
594
|
fail("APPROVAL_REQUIREMENTS_VERSION_MISMATCH");return false;
|
|
595
595
|
}
|
|
596
|
+
// An explicit Chat URL may be adopted after the P-approval assistant
|
|
597
|
+
// finishes, but that reply might instead have issued R2/P2. Such a
|
|
598
|
+
// revision invalidates the earlier P1 approval even if the last user
|
|
599
|
+
// message is still the old standalone confirmation.
|
|
600
|
+
const revisedAfterApproval=rows.slice(lastUser+1).some(x=>{
|
|
601
|
+
if(x.role!=="assistant")return false;
|
|
602
|
+
const text=textOf(x),nextR=versionOf(text,"R"),
|
|
603
|
+
nextP=versionOf(text,"P");
|
|
604
|
+
return Boolean(
|
|
605
|
+
/(?:需求|范围|验收)/.test(text)&&nextR&&nextR!==rVersion
|
|
606
|
+
||/(?:方案|计划)/.test(text)&&nextP&&nextP!==pVersion
|
|
607
|
+
||/(?:SUPERSEDED|已失效|已废弃|已撤销)/i.test(text)
|
|
608
|
+
&&/(?:需求|方案|计划|R[1-9][0-9]*|P[1-9][0-9]*)/i.test(text)
|
|
609
|
+
);
|
|
610
|
+
});
|
|
611
|
+
if(revisedAfterApproval){
|
|
612
|
+
fail("APPROVAL_REVISED_AFTER_CONFIRMATION");return false;
|
|
613
|
+
}
|
|
596
614
|
const userKey=messageId(pUser.el,"user");
|
|
597
615
|
const snap=inspect();
|
|
598
616
|
// Normally the model calls Start during its P-confirmation Turn.
|
package/extension/manifest.json
CHANGED