修复策划审批回调跨项目污染

为审批响应增加项目路径与请求身份校验

防止旧项目回调覆盖当前会话并清理新项目状态
This commit is contained in:
2026-09-12 07:11:40 +00:00
parent 832f1e8b59
commit 16a6cdaf79
+24
View File
@@ -11647,12 +11647,36 @@ export function App({
approved,
})
.then((view) => {
if (
localProjectPathRef.current !== nextProjectPath ||
designAgentTurnRef.current?.projectPath !==
nextProjectPath ||
designAgentTurnRef.current?.clientTurnId !== clientTurnId
) {
return;
}
applyDesignView(view, nextProjectPath);
})
.catch((error) => {
if (
localProjectPathRef.current !== nextProjectPath ||
designAgentTurnRef.current?.projectPath !==
nextProjectPath ||
designAgentTurnRef.current?.clientTurnId !== clientTurnId
) {
return;
}
setPlanGddError(String(error));
})
.finally(() => {
if (
localProjectPathRef.current !== nextProjectPath ||
designAgentTurnRef.current?.projectPath !==
nextProjectPath ||
designAgentTurnRef.current?.clientTurnId !== clientTurnId
) {
return;
}
designAgentTurnRef.current = null;
setPlanningV2TransientReply('');
setChatAgentBusy(false);