MCPcopy Create free account
hub / github.com/astercloud/aster / getPreservedState

Function getPreservedState

ui/src/composables/useStreamingState.ts:43–50  ·  view source on GitHub ↗
(surfaceId: string)

Source from the content-addressed store, hash-verified

41 * Get or create preserved state for a surface
42 */
43export function getPreservedState(surfaceId: string): PreservedState {
44 let state = surfaceStates.get(surfaceId);
45 if (!state) {
46 state = createPreservedState();
47 surfaceStates.set(surfaceId, state);
48 }
49 return state;
50}
51
52/**
53 * Clear preserved state for a surface

Callers 6

saveScrollPositionsFunction · 0.85
restoreScrollPositionsFunction · 0.85
saveFocusStateFunction · 0.85
restoreFocusStateFunction · 0.85

Calls 3

createPreservedStateFunction · 0.85
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected