MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / loadAndPinWaveObject

Function loadAndPinWaveObject

frontend/app/store/wos.ts:202–209  ·  view source on GitHub ↗
(oref: string)

Source from the content-addressed store, hash-verified

200}
201
202function loadAndPinWaveObject<T extends WaveObj>(oref: string): Promise<T> {
203 const wov = getWaveObjectValue<T>(oref);
204 if (wov.pendingPromise == null) {
205 const dataValue = globalStore.get(wov.dataAtom);
206 return Promise.resolve(dataValue.value);
207 }
208 return wov.pendingPromise;
209}
210
211const waveObjectDerivedAtomCache = new Map<string, Atom<any>>();
212

Callers

nothing calls this directly

Calls 2

getWaveObjectValueFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected