补齐资源任务 Hook 依赖
Project CI / AI game creator shell Rust shard 2/4 (push) Has been cancelled
Project CI / AI game creator shell Rust shard 3/4 (push) Has been cancelled
Project CI / AI game creator shell Rust shard 4/4 (push) Has been cancelled
Project CI / AI game creator shell Rust smoke (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust shard 1/4 (push) Has been cancelled

声明资源初始化开关依赖
This commit is contained in:
2026-09-16 01:14:14 +08:00
parent ab7ffded2f
commit 5da6ff46a1
@@ -1448,6 +1448,7 @@ export default function ProjectDevelopmentView({
onMakeGame,
}: ProjectDevelopmentViewProps) {
const professionalDagVisible = orchestrationMode === 'professional-dag';
const resourceHydrationEnabled = orchestrationMode !== 'single-supervisor';
const [mode, setMode] = useState<WorkbenchMode>('resources');
const [runtimeInspectMode, setRuntimeInspectMode] = useState(false);
const [resourceBookState, dispatchResourceBook] = useReducer(
@@ -2145,6 +2146,7 @@ export default function ProjectDevelopmentView({
});
useEffect(() => {
if (!resourceHydrationEnabled) return undefined;
let cancelled = false;
if (sortMode !== 'dependency') {
setResourceGraphState({
@@ -2223,6 +2225,7 @@ export default function ProjectDevelopmentView({
resourceGraphInputs,
resourceGraphProjectScopeKey,
resourceGraphScopeKey,
resourceHydrationEnabled,
sortMode,
]);
@@ -2516,14 +2519,14 @@ export default function ProjectDevelopmentView({
useEffect(() => {
resourceLayoutReadNoticeScopeRef.current = null;
setResourceLayoutReadNotice(null);
}, [manifest.projectId, projectPath]);
}, [manifest.projectId, projectPath, resourceHydrationEnabled]);
/**
* "组件恰好被卸载"
*
*/
useEffect(() => {
setResourceVersionReplacementLineage(null);
}, [manifest.projectId, projectPath]);
}, [manifest.projectId, projectPath, resourceHydrationEnabled]);
useEffect(() => {
const report = dependencyLayout.readReport ?? typeLayout.readReport;
if (
@@ -7193,6 +7196,7 @@ export default function ProjectDevelopmentView({
* effect Promise
*/
useEffect(() => {
if (!resourceHydrationEnabled) return undefined;
const invoke = window.__TAURI__?.core?.invoke;
if (!invoke || !projectPath.trim() || !manifest.projectId.trim()) {
return undefined;
@@ -7241,7 +7245,7 @@ export default function ProjectDevelopmentView({
return () => {
cancelled = true;
};
}, [manifest.projectId, projectPath]);
}, [manifest.projectId, projectPath, resourceHydrationEnabled]);
/**
*