feat: add Makelore Robot hardware module

This commit is contained in:
2026-08-13 23:17:22 +08:00
parent 22add3f01f
commit aba5cae286
25 changed files with 3169 additions and 72 deletions

View File

@@ -18,6 +18,7 @@ import { PreviewScene } from './pages/Makelore';
import { ProjectConfiguration } from './pages/ProjectConfiguration';
import { Workbench } from './pages/Workbench';
import { ImageCanvas } from './pages/ImageCanvas';
import { AiHardware } from './pages/AiHardware';
import { Settings } from './pages/Settings';
import { Setup } from './pages/Setup';
import { Login } from './pages/Login';
@@ -114,6 +115,27 @@ function getReturnPath(location: ReturnType<typeof useLocation>): string {
return `${location.pathname}${location.search}`;
}
const PROGRAMMING_ROUTE_PREFIXES = [
'/project-config',
'/makelore-home',
'/kangaroo',
'/subagents',
'/chat',
'/deliverables',
'/workbench',
'/opencode-chat',
'/projects',
'/sessions',
'/models',
'/settings',
] as const;
function isProgrammingRoute(pathname: string): boolean {
return PROGRAMMING_ROUTE_PREFIXES.some(
(route) => pathname === route || pathname.startsWith(`${route}/`),
);
}
function ProtectedLayout({
authReady,
authRequired,
@@ -299,8 +321,9 @@ function App() {
useEffect(() => {
if (rendererOnlyPreview) return;
if (!setupReady) return;
if (!isProgrammingRoute(location.pathname)) return;
initProviders();
}, [initProviders, rendererOnlyPreview, setupReady]);
}, [initProviders, location.pathname, rendererOnlyPreview, setupReady]);
useEffect(() => {
if (rendererOnlyPreview) return;
@@ -388,6 +411,7 @@ function App() {
<Route path="/chat" element={<Navigate to="/opencode-chat" replace />} />
<Route path="/deliverables" element={<PreviewScene />} />
<Route path="/image-canvas" element={<ImageCanvas />} />
<Route path="/ai-hardware" element={<AiHardware />} />
<Route path="/workbench/:projectId" element={<Workbench />} />
<Route path="/opencode-chat" element={<ProjectChatRoute />} />
<Route path="/projects" element={<Projects />} />