feat(canvas): cut over design agent to living form v2

This commit is contained in:
2026-08-30 17:00:31 +08:00
parent f245603923
commit b0b5a602b5
35 changed files with 5729 additions and 13986 deletions

View File

@@ -146,33 +146,25 @@ function publishDesktopActivity(input: {
function ProtectedLayout({
authReady,
authRequired,
imageWorkspaceLocalDevelopment,
setupReady,
}: {
authReady: boolean;
authRequired: boolean;
imageWorkspaceLocalDevelopment: boolean;
setupReady: boolean;
}) {
const location = useLocation();
const authenticated = useAuthStore((state) => state.isAuthenticated());
const moduleAccess = useAuthStore((state) => state.moduleAccess);
const requestedModule = getGuardedAiModuleForPath(location.pathname);
const allowsAnonymousImageWorkspace = imageWorkspaceLocalDevelopment
&& (location.pathname === '/image-canvas'
|| location.pathname.startsWith('/image-canvas/')
|| location.pathname === '/image-prompts'
|| location.pathname.startsWith('/image-prompts/'));
if (!setupReady) {
return <StartupScreen />;
}
if (authRequired && !authReady && !allowsAnonymousImageWorkspace) {
if (authRequired && !authReady) {
return <StartupScreen />;
}
if (authRequired && !allowsAnonymousImageWorkspace && !authenticated) {
if (authRequired && !authenticated) {
return (
<Navigate
to="/login"
@@ -280,7 +272,6 @@ function App() {
const bootstrapUserSync = useUserSyncStore((state) => state.bootstrap);
const setupReady = setupComplete || skipSetupForE2E || rendererOnlyPreview;
const authRequired = !skipSetupForE2E && !rendererOnlyPreview;
const imageWorkspaceLocalDevelopment = window.electron?.imageWorkspaceLocalDevelopment === true;
useEffect(() => installRendererPerformanceDiagnostics(), []);
@@ -447,7 +438,6 @@ function App() {
<ProtectedLayout
authReady={authInitialized}
authRequired={authRequired}
imageWorkspaceLocalDevelopment={imageWorkspaceLocalDevelopment}
setupReady={setupReady}
/>
)}