Add notebook parameters, literal highlighted scripts, copy helpers, streamed runs, host-key confirmation, artifacts, conditional notes, login and optimistic Markdown editing. Keep the temporary core renderer isolated to mock mode. Use React and Vite for the UI, react-markdown for safe Markdown rendering, highlight.js for shell syntax, and CodeMirror 6 for Markdown editing. Add Testing Library, jsdom and Vitest for component and event-state coverage. Validate pnpm install, root typecheck and test (29 web tests, 1 server test), plus normal and mock web builds. Core contracts remain unchanged; real backend execution awaits the parallel core/server implementations.
16 lines
387 B
TypeScript
16 lines
387 B
TypeScript
import React from "react";
|
|
import { createRoot } from "react-dom/client";
|
|
import { App } from "./App";
|
|
import { liveApi } from "./api";
|
|
import "./style.css";
|
|
|
|
const api =
|
|
import.meta.env.VITE_MOCK === "1"
|
|
? (await import("./mock/api")).mockApi
|
|
: liveApi;
|
|
createRoot(document.getElementById("root")!).render(
|
|
<React.StrictMode>
|
|
<App api={api} />
|
|
</React.StrictMode>,
|
|
);
|