Files
loki/scripts/preview/knowledge-map.preview.tsx
Cato 85192684b9 feat(memory): explore project connections and export agent handoffs (#1735)
* feat(memory): explore project connections and export portable agent handoffs

* fix(memory): use the last report when development log dates tie
2026-11-15 17:00:52 +01:00

15 lines
684 B
TypeScript

import * as React from "react";
import { createRoot } from "react-dom/client";
import { KnowledgeMap } from "@/components/memory/KnowledgeMap";
import { MAP_FIXTURE, BUSY_MAP } from "./knowledge-map.fixture";
window.fetch = async () =>
new Response(JSON.stringify({ ok: true }), { headers: { "content-type": "application/json" } });
const params = new URLSearchParams(window.location.search);
const empty = params.has("empty");
const fixture = params.has("busy") ? BUSY_MAP : MAP_FIXTURE;
createRoot(document.getElementById("root")!).render(
<main className="app-page max-w-7xl">
<KnowledgeMap map={empty ? { ...MAP_FIXTURE, nodes: [], edges: [] } : fixture} />
</main>,
);