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

Function reloadWaveObject

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

Source from the content-addressed store, hash-verified

149const waveObjectValueCache = new Map<string, WaveObjectValue<any>>();
150
151function reloadWaveObject<T extends WaveObj>(oref: string): Promise<T> {
152 let wov = waveObjectValueCache.get(oref);
153 if (wov === undefined) {
154 wov = getWaveObjectValue<T>(oref, true);
155 return wov.pendingPromise;
156 }
157 const prtn = GetObject<T>(oref);
158 prtn.then((val) => {
159 globalStore.set(wov.dataAtom, { value: val, loading: false });
160 });
161 return prtn;
162}
163
164function createWaveValueObject<T extends WaveObj>(oref: string, shouldFetch: boolean): WaveObjectValue<T> {
165 const wov = { pendingPromise: null, dataAtom: null };

Callers

nothing calls this directly

Calls 4

getWaveObjectValueFunction · 0.85
GetObjectFunction · 0.85
getMethod · 0.80
setMethod · 0.80

Tested by

no test coverage detected