修复策划审批回调跨项目污染
为审批响应增加项目路径与请求身份校验 防止旧项目回调覆盖当前会话并清理新项目状态
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user