MCPcopy Create free account
hub / github.com/0xcaff/codex-web / mapMemoryPathToBrowserPath

Function mapMemoryPathToBrowserPath

src/browser/routes.ts:38–49  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

36}
37
38export function mapMemoryPathToBrowserPath(pathname: string) {
39 if (pathname === "/") {
40 return { path: "/", titleChange: "Codex" };
41 }
42
43 const match = pathname.match(/^\/local\/([^/?#]+)$/);
44 if (!match) {
45 return null;
46 }
47
48 return { path: `/thread/${encodeURIComponent(match[1])}` };
49}
50
51export function dispatchNavigateToRoute(path: string): void {
52 window.dispatchEvent(

Callers 1

shim.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected