MCPcopy
hub / github.com/wavetermdev/waveterm / getWaveObjectAtom

Function getWaveObjectAtom

frontend/preview/mock/mockwaveenv.ts:441–447  ·  view source on GitHub ↗
(oref: string)

Source from the content-addressed store, hash-verified

439 const connConfigKeyAtomCache = new Map<string, Atom<any>>();
440 const configBackgroundAtomCache = new Map<string, Atom<BackgroundConfigType>>();
441 const getWaveObjectAtom = <T extends WaveObj>(oref: string): PrimitiveAtom<T> => {
442 if (!waveObjectValueAtomCache.has(oref)) {
443 const obj = (mergedOverrides.mockWaveObjs?.[oref] ?? null) as T;
444 waveObjectValueAtomCache.set(oref, atom(obj) as PrimitiveAtom<T>);
445 }
446 return waveObjectValueAtomCache.get(oref) as PrimitiveAtom<T>;
447 };
448 const atoms = makeMockGlobalAtoms(
449 mergedOverrides.settings,
450 mergedOverrides.atoms,

Callers 2

makeMockGlobalAtomsFunction · 0.70
makeMockWaveEnvFunction · 0.70

Calls 2

setMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected