移除退役策划 V2 流式事件订阅
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Failing after 3m3s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Failing after 2m47s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Failing after 2m48s
Project CI / Backend tests (pull_request) Failing after 16s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 2m2s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Failing after 2m26s
Project CI / Repository checks (pull_request) Failing after 11s
Project CI / AI game creator shell web tests (pull_request) Failing after 1m7s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m33s
Project CI / Native shell tests (pull_request) Failing after 3m17s
Project CI / Frontend tests (pull_request) Successful in 3m42s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Failing after 3m3s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Failing after 2m47s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Failing after 2m48s
Project CI / Backend tests (pull_request) Failing after 16s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 2m2s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Failing after 2m26s
Project CI / Repository checks (pull_request) Failing after 11s
Project CI / AI game creator shell web tests (pull_request) Failing after 1m7s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m33s
Project CI / Native shell tests (pull_request) Failing after 3m17s
Project CI / Frontend tests (pull_request) Successful in 3m42s
删除 planning-session-v2-stream 事件监听与旧实时回复错误处理 保留新版 Design Agent 事件订阅链路
This commit is contained in:
@@ -234,7 +234,6 @@ import {
|
||||
planningMessagesToChatMessages,
|
||||
planningResultDisplayText,
|
||||
type PlanningSessionCommandResultV2,
|
||||
type PlanningSessionStreamEventV2,
|
||||
planningSessionToPlanGddState,
|
||||
planningSessionToRuntime,
|
||||
} from './features/project-workspace/planningSessionV2';
|
||||
@@ -2021,62 +2020,6 @@ export function App({
|
||||
updateProjectSupervisorRuntime,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!canSubscribeTauriEvents() || !planningV2Active) {
|
||||
return;
|
||||
}
|
||||
let cleanup: (() => void) | null = null;
|
||||
let disposed = false;
|
||||
void subscribeTauriEvent<PlanningSessionStreamEventV2>(
|
||||
'planning-session-v2-stream',
|
||||
(event) => {
|
||||
const payload = event.payload;
|
||||
const trackedTurn = planningV2TurnRef.current;
|
||||
if (!trackedTurn || payload.clientTurnId !== trackedTurn.clientTurnId) {
|
||||
return;
|
||||
}
|
||||
if (payload.status === 'started') {
|
||||
setPlanningV2TransientReplyTarget(
|
||||
payload.accumulatedText || '正在生成策划方案…',
|
||||
);
|
||||
setProjectSupervisorRuntimeError('');
|
||||
}
|
||||
if (
|
||||
payload.status === 'delta' &&
|
||||
(payload.accumulatedText || payload.deltaText)
|
||||
) {
|
||||
setPlanningV2TransientReplyTarget(
|
||||
payload.accumulatedText || payload.deltaText,
|
||||
);
|
||||
setProjectSupervisorRuntimeError('');
|
||||
}
|
||||
if (payload.status === 'failed' && payload.error?.summary) {
|
||||
setProjectSupervisorRuntimeError(payload.error.summary);
|
||||
}
|
||||
},
|
||||
)
|
||||
.then((unlisten) => {
|
||||
if (disposed) {
|
||||
unlisten();
|
||||
return;
|
||||
}
|
||||
cleanup = unlisten;
|
||||
})
|
||||
.catch((error) => {
|
||||
if (!disposed) {
|
||||
setProjectSupervisorRuntimeError(
|
||||
`Planning V2 实时回复不可用:${
|
||||
error instanceof Error ? error.message : String(error)
|
||||
}`,
|
||||
);
|
||||
}
|
||||
});
|
||||
return () => {
|
||||
disposed = true;
|
||||
cleanup?.();
|
||||
};
|
||||
}, [planningV2Active]);
|
||||
|
||||
useEffect(() => {
|
||||
const ready = createDesignAgentEventSubscriptionReady();
|
||||
if (!canSubscribeTauriEvents() || !planningV2Active) {
|
||||
|
||||
Reference in New Issue
Block a user