MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / install

Function install

graph-ui/src/app/ui-log-install.test.ts:25–49  ·  view source on GitHub ↗
(getProject?: () => string)

Source from the content-addressed store, hash-verified

23});
24
25function install(getProject?: () => string) {
26 const posts: { payload: UiLogPayload; final: boolean }[] = [];
27 const buffer = new UiLogBuffer({
28 page: '/?project=demo',
29 session: 'test',
30 transport: {
31 send: async (payload, final) => {
32 posts.push({ payload, final });
33 return true;
34 },
35 },
36 schedule: () => 0,
37 cancel: () => undefined,
38 });
39 const printed: unknown[][] = [];
40 const fakeConsole = {
41 debug: (...args: unknown[]) => printed.push(['debug', ...args]),
42 log: (...args: unknown[]) => printed.push(['log', ...args]),
43 info: (...args: unknown[]) => printed.push(['info', ...args]),
44 warn: (...args: unknown[]) => printed.push(['warn', ...args]),
45 error: (...args: unknown[]) => printed.push(['error', ...args]),
46 } as unknown as Console;
47 handle = installUiLog({ buffer, console: fakeConsole, session: 'test', getProject });
48 return { buffer, posts, printed, fakeConsole };
49}
50
51async function entries(buffer: UiLogBuffer, posts: { payload: UiLogPayload }[]) {
52 await buffer.flush();

Callers 1

Calls 2

installUiLogFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected