import { useEffect } from "preact/hooks"; import { HistoryLoadStatus } from "../../features/messages/components"; import { finishArtifactsBoot } from "../../features/artifacts/boot"; import { bindWorkbench } from "../../features/sessions/boot"; import { routesToWorkspace } from "../../features/sessions/dom"; import { ModelSelect } from "./ModelSelect"; import "./dashboard.css"; export function Shell() { useEffect(() => { void finishArtifactsBoot(bindWorkbench()); }, []); // The first view waits for the locale chunks. Painting the dashboard in the // meantime put a deep link on the wrong screen for the whole wait, so a path // the router will open in the workspace starts with neither view shown and // a neutral indicator instead. `dashboard.css` hides the indicator as soon // as either view is revealed, whichever code path reveals it. const pendingRoute = typeof location !== "undefined" && routesToWorkspace(String(location.pathname || "")); return ( <>
Skip to content