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

Function Probe

graph-ui/src/settings/view-preferences.test.tsx:16–21  ·  view source on GitHub ↗
({ name, id = name }: { name: string; id?: string })

Source from the content-addressed store, hash-verified

14const project = () => `view-preference-test-${++nextProject}`;
15const store = (name: string, preferences: unknown, version = 1) => window.localStorage.setItem(viewPreferencesKey(name), JSON.stringify({ version, preferences }));
16function Probe({ name, id = name }: { name: string; id?: string }) {
17 const state = useViewPreferences(name);
18 const [selected, select] = useState(false);
19 controls.set(id, state);
20 return <button data-testid={id} onClick={() => select(true)}>{JSON.stringify({ ...state.preferences, selected })}</button>;
21}
22beforeEach(() => {
23 (globalThis as unknown as Record<string, unknown>).IS_REACT_ACT_ENVIRONMENT = true;
24 // Node exposes its own storage global; use the actual jsdom browser store.

Callers

nothing calls this directly

Calls 2

useViewPreferencesFunction · 0.90
selectFunction · 0.50

Tested by

no test coverage detected